111
|
1 /* Verify that mov is preferred on XScale for loading a 2 byte constant. */
|
|
2 /* { dg-do compile } */
|
|
3 /* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } { "-march=*" } { "-march=xscale" } } */
|
|
4 /* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } { "-mcpu=*" } { "-mcpu=xscale" } } */
|
|
5 /* { dg-skip-if "Test is specific to ARM mode" { arm*-*-* } { "-mthumb" } { "" } } */
|
|
6 /* { dg-require-effective-target arm32 } */
|
145
|
7 /* { dg-require-effective-target arm_arch_v5te_arm_ok } */
|
131
|
8 /* { dg-options "-mcpu=xscale -O -marm" } */
|
111
|
9
|
|
10 unsigned load2(void) __attribute__ ((naked));
|
|
11 unsigned load2(void)
|
|
12 {
|
|
13 /* Best code would be:
|
|
14 mov r0, =272
|
|
15 add r0, r0, =1
|
|
16 mov pc, lr */
|
|
17
|
|
18 return 273;
|
|
19 }
|
|
20
|
|
21 /* { dg-final { scan-assembler "mov\[ ].*272" } } */
|