| 1 |
/* Test for switching architectures during compilation. */ |
| 2 |
/* { dg-skip-if "instruction not valid on thumb" { *-*-* } { "-mthumb" } { "" } } */ |
| 3 |
/* { dg-do assemble } */ |
| 4 |
/* { dg-require-effective-target arm_arm_ok } */ |
| 5 |
/* { dg-require-effective-target arm_arch_v5te_arm_ok } */ |
| 6 |
/* { dg-additional-options "-Wall -O2 -std=gnu99" } */ |
| 7 |
/* { dg-add-options arm_arch_v5te_arm } */ |
| 8 |
|
| 9 |
#pragma GCC target ("arch=armv6+fp") |
| 10 |
int test_assembly (int hi, int lo) |
| 11 |
{ |
| 12 |
int res; |
| 13 |
__asm__ __volatile__ ( |
| 14 |
"uxtah %0, %1, %2\n" |
| 15 |
: "=r" (res) |
| 16 |
: "r" (hi), "r" (lo)); |
| 17 |
return res; |
| 18 |
} |
| 19 |
|