From: Palmer Dabbelt <palmer@dabbelt.com>
To: gcc-patches@gcc.gnu.org
Cc: oriachiuan@gmail.com, gcc-patches@gcc.gnu.org,
Kito Cheng <kito.cheng@gmail.com>,
Andrew Waterman <andrew@sifive.com>
Subject: Re: [PATCH] fix small const data for riscv
Date: Fri, 11 Nov 2022 12:34:11 -0800 (PST) [thread overview]
Message-ID: <mhng-cd05452d-c393-463d-bd7f-3ae9973c573b@palmer-ri-x1c9a> (raw)
In-Reply-To: <CA+=Sn1=75FSieYsHriQ8Lr_Ar_Rvcu560rUK84q750fSBQCzAA@mail.gmail.com>
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
>>
prev parent reply other threads:[~2022-11-11 20:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-11 13:02 Oria Chen
2022-11-11 19:56 ` Andrew Pinski
2022-11-11 20:34 ` Palmer Dabbelt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=mhng-cd05452d-c393-463d-bd7f-3ae9973c573b@palmer-ri-x1c9a \
--to=palmer@dabbelt.com \
--cc=andrew@sifive.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=kito.cheng@gmail.com \
--cc=oriachiuan@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).