From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by sourceware.org (Postfix) with ESMTPS id F099E385841A for ; Tue, 30 Aug 2022 17:48:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F099E385841A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pg1-x52d.google.com with SMTP id b196so1627762pga.7 for ; Tue, 30 Aug 2022 10:48:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=6DEv2ESLdRXwiK1bwovaKcucVwYeTnS1bcfDOmrSxEE=; b=w6jyMmYqI3I9LSrTKPm6Ic8yiZYcOofXZZmNVQSOOcRIUZ2YIDlVBqqbUyf9ZGK2Kj 5BwURd7j/WNAS3lD6eNHABtaC9L1b7YT8QcboySfA3LELnkV8a1JTLUfXJrPNlOW15GE rWDQSJ6FMNP/8d1Lj3TS7daeMp3eOClYTt6Vo4ZL7UTiNFP2NetcaC76HsQVOc7xttmA PYC+7bqWKKRyoO367lThJRq70H08ZiVk6DUiOOIG6GKDKQuzK4LwX/GZKtDsAdHNJwCn Yp+xhaypgjJy/Z5cdsrE0e9yQGnwdwXI1QhDFXiWkeHO/JOcXftgUxq2LUwn4p4N5jAq KIRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=6DEv2ESLdRXwiK1bwovaKcucVwYeTnS1bcfDOmrSxEE=; b=s1reXp392LpQ4dzIDu5ZnXc2Iqocv6JLgZ28/Gk+lPMyeE2n5MMJX1wfstHKlPIUbU exBBavYeAL4YZmQKXvNdycehOmffreBrqCtgckCssFuhThWNa4+iNDcr8aafBVors67h 2A5p5YurRTRScbeiRBabSeXvXU5KvQfu0anI2mPFUsucgR4CWzUtY1tWpTNcEQ5g8zRr 05SgbiL/x3L/UYNq6Cjb9cqWa5sdK+OfD0DQDneQXs2SaPh4t8V97onv9uS0GMTSDeRZ s282EBS1+x3b/3xaJN/+MZI0fbQr+SsB3j3w4gqL9DL4YrHMLd+MbEEX9h8jdNrt8evx 4S1w== X-Gm-Message-State: ACgBeo2YOViV71glFdaNvHQi1Vq9WJwDuzjE8GGmhJTmI8c+49ar/E1O h6NnTR1OpczLDUk3oJtbyzoUU/u2hDNgnsDt2qs= X-Google-Smtp-Source: AA6agR6NHFGMipEbEM1VAKIAE0m6MFqBjmF7QfHRQ0gqkRjLVX2u0O6s5WM44uvyqfgxIn8N6kM02Q== X-Received: by 2002:a63:4558:0:b0:429:b6e6:6638 with SMTP id u24-20020a634558000000b00429b6e66638mr18725250pgk.83.1661881716808; Tue, 30 Aug 2022 10:48:36 -0700 (PDT) Received: from vineetg-framework.hq.rivosinc.com ([12.3.194.138]) by smtp.gmail.com with ESMTPSA id w5-20020aa79545000000b005386162bc2asm3618852pfq.92.2022.08.30.10.48.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Aug 2022 10:48:36 -0700 (PDT) From: Vineet Gupta To: gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com, jim.wilson.gcc@gmail.com, Palmer Dabbelt , Philipp Tomsich , =?UTF-8?q?Christoph=20M=C3=BCllner?= , collison@rivosinc.com, gnu-toolchain@rivosinc.com, Vineet Gupta Subject: [PATCH 2/2] RISC-V: remove CM_PIC as it doesn't do much Date: Tue, 30 Aug 2022 10:48:30 -0700 Message-Id: <20220830174830.224541-3-vineetg@rivosinc.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220830174830.224541-1-vineetg@rivosinc.com> References: <20220830174830.224541-1-vineetg@rivosinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE,URIBL_BLACK autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: CM_PIC is no longer doing anything directly. Removing it might potentially affect USE_LOAD_ADDRESS_MACRO() but seems unlikely. Signed-off-by: Vineet Gupta --- gcc/config/riscv/riscv-c.cc | 4 ---- gcc/config/riscv/riscv-opts.h | 3 +-- gcc/config/riscv/riscv.cc | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/gcc/config/riscv/riscv-c.cc b/gcc/config/riscv/riscv-c.cc index bba72cf77a82..7064fcf142fe 100644 --- a/gcc/config/riscv/riscv-c.cc +++ b/gcc/config/riscv/riscv-c.cc @@ -92,13 +92,9 @@ riscv_cpu_cpp_builtins (cpp_reader *pfile) builtin_define ("__riscv_cmodel_medlow"); break; - case CM_PIC: - /* FALLTHROUGH. */ - case CM_MEDANY: builtin_define ("__riscv_cmodel_medany"); break; - } if (TARGET_MIN_VLEN != 0) diff --git a/gcc/config/riscv/riscv-opts.h b/gcc/config/riscv/riscv-opts.h index 85e869e62e3a..ce3237beca7a 100644 --- a/gcc/config/riscv/riscv-opts.h +++ b/gcc/config/riscv/riscv-opts.h @@ -34,8 +34,7 @@ extern enum riscv_abi_type riscv_abi; enum riscv_code_model { CM_MEDLOW, - CM_MEDANY, - CM_PIC + CM_MEDANY }; extern enum riscv_code_model riscv_cmodel; diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index 7c120eaa8e33..a239fe43047c 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -5162,7 +5162,7 @@ riscv_option_override (void) init_machine_status = &riscv_init_machine_status; if (flag_pic) - riscv_cmodel = CM_PIC; + riscv_cmodel = CM_MEDANY; /* We get better code with explicit relocs for CM_MEDLOW, but worse code for the others (for now). Pick the best default. */ -- 2.32.0