1 ; RUN: llc -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck --check-prefix=X86-LINUX %s
2 ; RUN: llc -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck --check-prefix=X64-LINUX %s
3 ; RUN: llc -mtriple=x86_64-pc-linux-gnu -code-model=large < %s -o - | FileCheck --check-prefix=X64-LINUX-LARGE %s
7 ; Ensure calls to __probestack occur for large stack frames
8 define void @test() "probe-stack"="__probestack" {
9 %array = alloca [40096 x i8], align 16
10 call void @use(ptr %array)
13 ; X86-LINUX-LABEL: test:
14 ; X86-LINUX: movl $40124, %eax # imm = 0x9CBC
15 ; X86-LINUX-NEXT: calll __probestack
16 ; X86-LINUX-NEXT: subl %eax, %esp
18 ; X64-LINUX-LABEL: test:
19 ; X64-LINUX: movl $40104, %eax # imm = 0x9CA8
20 ; X64-LINUX-NEXT: callq __probestack
21 ; X64-LINUX-NEXT: subq %rax, %rsp
23 ; X64-LINUX-LARGE-LABEL: test:
24 ; X64-LINUX-LARGE: movl $40104, %eax # imm = 0x9CA8
25 ; X64-LINUX-LARGE-NEXT: movabsq $__probestack, %r11
26 ; X64-LINUX-LARGE-NEXT: callq *%r11
27 ; X64-LINUX-LARGE-NEXT: subq %rax, %rsp