Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.target / arm / scd42-1.c
blob2b8fc0b2bd7fe4856a425ed57bd7e60b11448562
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-require-effective-target arm_arch_v5te_ok } */
7 /* { dg-options "-mcpu=xscale -O -mfloat-abi=softfp" } */
9 unsigned load1(void) __attribute__ ((naked));
10 unsigned load1(void)
12 /* Best code would be:
13 mov r0, =17
14 mov pc, lr */
16 return 17;
19 /* { dg-final { scan-assembler "mov\[ ].*17" { target { arm_nothumb } } } } */
20 /* { dg-final { scan-assembler "movs\[ ].*17" { target { ! arm_nothumb } } } } */