summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2015-10-15 20:50:16 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2015-10-15 20:50:16 +0000
commit142947e9f0b6f619a1613654d93c5bc56322585a (patch)
tree63006b4c30d1df5f943f86b6a32dbc59fa8302b9 /llvm/test
parent945bc50f218290b92adc81129f2b67f6a6dd0f56 (diff)
downloadbcm5719-llvm-142947e9f0b6f619a1613654d93c5bc56322585a.tar.gz
bcm5719-llvm-142947e9f0b6f619a1613654d93c5bc56322585a.zip
[safestack] Fast access to the unsafe stack pointer on AArch64/Android.
Android libc provides a fixed TLS slot for the unsafe stack pointer, and this change implements direct access to that slot on AArch64 via __builtin_thread_pointer() + offset. This change also moves more code into TargetLowering and its target-specific subclasses to get rid of target-specific codegen in SafeStackPass. This change does not touch the ARM backend because ARM lowers builting_thread_pointer as aeabi_read_tp, which is not available on Android. llvm-svn: 250456
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/SafeStack/AArch64/abi.ll4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/test/Transforms/SafeStack/AArch64/abi.ll b/llvm/test/Transforms/SafeStack/AArch64/abi.ll
index 942658a89d2..cdec923eb74 100644
--- a/llvm/test/Transforms/SafeStack/AArch64/abi.ll
+++ b/llvm/test/Transforms/SafeStack/AArch64/abi.ll
@@ -3,7 +3,9 @@
define void @foo() nounwind uwtable safestack {
entry:
-; CHECK: %[[SPA:.*]] = call i8** @__safestack_pointer_address()
+; CHECK: %[[TP:.*]] = call i8* @llvm.aarch64.thread.pointer()
+; CHECK: %[[SPA0:.*]] = getelementptr i8, i8* %[[TP]], i32 72
+; CHECK: %[[SPA:.*]] = bitcast i8* %[[SPA0]] to i8**
; CHECK: %[[USP:.*]] = load i8*, i8** %[[SPA]]
; CHECK: %[[USST:.*]] = getelementptr i8, i8* %[[USP]], i32 -16
; CHECK: store i8* %[[USST]], i8** %[[SPA]]
OpenPOWER on IntegriCloud