[PATCH] D18955: [ARM] Avoid switching ARM/Thumb mode on .arch/.cpu directive
Renato Golin via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 11 05:37:33 PDT 2016
rengolin accepted this revision.
rengolin added a comment.
This revision is now accepted and ready to land.
Hum, this is an interesting one, and is probably only relevant for v6M and v7M.
I don't like deviating from what GNU tools do, but in this case, I don't see an easy solution.
The problem in doing this is that Clang users will have trouble using GAS, since they won't need the .code 16 for Clang, but will for GAS. The fix is easy, though, just add another .code 16 and job's done, so I agree this is not a big deal.
GCC already adds .code directives on inline assembly, and that has caused us some grief, but again, nothing serious, just a bit ugly.
Since this is no-man's land, and the change is mostly harmless, I'm ok with it (with the two extra tests).
LGTM. Thanks!
================
Comment at: test/MC/ARM/directive-arch-mode-switch.s:25
@@ +24,3 @@
+@ CHECK-NOT: .code
+@ CHECK: .arch armv7-a
+@ CHECK-NOT: .code
----------------
Add two .cpu tests, for coverage. Ex. v7 -> M0 -> A9
Repository:
rL LLVM
http://reviews.llvm.org/D18955
More information about the llvm-commits
mailing list