1 ; Test target-specific stack cookie location. 2 ; RUN: llc -mtriple=i386-linux < %s -o - | FileCheck --check-prefix=LINUX-I386 %s 3 ; RUN: llc -mtriple=x86_64-linux < %s -o - | FileCheck --check-prefix=LINUX-X64 %s 4 ; RUN: llc -mtriple=i386-linux-android < %s -o - | FileCheck --check-prefix=LINUX-I386 %s 5 ; RUN: llc -mtriple=x86_64-linux-android < %s -o - | FileCheck --check-prefix=LINUX-X64 %s 6 ; RUN: llc -mtriple=i386-kfreebsd < %s -o - | FileCheck --check-prefix=LINUX-I386 %s 7 ; RUN: llc -mtriple=x86_64-kfreebsd < %s -o - | FileCheck --check-prefix=LINUX-X64 %s 8 9 define void @_Z1fv() sspreq { 10 entry: 11 %x = alloca i32, align 4 12 %0 = bitcast i32* %x to i8* 13 call void @_Z7CapturePi(i32* nonnull %x) 14 ret void 15 } 16 17 declare void @_Z7CapturePi(i32*) 18 19 ; LINUX-X64: movq %fs:40, %[[B:.*]] 20 ; LINUX-X64: movq %[[B]], 16(%rsp) 21 ; LINUX-X64: movq %fs:40, %[[C:.*]] 22 ; LINUX-X64: cmpq 16(%rsp), %[[C]] 23 24 ; LINUX-I386: movl %gs:20, %[[B:.*]] 25 ; LINUX-I386: movl %[[B]], 8(%esp) 26 ; LINUX-I386: movl %gs:20, %[[C:.*]] 27 ; LINUX-I386: cmpl 8(%esp), %[[C]] 28