diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2014-07-25 05:12:49 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2014-07-25 05:12:49 +0000 |
commit | 16e47ff42e7ec10b20152f74b98380856c0ad534 (patch) | |
tree | 0b8efe874a52dc681ac7154a3ca030182fb7030a /llvm/test | |
parent | 98c3c0f38a0f3ad952f60556a74e53276c1a6bc4 (diff) | |
download | bcm5719-llvm-16e47ff42e7ec10b20152f74b98380856c0ad534.tar.gz bcm5719-llvm-16e47ff42e7ec10b20152f74b98380856c0ad534.zip |
[ARM] In thumb mode, emit directive ".code 16" before file level inline
assembly instructions.
This is necessary to ensure ARM assembler switches to Thumb mode before it
starts assembling the file level inline assembly instructions at the beginning
of a .s file.
<rdar://problem/17757232>
llvm-svn: 213924
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/CodeGen/ARM/inlineasm-global.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/inlineasm-global.ll b/llvm/test/CodeGen/ARM/inlineasm-global.ll new file mode 100644 index 00000000000..d1a15e393a1 --- /dev/null +++ b/llvm/test/CodeGen/ARM/inlineasm-global.ll @@ -0,0 +1,13 @@ +; RUN: llc -march thumb -no-integrated-as %s -o - | FileCheck %s --check-prefix=THUMB +; RUN: llc -march arm -no-integrated-as %s -o - | FileCheck %s --check-prefix=ARM + +; In thumb mode, emit ".code 16" before global inline-asm instructions. + +; THUMB: .code 16 +; THUMB: stmib +; THUMB: .code 16 + +; ARM-NOT: .code 16 +; ARM: stmib + +module asm "stmib sp, {r0-r14};" |