From patchwork Tue Aug 30 17:48:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vineet Gupta X-Patchwork-Id: 848 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:ecc5:0:0:0:0:0 with SMTP id s5csp1909709wro; Tue, 30 Aug 2022 10:49:30 -0700 (PDT) X-Google-Smtp-Source: AA6agR6SGPys6cIKd35khu9CC3MYebeBk/dDyDcea6S7Ep860MXoVOKDcTmyXhQbodWODdqtKINS X-Received: by 2002:a17:907:6d03:b0:741:9b9d:ad8b with SMTP id sa3-20020a1709076d0300b007419b9dad8bmr6706261ejc.197.1661881770749; Tue, 30 Aug 2022 10:49:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661881770; cv=none; d=google.com; s=arc-20160816; b=mT7gXVCKXVqm699fb2+iPJ5Oa8/LoCt3ZnOa6oVqeg4kGVFM6ad6yur0QfzXM2Y5GR /13JS3stQCGvB0Rie9shevJ9uy9eVuVehqoQqfm2KnDdqEzAaqQPW0phcuO6Y0ih//UO jDhhRMRnHhgdc4meF4JqbGb4W+tEbAr5atHgybD86nI5AgabXN7bhgFmgxvZ+BkC6Dkz yX99xIJpH0nWq1m41SPKdjbz0yaX5oCy9mPqNc/z91Lm+sCSrbLpkf5h7V5yoEuPY+eK wAqp/HfozlnDjSFjMi0BObiEgB4oPYnjftNue82+3ANdaxXOPnXHoy2h52u+s8/nH8hx sXaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:dmarc-filter:delivered-to; bh=AFCz9UOMtbPufI4ENE9VLhWmElyty9LDXwrn3Qax/TY=; b=U01ennmurkLXqG43RR+VYM/ztGq+zetw082XYnPcs1wNIHiMlGQw0nE3ovjNpNdgrQ 1SJgi55a9R68KsnntEQvrq/e2yCpReaVjxpufeoTnIuHfeLQAT0O39hqHRCQ3di23ncm A3j8ov4xibOu0Mljqz5bpnXZ/EMlS8QhEw62169U7sNOFI9PshT7NVJFSeUPVHViBIdj OzWUhsC4ILDscxj/ci0q7CZVMymFxaxW791ZW9xukaIvcdDuZeWp2eYjoJZmETAsVClm EHYKDjzEI2n59HKrTJVvO1S8KSklqltaCWL4kwxOsgIOGC2Zwdts9TZqx2GbV0OB0h0O GpyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=4WzbSJca; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id sd4-20020a1709076e0400b00718d1cddac1si10736044ejc.833.2022.08.30.10.49.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Aug 2022 10:49:30 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=fail header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=4WzbSJca; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 747E33AA9412 for ; Tue, 30 Aug 2022 17:49:00 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id E7641385C401 for ; Tue, 30 Aug 2022 17:48:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E7641385C401 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-pf1-x433.google.com with SMTP id 76so12075393pfy.3 for ; Tue, 30 Aug 2022 10:48:36 -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=AFCz9UOMtbPufI4ENE9VLhWmElyty9LDXwrn3Qax/TY=; b=4WzbSJcampfgk5CqVBxnTrs4SslkFIEKTSSL9tGZ0aA9jayjNvbjMN9TJr9obdF4Nc DXK90rp9q/gBqY+XGFJXX8jhSQ8dx2/El2ksS5MxEbrJdi9rDWMRjTizJI2KgVLcbdVH n7oUEI5GFECkB/b0vb8lB5B6ucaYpf1Mvmjh3A283NAH8hd7wWw/fEkfaVHTiV+VLxC7 DkynzXuARGdy9Zp1ODCUSUHpZsPXZ6mrcU3ioxbfiC76LF+10fL37zUET5OHRhXAklDb +s3vIjWK9rdg8gRJGQPjOnbndQVuGDv34ncl2VooGqBXlYiHRE4PaSeTdsfKa1L3RumK XfQw== 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=AFCz9UOMtbPufI4ENE9VLhWmElyty9LDXwrn3Qax/TY=; b=aqq/CbeU7B+GzwOE7BR9z/eOsCgR49fatH+Jvwcp70uJi3tarWyPZid43jv0Mt/kiR RoM4Xa+1xovZq6YXU0IlUmWQO59cgq2zmIJQlIM2WQVmJIXdWVGe+gQKVbiMxqg9+ZJg 3rLPcz0m1a9sKYTz2hlLgxbzw++Dt6fgER4RRciNuw0Kk04yHx4vT6DK/9x5vFP+f3HO fZYp0AxaTzaH4f+ck0aNe3P6y0QohqfGR8Y1xKOflgON//B7l6U0KAIC83Lz1B38bakL SHwNA2qlYL3AojEJG+0NU2uUtuIwOAdVfxDFZtjHbnnw2ebiF0js2PGFCU+Kc7CUzVYw VLLw== X-Gm-Message-State: ACgBeo1tFxw5itzQL4t7TQWoy3SzxqNcBfhit8lUN4+2m4KGNfhxIPj8 ZG1F4gFPSdCpCDhLSwnsp0INnrXCr/48K57jCdY= X-Received: by 2002:a63:296:0:b0:42f:a827:6963 with SMTP id 144-20020a630296000000b0042fa8276963mr2453563pgc.167.1661881715703; Tue, 30 Aug 2022 10:48:35 -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.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Aug 2022 10:48:34 -0700 (PDT) From: Vineet Gupta To: gcc-patches@gcc.gnu.org Subject: [PATCH 1/2] RISC-V: remove deprecate pic code model macro Date: Tue, 30 Aug 2022 10:48:29 -0700 Message-Id: <20220830174830.224541-2-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 X-Spam-Status: No, score=-11.2 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 autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: collison@rivosinc.com, gnu-toolchain@rivosinc.com, Vineet Gupta , kito.cheng@gmail.com, Philipp Tomsich Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1742609339633846211?= X-GMAIL-MSGID: =?utf-8?q?1742609339633846211?= Came across this deprecated symbol when looking around for -mexplicit-relocs handling in code Signed-off-by: Vineet Gupta --- gcc/config/riscv/riscv-c.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/gcc/config/riscv/riscv-c.cc b/gcc/config/riscv/riscv-c.cc index eb7ef09297e9..bba72cf77a82 100644 --- a/gcc/config/riscv/riscv-c.cc +++ b/gcc/config/riscv/riscv-c.cc @@ -93,9 +93,6 @@ riscv_cpu_cpp_builtins (cpp_reader *pfile) break; case CM_PIC: - /* __riscv_cmodel_pic is deprecated, and will removed in next GCC release. - see https://github.com/riscv/riscv-c-api-doc/pull/11 */ - builtin_define ("__riscv_cmodel_pic"); /* FALLTHROUGH. */ case CM_MEDANY: From patchwork Tue Aug 30 17:48:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vineet Gupta X-Patchwork-Id: 849 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:ecc5:0:0:0:0:0 with SMTP id s5csp1909884wro; Tue, 30 Aug 2022 10:50:18 -0700 (PDT) X-Google-Smtp-Source: AA6agR4eEWONNZ2I7a6WyaiGnO/O4LfzGNsAjYUIMwkYzIU/CYmbAVQrImf7OERkYnP3xSinbiYP X-Received: by 2002:a17:907:7254:b0:731:61c6:ecf9 with SMTP id ds20-20020a170907725400b0073161c6ecf9mr18135504ejc.101.1661881818088; Tue, 30 Aug 2022 10:50:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661881818; cv=none; d=google.com; s=arc-20160816; b=QKzgjI3fDT9mQfTzeTWfxEX0pyNQDL+5yBNL7JLzNMx6BppVyVLGfkYOPph5ivbKmZ PkcleYj2HGNP0QnESgL372JzG7QFMOhPoVIBq62qPdsE3D9iLEQmhYrqtYsJ5kAvmTdt 9fSsD5eMS/KIyRmmCXmvkyulIUCM0PK6bZoZgnAPqhx7WezVXeyr7YmfHItu9aPVSc9V Ab86nbTDNvDzVIMXosis2WbEAf44C8GAOnEpb4kxSug5p/yoJ2TfM4MeqDKTHk3ap8f4 VzfLNM/hC8v1VbsZC16F1M5jGY+5LZvnG3/+ij4w/miypoKcv3U7ErYF/abwbLxRyWy8 YgLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:dmarc-filter:delivered-to; bh=6DEv2ESLdRXwiK1bwovaKcucVwYeTnS1bcfDOmrSxEE=; b=Wkh4nEyqsPSIcBK2mY8Pdt4irS5UL5smmoHRe3n+y/BRugpUNGZ/pQdjlVGwgtDgYH AZbdDykBFm7sZhPtRDGHpesE3PpGTaLqjXIm0kQULcCDn8ramfSqs7pLoPZU6MMtJ1NL YY6N7iL3lQLgNA/k3axAqVFMFww2GiP1gexR447AacUb3RmEKYarJgC6ywV3KTwjc987 xdlE08LjCNZrigbAuvy2diT+4AnFRJM0PZ0UP0Suj9yRkj1drXoK9vUuKYTSVMIJv8Zi ybNNtlRoFymae6CJh2Ivrs9sq0eR/VpFXM/+FwWBst3pBxh1XzpEZEI87Fav/nkEDPy3 X9RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=w6jyMmYq; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id v16-20020a1709067d9000b0073d19e6ce0bsi8085820ejo.301.2022.08.30.10.50.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Aug 2022 10:50:18 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=fail header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=w6jyMmYq; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EED7C3AA889F for ; Tue, 30 Aug 2022 17:49:28 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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-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 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 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: collison@rivosinc.com, gnu-toolchain@rivosinc.com, Vineet Gupta , kito.cheng@gmail.com, Philipp Tomsich Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1742609388854646105?= X-GMAIL-MSGID: =?utf-8?q?1742609388854646105?= 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. */