diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-01-02 13:40:08 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-01-02 13:40:08 +0000 |
commit | d89b16dcb822ed2bc7507c52730b43f0855a3b33 (patch) | |
tree | d6fd61948a43cccc0e69f8a283f5c5f56f3e6a11 /llvm/test/CodeGen/ARM/arm-abi-attr.ll | |
parent | d4993032a9bd985a296729f52b14de207f128083 (diff) | |
download | bcm5719-llvm-d89b16dcb822ed2bc7507c52730b43f0855a3b33.tar.gz bcm5719-llvm-d89b16dcb822ed2bc7507c52730b43f0855a3b33.zip |
Make the ARM ABI selectable via SubtargetFeature.
This patch makes it possible to select the ABI with -mattr. It will be used to
forward clang's -target-abi option to llvm's CodeGen.
llvm-svn: 198304
Diffstat (limited to 'llvm/test/CodeGen/ARM/arm-abi-attr.ll')
-rw-r--r-- | llvm/test/CodeGen/ARM/arm-abi-attr.ll | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/arm-abi-attr.ll b/llvm/test/CodeGen/ARM/arm-abi-attr.ll new file mode 100644 index 00000000000..f3923ae5cc8 --- /dev/null +++ b/llvm/test/CodeGen/ARM/arm-abi-attr.ll @@ -0,0 +1,28 @@ +; RUN: llc -mtriple=arm-linux < %s | FileCheck %s --check-prefix=APCS +; RUN: llc -mtriple=arm-linux -mattr=apcs < %s | \ +; RUN: FileCheck %s --check-prefix=APCS +; RUN: llc -mtriple=arm-linux-gnueabi -mattr=apcs < %s | \ +; RUN: FileCheck %s --check-prefix=APCS + +; RUN: llc -mtriple=arm-linux-gnueabi < %s | FileCheck %s --check-prefix=AAPCS +; RUN: llc -mtriple=arm-linux-gnueabi -mattr=aapcs < %s | \ +; RUN: FileCheck %s --check-prefix=AAPCS +; RUN: llc -mtriple=arm-linux-gnu -mattr=aapcs < %s | \ +; RUN: FileCheck %s --check-prefix=AAPCS + +; The stack is 8 byte aligned on AAPCS and 4 on APCS, so we should get a BIC +; only on APCS. + +define void @g() { +; APCS: sub sp, sp, #8 +; APCS: bic sp, sp, #7 + +; AAPCS: sub sp, sp, #8 +; AAPCS-NOT: bic + + %c = alloca i8, align 8 + call void @f(i8* %c) + ret void +} + +declare void @f(i8*) |