Patchwork [testcase,arm] Adjust the negative offset of fp memory access in vfp-1.c

login
register
mail settings
Submitter Carrot Wei
Date July 20, 2011, 8:30 a.m.
Message ID <CAEe8uEC4wwztiC-yZTCBrS5CF9X=VN8wV3yu68QRBWEyAaOt6w@mail.gmail.com>
Download mbox | patch
Permalink /patch/105598/
State New
Headers show

Comments

Carrot Wei - July 20, 2011, 8:30 a.m.
Hi

The patch r169271 conservatively limits the offset of fp memory access to
(-256..1024), but didn't adjust the related test case, so vfp-1.c fails in
thumb2 mode after the patch. This patch modifies test case vfp-1.c accordingly.

Tested with
make check-gcc RUNTESTFLAGS="--target_board=arm-sim/thumb/arch=armv7-a
arm.exp=vfp-1.c"

OK for trunk and 4.6 branch?

thanks
Carrot


2011-07-20  Wei Guozhi  <cltang@codesourcery.com>

	* gcc.target/arm/vfp-1.c (test_ldst): Adjust negative offset.
Carrot Wei - July 20, 2011, 8:33 a.m.
Oops, the ChangeLog should be

2011-07-20  Wei Guozhi  <carrot@google.com>

	* gcc.target/arm/vfp-1.c (test_ldst): Adjust negative offset.


thanks
Carrot

