Message ID | 20221111130221.541603-1-oriachiuan@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 98D2E3858D39 for <patchwork@sourceware.org>; Fri, 11 Nov 2022 13:03:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 98D2E3858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668171780; 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=NT4KwGOfTEgo882eh1zHQFONukf1GBMyDuthSYtZLoDgfPV8yIViIO39wS90tBYmV pE89l0dZrbEWfy3oYUMfb6XRHsetTOM8y+8mqBK+vwE4lkZJB4Rxcxs95lSQsSKwq1 oH7nNVe/pogMASGvBdUCWCHb/oxZmM8RHHHHbeu0= 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-Google-Smtp-Source: AA0mqf4gDfK+AKM10mkTyNJYslNZJWi7WVd8mBW0w9lo0TSUW6siXnqpNR0kPFGwetWzIW608tFhUQ== 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+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
fix small const data for riscv
|
|
Commit Message
Yixuan Chen
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;