diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/arm/g2.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/gcc.target/arm/g2.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/arm/g2.c b/gcc-4.9/gcc/testsuite/gcc.target/arm/g2.c new file mode 100644 index 000000000..85ba1906a --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gcc.target/arm/g2.c @@ -0,0 +1,22 @@ +/* Verify that hardware multiply is preferred on XScale. */ +/* { dg-do compile } */ +/* { dg-options "-mcpu=xscale -O2" } */ +/* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } { "-march=*" } { "-march=xscale" } } */ +/* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } { "-mcpu=*" } { "-mcpu=xscale" } } */ +/* { dg-skip-if "Test is specific to ARM mode" { arm*-*-* } { "-mthumb" } { "" } } */ +/* { dg-require-effective-target arm32 } */ + +/* Brett Gaines' test case. */ +unsigned BCPL(unsigned) __attribute__ ((naked)); +unsigned BCPL(unsigned seed) +{ + /* Best code would be: + ldr r1, =2147001325 + ldr r2, =715136305 + mla r0, r1, r0, r2 + mov pc, lr */ + + return seed * 2147001325U + 715136305U; +} + +/* { dg-final { scan-assembler "mla\[ ].*" } } */ |