PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / arm / scd42-1.c
blobbe60e6490152901e362ac1fd2e31a352b53f23b9
1 /* Verify that mov is preferred on XScale for loading a 1 byte constant. */
2 /* { dg-do compile } */
3 /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } { "-march=*" } { "-march=xscale" } } */
4 /* { dg-skip-if "Test is specific to Xscale" { arm*-*-* } { "-mcpu=*" } { "-mcpu=xscale" } } */
5 /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */
6 /* { dg-options "-mcpu=xscale -O -mfloat-abi=softfp" } */
8 unsigned load1(void) __attribute__ ((naked));
9 unsigned load1(void)
11 /* Best code would be:
12 mov r0, =17
13 mov pc, lr */
15 return 17;
18 /* { dg-final { scan-assembler "mov\[ ].*17" { target { arm_nothumb } } } } */
19 /* { dg-final { scan-assembler "movs\[ ].*17" { target { ! arm_nothumb } } } } */