1 // RUN: %clang -target i386-unknown-linux -fstack-clash-protection -### %s 2>&1 | FileCheck %s -check-prefix=SCP-i386
2 // RUN: %clang -target i386-unknown-linux -fno-stack-clash-protection -fstack-clash-protection -### %s 2>&1 | FileCheck %s -check-prefix=SCP-i386
3 // RUN: %clang -target i386-unknown-linux -fstack-clash-protection -fno-stack-clash-protection -### %s 2>&1 | FileCheck %s -check-prefix=SCP-i386-NO
4 // SCP-i386: "-fstack-clash-protection"
5 // SCP-i386-NO-NOT: "-fstack-clash-protection"
7 // RUN: %clang -target x86_64-scei-linux -fstack-clash-protection -### %s 2>&1 | FileCheck %s -check-prefix=SCP-x86
8 // RUN: %clang -target x86_64-unknown-freebsd -fstack-clash-protection -### %s 2>&1 | FileCheck %s -check-prefix=SCP-x86
9 // SCP-x86: "-fstack-clash-protection"
11 // RUN: %clang -target armv7k-apple-linux -fstack-clash-protection -### %s 2>&1 | FileCheck %s -check-prefix=SCP-armv7
12 // SCP-armv7-NOT: "-fstack-clash-protection"
13 // SCP-armv7: argument unused during compilation: '-fstack-clash-protection'
15 // RUN: %clang -target x86_64-unknown-linux -fstack-clash-protection -S -emit-llvm -o %t.ll %s 2>&1 | FileCheck %s -check-prefix=SCP-warn
16 // SCP-warn: warning: Unable to protect inline asm that clobbers stack pointer against stack clash
18 // RUN: %clang -target x86_64-pc-unknown-linux -fstack-clash-protection -S -emit-llvm -o- %s | FileCheck %s -check-prefix=SCP-ll-linux64
19 // SCP-ll-linux64: attributes {{.*}} "probe-stack"="inline-asm"
21 // RUN: %clang -target x86_64-pc-windows-msvc -fstack-clash-protection -S -emit-llvm -o- %s 2>&1 | FileCheck %s -check-prefix=SCP-ll-win64
22 // SCP-ll-win64-NOT: attributes {{.*}} "probe-stack"="inline-asm"
23 // SCP-ll-win64: argument unused during compilation: '-fstack-clash-protection'
27 __asm__("sub %0, %%rsp"
31 __asm__("mov %%rsp, %0"