Debian Codegraph @

gcc/testsuite/gcc.target/arm/scd42-2.c

raw
1 /* Verify that mov is preferred on XScale for loading a 2 byte constant. */
2 /* { dg-do compile } */
3 /* { dg-require-effective-target arm_cpu_xscale_arm_ok } */
4 /* { dg-options "-O" } */
5 /* { dg-add-options arm_cpu_xscale_arm } */
6
7 unsigned load2(void) __attribute__ ((naked));
8 unsigned load2(void)
9 {
10 /* Best code would be:
11 mov r0, =272
12 add r0, r0, =1
13 mov pc, lr */
14
15 return 273;
16 }
17
18 /* { dg-final { scan-assembler "mov\[ ].*272" } } */