blob: 031b93657dade0e3cca91753cf00b8cef0b07ee7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/* 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-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\[ ].*" } } */
|