On Wed, Jul 20, 2011 at 4:30 PM, Carrot Wei <carrot@google.com> wrote:
> Hi
>
> The patch r169271 conservatively limits the offset of fp memory access to
> (-256..1024), but didn't adjust the related test case, so vfp-1.c fails in
> thumb2 mode after the patch. This patch modifies test case vfp-1.c accordingly.
>
> Tested with
> make check-gcc RUNTESTFLAGS="--target_board=arm-sim/thumb/arch=armv7-a
> arm.exp=vfp-1.c"
>
> OK for trunk and 4.6 branch?
>
> thanks
> Carrot
>
>
> 2011-07-20  Wei Guozhi  <cltang@codesourcery.com>
>
>        * gcc.target/arm/vfp-1.c (test_ldst): Adjust negative offset.
>
>
> Index: gcc.target/arm/vfp-1.c
> ===================================================================
> --- gcc.target/arm/vfp-1.c      (revision 176495)
> +++ gcc.target/arm/vfp-1.c      (working copy)
> @@ -127,13 +127,13 @@ void test_convert () {
>
>  void test_ldst (float f[], double d[]) {
>   /* { dg-final { scan-assembler "flds.+ \\\[r0, #1020\\\]" } } */
> -  /* { dg-final { scan-assembler "flds.+ \\\[r0, #-1020\\\]" } } */
> +  /* { dg-final { scan-assembler "flds.+ \\\[r0, #-252\\\]" } } */
>   /* { dg-final { scan-assembler "add.+ r0, #1024" } } */
>   /* { dg-final { scan-assembler "fsts.+ \\\[r0, #0\\\]\n" } } */
> -  f[256] = f[255] + f[-255];
> +  f[256] = f[255] + f[-63];
>
>   /* { dg-final { scan-assembler "fldd.+ \\\[r1, #1016\\\]" } } */
> -  /* { dg-final { scan-assembler "fldd.+ \\\[r1, #-1016\\\]" } } */
> +  /* { dg-final { scan-assembler "fldd.+ \\\[r1, #-248\\\]" } } */
>   /* { dg-final { scan-assembler "fstd.+ \\\[r1, #256\\\]" } } */
> -  d[32] = d[127] + d[-127];
> +  d[32] = d[127] + d[-31];
>  }
>
Carrot Wei - July 31, 2011, 11:30 a.m.
Ping

On Wed, Jul 20, 2011 at 4:33 PM, Carrot Wei <carrot@google.com> wrote:
> Oops, the ChangeLog should be
>
> 2011-07-20  Wei Guozhi  <carrot@google.com>
>
>        * gcc.target/arm/vfp-1.c (test_ldst): Adjust negative offset.
>
>
> thanks
> Carrot
>
> On Wed, Jul 20, 2011 at 4:30 PM, Carrot Wei <carrot@google.com> wrote:
>> Hi
>>
>> The patch r169271 conservatively limits the offset of fp memory access to
>> (-256..1024), but didn't adjust the related test case, so vfp-1.c fails in
>> thumb2 mode after the patch. This patch modifies test case vfp-1.c accordingly.
>>
>> Tested with
>> make check-gcc RUNTESTFLAGS="--target_board=arm-sim/thumb/arch=armv7-a
>> arm.exp=vfp-1.c"
>>
>> OK for trunk and 4.6 branch?
>>
>> thanks
>> Carrot
>>
>>
>> 2011-07-20  Wei Guozhi  <cltang@codesourcery.com>
>>
>>        * gcc.target/arm/vfp-1.c (test_ldst): Adjust negative offset.
>>
>>
>> Index: gcc.target/arm/vfp-1.c
>> ===================================================================
>> --- gcc.target/arm/vfp-1.c      (revision 176495)
>> +++ gcc.target/arm/vfp-1.c      (working copy)
>> @@ -127,13 +127,13 @@ void test_convert () {
>>
>>  void test_ldst (float f[], double d[]) {
>>   /* { dg-final { scan-assembler "flds.+ \\\[r0, #1020\\\]" } } */
>> -  /* { dg-final { scan-assembler "flds.+ \\\[r0, #-1020\\\]" } } */
>> +  /* { dg-final { scan-assembler "flds.+ \\\[r0, #-252\\\]" } } */
>>   /* { dg-final { scan-assembler "add.+ r0, #1024" } } */
>>   /* { dg-final { scan-assembler "fsts.+ \\\[r0, #0\\\]\n" } } */
>> -  f[256] = f[255] + f[-255];
>> +  f[256] = f[255] + f[-63];
>>
>>   /* { dg-final { scan-assembler "fldd.+ \\\[r1, #1016\\\]" } } */
>> -  /* { dg-final { scan-assembler "fldd.+ \\\[r1, #-1016\\\]" } } */
>> +  /* { dg-final { scan-assembler "fldd.+ \\\[r1, #-248\\\]" } } */
>>   /* { dg-final { scan-assembler "fstd.+ \\\[r1, #256\\\]" } } */
>> -  d[32] = d[127] + d[-127];
>> +  d[32] = d[127] + d[-31];
>>  }
>>
>

Patch

Index: gcc.target/arm/vfp-1.c
===================================================================
--- gcc.target/arm/vfp-1.c	(revision 176495)
+++ gcc.target/arm/vfp-1.c	(working copy)
@@ -127,13 +127,13 @@  void test_convert () {

 void test_ldst (float f[], double d[]) {
   /* { dg-final { scan-assembler "flds.+ \\\[r0, #1020\\\]" } } */
-  /* { dg-final { scan-assembler "flds.+ \\\[r0, #-1020\\\]" } } */
+  /* { dg-final { scan-assembler "flds.+ \\\[r0, #-252\\\]" } } */
   /* { dg-final { scan-assembler "add.+ r0, #1024" } } */
   /* { dg-final { scan-assembler "fsts.+ \\\[r0, #0\\\]\n" } } */
-  f[256] = f[255] + f[-255];
+  f[256] = f[255] + f[-63];

   /* { dg-final { scan-assembler "fldd.+ \\\[r1, #1016\\\]" } } */
-  /* { dg-final { scan-assembler "fldd.+ \\\[r1, #-1016\\\]" } } */
+  /* { dg-final { scan-assembler "fldd.+ \\\[r1, #-248\\\]" } } */
   /* { dg-final { scan-assembler "fstd.+ \\\[r1, #256\\\]" } } */
-  d[32] = d[127] + d[-127];
+  d[32] = d[127] + d[-31];
 }