summaryrefslogtreecommitdiff
path: root/gcc/config/arm/arm.h
diff options
context:
space:
mode:
authorramana <ramana@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-01 14:58:53 +0000
committerramana <ramana@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-01 14:58:53 +0000
commitb2ca3fb0b185603b5611c2916f388a16609bdf52 (patch)
tree5d55f640e781322ec4066f43f995a1399b6a9854 /gcc/config/arm/arm.h
parentf7c99751c37cfb690d4ef016fb095226784bc3a8 (diff)
downloadgcc-b2ca3fb0b185603b5611c2916f388a16609bdf52.tar.gz
Fix PR target/70496
While doing the unified asm rewrite - I inadvertently changed the meaning of ASM_APP_OFF which causes failures when folks who know what they are doing switch between arm and thumb states within a function. The intent of the unified asm rewrite was not to affect any inline assembler code in that it would remain in divided syntax by default and switching back to unified asm in normal compiled code after the inline assembler block. Thanks to Jim Wilson for pointing it out on the linaro list. Fixed thusly and a test is added. Tested arm-none-eabi cross and applied. Ramana 2016-04-01 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> PR target/70496 * config/arm/arm.h (ASM_APP_OFF): Handle TARGET_ARM and TARGET_THUMB. 2016-04-01 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> PR target/70496 * gcc.target/arm/pr70496.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234675 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/arm/arm.h')
-rw-r--r--gcc/config/arm/arm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 63521403f6c..ad123dde991 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -2037,7 +2037,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