diff options
-rw-r--r-- | gcc/config/arm/arm.h | 3 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/arm/pr70496.c | 13 |
2 files changed, 15 insertions, 1 deletions
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index 8da0ba2e266..a301d5b0210 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -2025,7 +2025,8 @@ extern int making_const_table; "\t.syntax divided\n") #undef ASM_APP_OFF -#define ASM_APP_OFF "\t.syntax unified\n" +#define ASM_APP_OFF (TARGET_ARM ? "\t.arm\n\t.syntax unified\n" : \ + "\t.thumb\n\t.syntax unified\n") /* Output a push or a pop instruction (only used when profiling). We can't push STATIC_CHAIN_REGNUM (r12) directly with Thumb-1. We know diff --git a/gcc/testsuite/gcc.target/arm/pr70496.c b/gcc/testsuite/gcc.target/arm/pr70496.c new file mode 100644 index 00000000000..d3ee0b505a8 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr70496.c @@ -0,0 +1,13 @@ +/* { dg-do assemble } */ +/* { dg-options "-mthumb -O2" } */ +/* { dg-require-effective-target arm_arm_ok } */ +/* { dg-require-effective-target arm_thumb2_ok } */ + +int i; +void +main (void) +{ + __asm__ volatile (".arm"); + i = 0; + __asm__ volatile ("\n cbz r0, 2f\n2:"); +} |