Message ID | 20221111130221.541603-1-oriachiuan@gmail.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp725664wru; Fri, 11 Nov 2022 05:03:15 -0800 (PST) X-Google-Smtp-Source: AA0mqf4kKR6pGfoun2kPkjOi4PXnOClCQ5XZBEo2hIVEbux5BCt7vPuBDPZGeryZmNvNDcGGCJV1 X-Received: by 2002:a17:906:f20f:b0:7aa:23ac:608e with SMTP id gt15-20020a170906f20f00b007aa23ac608emr1681016ejb.450.1668171795860; Fri, 11 Nov 2022 05:03:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668171795; cv=none; d=google.com; s=arc-20160816; b=EXuMf+54ePogSgqmi0ecnr0dvvjg39LfSdSpVEML8GYsgc1Yq1Pko71FrD7LBMP/Eq CytCv/TcabFUIbZ1spSFauBe8ngU0FTVGYWblVaXmdWYDnpTpKZa71EwAHu2jGiOX+az iVSoASuuzgRislC37NTfDQc4BABNPCCsrZHMr0lF1UOa9Qoq70ge0EwMFG4o6dpfvkmY fdcyF4tjaTvYxEOmdS+7jGCE1YUgSnXndVnkpLFc2dE401uRUsSw9Hee82jo2IOGJTMX NfIjMlt2t1qSWlVoubzR5SJ38KewDdQexUSxkhy4RzPB/k9UG0+uUaqYghamOsjAiRjA cPNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=jWc1vcE1nzw418FQkIP3JUZtv98/VEVWS+2OWNBi+e8=; b=R4bVTU8E1UP+0l0Wi6nPbWWu25bbUQX922pmncCXflHgMyDL4L5QwHGcuNWptrTYn2 Yk7kRyzUI7bYRH34DDFYr526TxidOEZ48ulL/JesyPJGE6XuKhtaTIi13tUFbwJQWApM KyPB6WwstnGBqYkqFYzI02ykrqVpPsj9KHlnoLbclXMUedd0wq/b/m/Bw0GhgckHcZVg l3HyCTQx5b8gdwkApPKCsm3ztuPy/bCdhOv3NHRtpp0OZMHV0BB7u1WsBtSqXgZmHdLG ktO0aZa/+VfSXAY0aSWgsBo3uPur7D/eIXmp/CIi/4FwTWe9tl2FkQ54QVCehmTyJoNI 3AXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=IfxNBYco; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id g5-20020a50d0c5000000b00461bbc0f929si2074449edf.184.2022.11.11.05.03.15 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 05:03:15 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=IfxNBYco; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E15D43858C00 for <ouuuleilei@gmail.com>; Fri, 11 Nov 2022 13:03:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E15D43858C00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668171794; bh=jWc1vcE1nzw418FQkIP3JUZtv98/VEVWS+2OWNBi+e8=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=IfxNBYco1l4/SGFyQs5FTJdqxzK9P8DPe1s/AQukssXxrharw8/9rjRPcTkxHwU4y YB1HYwheCVhIzVMu6ng32z6T+TQr4TrkkOtaBWxO6Y72zbaoVl6KkcEcWGxWXu3hn7 WmM+M8sKR4vEdH2BiQN1KbauEEdV9Y63rJqLI+Rg= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by sourceware.org (Postfix) with ESMTPS id CE4393858D39 for <gcc-patches@gcc.gnu.org>; Fri, 11 Nov 2022 13:02:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CE4393858D39 Received: by mail-pl1-x62f.google.com with SMTP id l2so4177242pld.13 for <gcc-patches@gcc.gnu.org>; Fri, 11 Nov 2022 05:02:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jWc1vcE1nzw418FQkIP3JUZtv98/VEVWS+2OWNBi+e8=; b=dsx65Np7tKyHmLDxw42VzPA2v3ruEAf+1P3gWu/NAnIJq/dF9eRBBgeVejvyVinc4Q xy7eSCa9GzJcam46ZqEBKk+vF5prRXGnPDaiw7W1ZLpUk9aUCfVPR7czeeoDRaevOykj Kp98gfP8FbOeLJgr+ZVomim4naR9E4UlBHuB3HCvQsyei/B1IR6MxSk3nILIQpQrOpWs YToqg8rmXl3L+rj3KeYlX4GS7RHVeXpzM9Wk3/H+9rNy2Fp4ChxZzK2SnKT5SvQJUXQm hmDbfGkIO8+d8uo8UbCCKwh7uVMcba8hQBqMPvReLJtzAgkUdvnYT6LwE1YxF5KuaqIN IylA== X-Gm-Message-State: ANoB5plt5VOdLC9s9H00FKsEl1jVypK3flhVpp3sXUmuKpOGbo5hwAWL n93qxX5prYKpVmtNuBP3TUPKdkjHAhcUdVWjSf1DiA== X-Received: by 2002:a17:90b:46c2:b0:212:fbb8:bd02 with SMTP id jx2-20020a17090b46c200b00212fbb8bd02mr1836880pjb.29.1668171748582; Fri, 11 Nov 2022 05:02:28 -0800 (PST) Received: from ubuntu.. ([161.117.255.234]) by smtp.gmail.com with ESMTPSA id a11-20020aa7970b000000b00562664d5027sm1545251pfg.61.2022.11.11.05.02.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 05:02:28 -0800 (PST) To: gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com, andrew@sifive.com, Oria Chen <oriachiuan@gmail.com> Subject: [PATCH] fix small const data for riscv Date: Fri, 11 Nov 2022 21:02:21 +0800 Message-Id: <20221111130221.541603-1-oriachiuan@gmail.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Oria Chen via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Oria Chen <oriachiuan@gmail.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749204908783106990?= X-GMAIL-MSGID: =?utf-8?q?1749204908783106990?= |
Series |
fix small const data for riscv
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Oria Chiuan
Nov. 11, 2022, 1:02 p.m. UTC
gcc/testsuite ChangeLog: 2022-11-11 Oria Chen <oriachiuan@gmail.com> * gcc/testsuite/gcc.dg/pr25521.c: Add compile option "-msmall-data-limit=0" to avoid using .srodata section. --- gcc/testsuite/gcc.dg/pr25521.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On Fri, Nov 11, 2022 at 5:03 AM Oria Chen via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > gcc/testsuite ChangeLog: > > 2022-11-11 Oria Chen <oriachiuan@gmail.com> > > * gcc/testsuite/gcc.dg/pr25521.c: Add compile option "-msmall-data-limit=0" to avoid using .srodata section. I noticed g++.dg/cpp0x/constexpr-rom.C has some slightly different handling here. Seems like there should be a generic way to add -G0/-msmall-data-limit=0 if we don't want small data for a testcase rather than the current scheme of things. Thanks, Andrew Pinski > --- > gcc/testsuite/gcc.dg/pr25521.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/gcc/testsuite/gcc.dg/pr25521.c b/gcc/testsuite/gcc.dg/pr25521.c > index 74fe2ae6626..628ddf1a761 100644 > --- a/gcc/testsuite/gcc.dg/pr25521.c > +++ b/gcc/testsuite/gcc.dg/pr25521.c > @@ -2,7 +2,8 @@ > sections. > > { dg-require-effective-target elf } > - { dg-do compile } */ > + { dg-do compile } > + { dg-options "-msmall-data-limit=0" { target { riscv*-*-* } } } */ > > const volatile int foo = 30; > > -- > 2.37.2 >
On Fri, 11 Nov 2022 11:56:08 PST (-0800), gcc-patches@gcc.gnu.org wrote: > On Fri, Nov 11, 2022 at 5:03 AM Oria Chen via Gcc-patches > <gcc-patches@gcc.gnu.org> wrote: >> >> gcc/testsuite ChangeLog: >> >> 2022-11-11 Oria Chen <oriachiuan@gmail.com> >> >> * gcc/testsuite/gcc.dg/pr25521.c: Add compile option "-msmall-data-limit=0" to avoid using .srodata section. > > I noticed g++.dg/cpp0x/constexpr-rom.C has some slightly different > handling here. > Seems like there should be a generic way to add > -G0/-msmall-data-limit=0 if we don't want small data for a testcase > rather than the current scheme of things. There's also a few tests like these where we modified the regex to match .sadata in addition to .data, which fixes the problem on MIPS too. > > Thanks, > Andrew Pinski > >> --- >> gcc/testsuite/gcc.dg/pr25521.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/gcc/testsuite/gcc.dg/pr25521.c b/gcc/testsuite/gcc.dg/pr25521.c >> index 74fe2ae6626..628ddf1a761 100644 >> --- a/gcc/testsuite/gcc.dg/pr25521.c >> +++ b/gcc/testsuite/gcc.dg/pr25521.c >> @@ -2,7 +2,8 @@ >> sections. >> >> { dg-require-effective-target elf } >> - { dg-do compile } */ >> + { dg-do compile } >> + { dg-options "-msmall-data-limit=0" { target { riscv*-*-* } } } */ >> >> const volatile int foo = 30; >> >> -- >> 2.37.2 >>
diff --git a/gcc/testsuite/gcc.dg/pr25521.c b/gcc/testsuite/gcc.dg/pr25521.c index 74fe2ae6626..628ddf1a761 100644 --- a/gcc/testsuite/gcc.dg/pr25521.c +++ b/gcc/testsuite/gcc.dg/pr25521.c @@ -2,7 +2,8 @@ sections. { dg-require-effective-target elf } - { dg-do compile } */ + { dg-do compile } + { dg-options "-msmall-data-limit=0" { target { riscv*-*-* } } } */ const volatile int foo = 30;