Message ID | 000401cd8057$8d1b0240$a75106c0$@guo@arm.com |
---|---|
State | New |
Headers | show |
On 22/08/12 12:16, Terry Guo wrote: > >>> >>> Due to the impact of ARM UAL, the Thumb1 and Thumb2 mode use LSRS >>> instruction while the ARM mode uses MOVS instruction. So the >> following case >>> is updated accordingly. Is it OK to trunk? >>> >>> BR, >>> Terry >>> >>> 2012-08-21 Terry Guo <terry.guo@arm.com> >>> >>> * gcc.target/arm/combine-movs.c: Check movs for ARM mode >>> and lsrs for other mode. >>> >> >> This can't be right. Thumb1 doesn't use unified syntax. >> >> R. >> > > oops. You are right. Sorry for making such obvious mistake. > Here is patch updated to distinguish ARM and Thumb2. > Tested for Thumb1, Thumb2 and ARM modes. No regression. > > Is it OK? > > BR, > Terry > > 2012-08-21 Terry Guo <terry.guo@arm.com> > > * gcc.target/arm/combine-movs.c: Check movs for ARM mode > and lsrs for Thumb2 mode. > > OK. R.
> -----Original Message----- > From: Richard Earnshaw > Sent: Wednesday, August 22, 2012 10:00 PM > To: Terry Guo > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [Patch ARM] Update the test case to differ movs and lsrs > for ARM mode and non-ARM mode > > On 22/08/12 12:16, Terry Guo wrote: > > > >>> > >>> Due to the impact of ARM UAL, the Thumb1 and Thumb2 mode use LSRS > >>> instruction while the ARM mode uses MOVS instruction. So the > >> following case > >>> is updated accordingly. Is it OK to trunk? > >>> > >>> BR, > >>> Terry > >>> > >>> 2012-08-21 Terry Guo <terry.guo@arm.com> > >>> > >>> * gcc.target/arm/combine-movs.c: Check movs for ARM mode > >>> and lsrs for other mode. > >>> > >> > >> This can't be right. Thumb1 doesn't use unified syntax. > >> > >> R. > >> > > > > oops. You are right. Sorry for making such obvious mistake. > > Here is patch updated to distinguish ARM and Thumb2. > > Tested for Thumb1, Thumb2 and ARM modes. No regression. > > > > Is it OK? > > > > BR, > > Terry > > > > 2012-08-21 Terry Guo <terry.guo@arm.com> > > > > * gcc.target/arm/combine-movs.c: Check movs for ARM mode > > and lsrs for Thumb2 mode. > > > > > > OK. > > R. Hi Richard, Is it ok to apply this fix to gcc 4.7 branch? BR, Terry
diff --git a/gcc/testsuite/gcc.target/arm/combine-movs.c b/gcc/testsuite/gcc.target/arm/combine-movs.c index 4209a33..3e36033 100644 --- a/gcc/testsuite/gcc.target/arm/combine-movs.c +++ b/gcc/testsuite/gcc.target/arm/combine-movs.c @@ -9,4 +9,5 @@ void foo (unsigned long r[], unsigned int d) r[i] = 0; } -/* { dg-final { scan-assembler "movs\tr\[0-9\]" } } */ +/* { dg-final { scan-assembler "lsrs\tr\[0-9\]" { target arm_thumb2_ok } } } */