Message ID | 5811D626.6030000@foss.arm.com |
---|---|
State | New |
Headers | show |
On 27/10/16 11:25, Renlin Li wrote: > Hi all, > > This a simple patch to fix gcc.target/aarch64/pr66912.c. > It's a test case only applicable to small memory model which is the default > one. > /* { dg-final { scan-assembler ":got(page_lo15)?:n_common" } } */ i think this is supposed to work on tiny and small model as well. (:got:var vs :gotpage_lo15:var) it will have to be updated for large model when we have support for that. > It has been tested to run only when the memory model is small. > Okay to commit? > > Regards, > Renlin Li > > gcc/testsuite/ChangeLog: > > 2016-10-27 Renlin Li <renlin.li@arm.com> > > * gcc.target/aarch64/pr66912.c: Skip tiny and large memory model.
Hi, On 27/10/16 11:48, Szabolcs Nagy wrote: > On 27/10/16 11:25, Renlin Li wrote: >> Hi all, >> >> This a simple patch to fix gcc.target/aarch64/pr66912.c. >> It's a test case only applicable to small memory model which is the default >> one. >> > > /* { dg-final { scan-assembler ":got(page_lo15)?:n_common" } } */ > > i think this is supposed to work on tiny and small model as well. > (:got:var vs :gotpage_lo15:var) > Sorry, I didn't aware it's a regex which will match both. > it will have to be updated for large model when we have support for that. yes, large memory model will have different relocation for this case, which will not be caught by this pattern. Regards, Renlin > >> It has been tested to run only when the memory model is small. >> Okay to commit? >> >> Regards, >> Renlin Li >> >> gcc/testsuite/ChangeLog: >> >> 2016-10-27 Renlin Li <renlin.li@arm.com> >> >> * gcc.target/aarch64/pr66912.c: Skip tiny and large memory model. >
On Thu, Oct 27, 2016 at 4:24 AM, Renlin Li <renlin.li@foss.arm.com> wrote: > Hi, > > On 27/10/16 11:48, Szabolcs Nagy wrote: >> >> On 27/10/16 11:25, Renlin Li wrote: >>> >>> Hi all, >>> >>> This a simple patch to fix gcc.target/aarch64/pr66912.c. >>> It's a test case only applicable to small memory model which is the >>> default >>> one. >>> >> >> /* { dg-final { scan-assembler ":got(page_lo15)?:n_common" } } */ >> >> i think this is supposed to work on tiny and small model as well. >> (:got:var vs :gotpage_lo15:var) >> > Sorry, I didn't aware it's a regex which will match both. > >> it will have to be updated for large model when we have support for that. > > > yes, large memory model will have different relocation for this case, which > will > not be caught by this pattern. It also fails for ILP32. I have not looked into the assembler output there yet. Thanks, Andrew > > Regards, > Renlin > > >> >>> It has been tested to run only when the memory model is small. >>> Okay to commit? >>> >>> Regards, >>> Renlin Li >>> >>> gcc/testsuite/ChangeLog: >>> >>> 2016-10-27 Renlin Li <renlin.li@arm.com> >>> >>> * gcc.target/aarch64/pr66912.c: Skip tiny and large memory model. >> >> >
On 27/10/16 16:28, Andrew Pinski wrote: > On Thu, Oct 27, 2016 at 4:24 AM, Renlin Li <renlin.li@foss.arm.com> wrote: >> Hi, >> >> On 27/10/16 11:48, Szabolcs Nagy wrote: >>> >>> On 27/10/16 11:25, Renlin Li wrote: >>>> >>>> Hi all, >>>> >>>> This a simple patch to fix gcc.target/aarch64/pr66912.c. >>>> It's a test case only applicable to small memory model which is the >>>> default >>>> one. >>>> >>> >>> /* { dg-final { scan-assembler ":got(page_lo15)?:n_common" } } */ >>> >>> i think this is supposed to work on tiny and small model as well. >>> (:got:var vs :gotpage_lo15:var) >>> >> Sorry, I didn't aware it's a regex which will match both. >> >>> it will have to be updated for large model when we have support for that. >> >> >> yes, large memory model will have different relocation for this case, which >> will >> not be caught by this pattern. > > > It also fails for ILP32. I have not looked into the assembler output there yet. > Hi Andrew, For ILP32, the relocation will be R_AARCH64_LD32_GOTPAGE_LO14 in small memory model. So the string modifier would be "gotpage_lo14" Regards, Renlin > Thanks, > Andrew > >> >> Regards, >> Renlin >> >> >>> >>>> It has been tested to run only when the memory model is small. >>>> Okay to commit? >>>> >>>> Regards, >>>> Renlin Li >>>> >>>> gcc/testsuite/ChangeLog: >>>> >>>> 2016-10-27 Renlin Li <renlin.li@arm.com> >>>> >>>> * gcc.target/aarch64/pr66912.c: Skip tiny and large memory model. >>> >>> >>
commit 364538b449d62c9a411b31021bdd9f355d36edf1 Author: Renlin Li <renlin.li@arm.com> Date: Wed Jan 6 14:00:16 2016 +0000 fix pr66912.c diff --git a/gcc/testsuite/gcc.target/aarch64/pr66912.c b/gcc/testsuite/gcc.target/aarch64/pr66912.c index b8aabcd..be07641 100644 --- a/gcc/testsuite/gcc.target/aarch64/pr66912.c +++ b/gcc/testsuite/gcc.target/aarch64/pr66912.c @@ -1,5 +1,7 @@ /* { dg-do compile { target *-*-linux* } } */ +/* { dg-require-effective-target aarch64_small_fpic } */ /* { dg-options "-O2 -fpic" } */ +/* { dg-skip-if "small memory model" { aarch64*-*-* } { "-mcmodel=tiny" "-mcmodel=large" } { "" } } */ __attribute__((visibility("protected"))) int n_common;