diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-05-27 15:15:58 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-05-27 15:15:58 +0000 |
| commit | abdf259d487163e72081a8cf4991b1617206b41e (patch) | |
| tree | 9fad9a5d5dd8c4ff54af48edad9c8cc26dd5fda1 /test/CodeGen/ARM/arm-returnaddr.ll | |
| parent | 59161dfae3225dd9151afbc76ca9074598c0c605 (diff) | |
Notes
Diffstat (limited to 'test/CodeGen/ARM/arm-returnaddr.ll')
| -rw-r--r-- | test/CodeGen/ARM/arm-returnaddr.ll | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/arm-returnaddr.ll b/test/CodeGen/ARM/arm-returnaddr.ll new file mode 100644 index 0000000000000..2c8f2abb97860 --- /dev/null +++ b/test/CodeGen/ARM/arm-returnaddr.ll @@ -0,0 +1,24 @@ +; RUN: llc < %s -mtriple=arm-apple-darwin | FileCheck %s +; RUN: llc < %s -mtriple=thumbv6-apple-darwin +; rdar://8015977 +; rdar://8020118 + +define arm_apcscc i8* @rt0(i32 %x) nounwind readnone { +entry: +; CHECK: rt0: +; CHECK: mov r0, lr + %0 = tail call i8* @llvm.returnaddress(i32 0) + ret i8* %0 +} + +define arm_apcscc i8* @rt2() nounwind readnone { +entry: +; CHECK: rt2: +; CHECK: ldr r0, [r7] +; CHECK: ldr r0, [r0] +; CHECK: ldr r0, [r0, #4] + %0 = tail call i8* @llvm.returnaddress(i32 2) + ret i8* %0 +} + +declare i8* @llvm.returnaddress(i32) nounwind readnone |
