Re: [PATCH, GCC/testsuite/ARM] Enable mov?i_movw tests on ARM and big endian
On 12/10/16 17:01, Christophe Lyon wrote: On 12 October 2016 at 17:50, Kyrill Tkachov wrote: On 12/10/16 16:29, Thomas Preudhomme wrote: Sorry :-( Here you are. Cheers, Thomas On 12/10/16 16:25, Kyrill Tkachov wrote: On 12/10/16 16:21, Thomas Preudhomme wrote: Hi, As reported by Christophe Lyon, gcc.target/arm/movdi_movw test fails on big endian targets. This is because on big endian targets the low bits of a 64bit value would be in the highest numbered register of a pair rather than the lowest numbered register as on little endian targets. This patch fixes that by allowing both r0 and r1. It also changes effective target to use arm_thumb2_ok instead of arm_thumb2 to allow the test on ARM mode targets. ChangeLog entry is as follows: *** gcc/testsuite/ChangeLog *** 2016-10-11 Thomas Preud'homme * gcc.target/arm/movhi_movw.c: Enable test for ARM mode. * gcc.target/arm/movsi_movw.c: Likewise. * gcc.target/arm/movdi_movw.c: Likewise and adapt scan-assembler directive to work on big endian targets. Tested testcases with armeb-none-eabi for -march=armv8-a. Is this ok for trunk? Best regards, Thomas -ERRNOPATCH. Thanks, Kyrill --- a/gcc/testsuite/gcc.target/arm/movdi_movw.c +++ b/gcc/testsuite/gcc.target/arm/movdi_movw.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { arm_thumb2 || arm_thumb1_movt_ok } } } */ +/* { dg-do compile { target { arm_thumb2_ok || arm_thumb1_movt_ok } } } */ what is the purpose of arm_thumb2_ok || arm_thumb1_movt_ok if you do not use -mthumb in dg-options? Checking whether movw is available, otherwise the test would fail. This condition ensures that the -march or -mcpu passed indicates either a Thumb-2 capable target or a target with Thumb-1 and movw such as ARMv8-M. Best regards, Thomas
Re: [PATCH, GCC/testsuite/ARM] Enable mov?i_movw tests on ARM and big endian
On 12 October 2016 at 17:50, Kyrill Tkachov wrote: > > On 12/10/16 16:29, Thomas Preudhomme wrote: >> >> Sorry :-( >> >> Here you are. >> >> Cheers, >> >> Thomas >> >> On 12/10/16 16:25, Kyrill Tkachov wrote: >>> >>> >>> On 12/10/16 16:21, Thomas Preudhomme wrote: Hi, As reported by Christophe Lyon, gcc.target/arm/movdi_movw test fails on big endian targets. This is because on big endian targets the low bits of a 64bit value would be in the highest numbered register of a pair rather than the lowest numbered register as on little endian targets. This patch fixes that by allowing both r0 and r1. It also changes effective target to use arm_thumb2_ok instead of arm_thumb2 to allow the test on ARM mode targets. ChangeLog entry is as follows: *** gcc/testsuite/ChangeLog *** 2016-10-11 Thomas Preud'homme * gcc.target/arm/movhi_movw.c: Enable test for ARM mode. * gcc.target/arm/movsi_movw.c: Likewise. * gcc.target/arm/movdi_movw.c: Likewise and adapt scan-assembler directive to work on big endian targets. Tested testcases with armeb-none-eabi for -march=armv8-a. Is this ok for trunk? Best regards, Thomas >>> >>> -ERRNOPATCH. >>> Thanks, >>> Kyrill > > > --- a/gcc/testsuite/gcc.target/arm/movdi_movw.c > +++ b/gcc/testsuite/gcc.target/arm/movdi_movw.c > @@ -1,4 +1,4 @@ > -/* { dg-do compile { target { arm_thumb2 || arm_thumb1_movt_ok } } } */ > +/* { dg-do compile { target { arm_thumb2_ok || arm_thumb1_movt_ok } } } */ what is the purpose of arm_thumb2_ok || arm_thumb1_movt_ok if you do not use -mthumb in dg-options? > /* { dg-options "-O2" } */ > long long > @@ -7,4 +7,4 @@ movdi (int a) >return 0xF0F0; > } > -/* { dg-final { scan-assembler-times "movw\tr0, #61680" 1 } } */ > +/* { dg-final { scan-assembler-times "movw\tr\[01\], #61680" 1 } } */ > > Can you please add a comment above the scan-assembler to mention the > big-endian case. > You can do that as a pre-approved followup or as a respin of this patch. > Ok for trunk if you want to do it as a followup. > > Thanks, > Kyrill >
Re: [PATCH, GCC/testsuite/ARM] Enable mov?i_movw tests on ARM and big endian
On 12/10/16 16:29, Thomas Preudhomme wrote: Sorry :-( Here you are. Cheers, Thomas On 12/10/16 16:25, Kyrill Tkachov wrote: On 12/10/16 16:21, Thomas Preudhomme wrote: Hi, As reported by Christophe Lyon, gcc.target/arm/movdi_movw test fails on big endian targets. This is because on big endian targets the low bits of a 64bit value would be in the highest numbered register of a pair rather than the lowest numbered register as on little endian targets. This patch fixes that by allowing both r0 and r1. It also changes effective target to use arm_thumb2_ok instead of arm_thumb2 to allow the test on ARM mode targets. ChangeLog entry is as follows: *** gcc/testsuite/ChangeLog *** 2016-10-11 Thomas Preud'homme * gcc.target/arm/movhi_movw.c: Enable test for ARM mode. * gcc.target/arm/movsi_movw.c: Likewise. * gcc.target/arm/movdi_movw.c: Likewise and adapt scan-assembler directive to work on big endian targets. Tested testcases with armeb-none-eabi for -march=armv8-a. Is this ok for trunk? Best regards, Thomas -ERRNOPATCH. Thanks, Kyrill --- a/gcc/testsuite/gcc.target/arm/movdi_movw.c +++ b/gcc/testsuite/gcc.target/arm/movdi_movw.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { arm_thumb2 || arm_thumb1_movt_ok } } } */ +/* { dg-do compile { target { arm_thumb2_ok || arm_thumb1_movt_ok } } } */ /* { dg-options "-O2" } */ long long @@ -7,4 +7,4 @@ movdi (int a) return 0xF0F0; } -/* { dg-final { scan-assembler-times "movw\tr0, #61680" 1 } } */ +/* { dg-final { scan-assembler-times "movw\tr\[01\], #61680" 1 } } */ Can you please add a comment above the scan-assembler to mention the big-endian case. You can do that as a pre-approved followup or as a respin of this patch. Ok for trunk if you want to do it as a followup. Thanks, Kyrill
Re: [PATCH, GCC/testsuite/ARM] Enable mov?i_movw tests on ARM and big endian
Sorry :-( Here you are. Cheers, Thomas On 12/10/16 16:25, Kyrill Tkachov wrote: On 12/10/16 16:21, Thomas Preudhomme wrote: Hi, As reported by Christophe Lyon, gcc.target/arm/movdi_movw test fails on big endian targets. This is because on big endian targets the low bits of a 64bit value would be in the highest numbered register of a pair rather than the lowest numbered register as on little endian targets. This patch fixes that by allowing both r0 and r1. It also changes effective target to use arm_thumb2_ok instead of arm_thumb2 to allow the test on ARM mode targets. ChangeLog entry is as follows: *** gcc/testsuite/ChangeLog *** 2016-10-11 Thomas Preud'homme * gcc.target/arm/movhi_movw.c: Enable test for ARM mode. * gcc.target/arm/movsi_movw.c: Likewise. * gcc.target/arm/movdi_movw.c: Likewise and adapt scan-assembler directive to work on big endian targets. Tested testcases with armeb-none-eabi for -march=armv8-a. Is this ok for trunk? Best regards, Thomas -ERRNOPATCH. Thanks, Kyrill diff --git a/gcc/testsuite/gcc.target/arm/movdi_movw.c b/gcc/testsuite/gcc.target/arm/movdi_movw.c index 0f6b839da614c56766e92e3da125551df47890fc..253d0b26d2ebbd0e2c006b79e7cd2fc8312ff828 100644 --- a/gcc/testsuite/gcc.target/arm/movdi_movw.c +++ b/gcc/testsuite/gcc.target/arm/movdi_movw.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { arm_thumb2 || arm_thumb1_movt_ok } } } */ +/* { dg-do compile { target { arm_thumb2_ok || arm_thumb1_movt_ok } } } */ /* { dg-options "-O2" } */ long long @@ -7,4 +7,4 @@ movdi (int a) return 0xF0F0; } -/* { dg-final { scan-assembler-times "movw\tr0, #61680" 1 } } */ +/* { dg-final { scan-assembler-times "movw\tr\[01\], #61680" 1 } } */ diff --git a/gcc/testsuite/gcc.target/arm/movhi_movw.c b/gcc/testsuite/gcc.target/arm/movhi_movw.c index b097a8a019c74507f0c182af6ba5cf526369564b..d0d2bbb418e0d76b5438c5fcd84b4ee069b01ac7 100644 --- a/gcc/testsuite/gcc.target/arm/movhi_movw.c +++ b/gcc/testsuite/gcc.target/arm/movhi_movw.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { arm_thumb2 || arm_thumb1_movt_ok } } } */ +/* { dg-do compile { target { arm_thumb2_ok || arm_thumb1_movt_ok } } } */ /* { dg-options "-O2" } */ short diff --git a/gcc/testsuite/gcc.target/arm/movsi_movw.c b/gcc/testsuite/gcc.target/arm/movsi_movw.c index d50906e76ab412ead71ff576d2f28d520234f58d..349705813971d035235898bf40771b1b17b64cca 100644 --- a/gcc/testsuite/gcc.target/arm/movsi_movw.c +++ b/gcc/testsuite/gcc.target/arm/movsi_movw.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { arm_thumb2 || arm_thumb1_movt_ok } } } */ +/* { dg-do compile { target { arm_thumb2_ok || arm_thumb1_movt_ok } } } */ /* { dg-options "-O2" } */ int
Re: [PATCH, GCC/testsuite/ARM] Enable mov?i_movw tests on ARM and big endian
On 12/10/16 16:21, Thomas Preudhomme wrote: Hi, As reported by Christophe Lyon, gcc.target/arm/movdi_movw test fails on big endian targets. This is because on big endian targets the low bits of a 64bit value would be in the highest numbered register of a pair rather than the lowest numbered register as on little endian targets. This patch fixes that by allowing both r0 and r1. It also changes effective target to use arm_thumb2_ok instead of arm_thumb2 to allow the test on ARM mode targets. ChangeLog entry is as follows: *** gcc/testsuite/ChangeLog *** 2016-10-11 Thomas Preud'homme * gcc.target/arm/movhi_movw.c: Enable test for ARM mode. * gcc.target/arm/movsi_movw.c: Likewise. * gcc.target/arm/movdi_movw.c: Likewise and adapt scan-assembler directive to work on big endian targets. Tested testcases with armeb-none-eabi for -march=armv8-a. Is this ok for trunk? Best regards, Thomas -ERRNOPATCH. Thanks, Kyrill
[PATCH, GCC/testsuite/ARM] Enable mov?i_movw tests on ARM and big endian
Hi, As reported by Christophe Lyon, gcc.target/arm/movdi_movw test fails on big endian targets. This is because on big endian targets the low bits of a 64bit value would be in the highest numbered register of a pair rather than the lowest numbered register as on little endian targets. This patch fixes that by allowing both r0 and r1. It also changes effective target to use arm_thumb2_ok instead of arm_thumb2 to allow the test on ARM mode targets. ChangeLog entry is as follows: *** gcc/testsuite/ChangeLog *** 2016-10-11 Thomas Preud'homme * gcc.target/arm/movhi_movw.c: Enable test for ARM mode. * gcc.target/arm/movsi_movw.c: Likewise. * gcc.target/arm/movdi_movw.c: Likewise and adapt scan-assembler directive to work on big endian targets. Tested testcases with armeb-none-eabi for -march=armv8-a. Is this ok for trunk? Best regards, Thomas