]> matita.cs.unibo.it Git - pkg-cerco/acc.git/blob - tests/GCCTestSuite/arm-scd42-2.c
Package description and copyright added.
[pkg-cerco/acc.git] / tests / GCCTestSuite / arm-scd42-2.c
1 /* Verify that mov is preferred on XScale for loading a 2 byte constant. */
2 /* { dg-do compile } */
3 /* { dg-options "-mcpu=xscale -O" } */
4 /* { dg-require-effective-target arm32 } */
5
6 unsigned load2(void) __attribute__ ((naked));
7 unsigned load2(void)
8 {
9     /* Best code would be:
10        mov r0, =272
11        add r0, r0, =1
12        mov pc, lr */
13
14     return 273;
15 }
16
17 /* { dg-final { scan-assembler "mov\[   ].*272" } } */