summaryrefslogtreecommitdiff
path: root/test/CodeGen/PowerPC/stack-protector.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/PowerPC/stack-protector.ll')
-rw-r--r--test/CodeGen/PowerPC/stack-protector.ll17
1 files changed, 14 insertions, 3 deletions
diff --git a/test/CodeGen/PowerPC/stack-protector.ll b/test/CodeGen/PowerPC/stack-protector.ll
index 8d255bd9a43bf..57d1c7e52b1b2 100644
--- a/test/CodeGen/PowerPC/stack-protector.ll
+++ b/test/CodeGen/PowerPC/stack-protector.ll
@@ -1,6 +1,17 @@
-; RUN: llc -march=ppc32 -mtriple=ppc32-unknown-linux < %s | FileCheck %s
-; CHECK: __stack_chk_guard
-; CHECK: __stack_chk_fail
+; RUN: llc -mtriple=powerpc-apple-darwin8 < %s | FileCheck -check-prefix=DARWIN32 %s
+; RUN: llc -mtriple=powerpc64-apple-darwin < %s | FileCheck -check-prefix=DARWIN64 %s
+; RUN: llc -mtriple=ppc32-unknown-linux < %s | FileCheck -check-prefix=LINUX32 %s
+; RUN: llc -mtriple=powerpc64le-unknown-linux < %s | FileCheck -check-prefix=LINUX64 %s
+
+; DARWIN32: __stack_chk_guard
+; DARWIN64: __stack_chk_guard
+; LINUX32: lwz {{[0-9]+}}, -28680(2)
+; LINUX64: ld {{[0-9]+}}, -28688(13)
+
+; DARWIN32: __stack_chk_fail
+; DARWIN64: __stack_chk_fail
+; LINUX32: __stack_chk_fail
+; LINUX64: __stack_chk_fail
@"\01LC" = internal constant [11 x i8] c"buf == %s\0A\00" ; <[11 x i8]*> [#uses=1]