brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · cbe9c9d Raw
30 lines · plain
1; RUN: llc -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck --check-prefix=X86-LINUX %s2; RUN: llc -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck --check-prefix=X64-LINUX %s3; RUN: llc -mtriple=x86_64-pc-linux-gnu -code-model=large < %s -o - | FileCheck --check-prefix=X64-LINUX-LARGE %s4 5declare void @use(ptr)6 7; Ensure calls to __probestack occur for large stack frames8define void @test() "probe-stack"="__probestack" {9  %array = alloca [40096 x i8], align 1610  call void @use(ptr %array)11  ret void12 13; X86-LINUX-LABEL:       test:14; X86-LINUX:             movl $40124, %eax # imm = 0x9CBC15; X86-LINUX-NEXT:        calll __probestack16; X86-LINUX-NEXT:        subl %eax, %esp17 18; X64-LINUX-LABEL:       test:19; X64-LINUX:             movl $40104, %eax # imm = 0x9CA820; X64-LINUX-NEXT:        callq __probestack21; X64-LINUX-NEXT:        subq %rax, %rsp22 23; X64-LINUX-LARGE-LABEL: test:24; X64-LINUX-LARGE:       movl $40104, %eax # imm = 0x9CA825; X64-LINUX-LARGE-NEXT:  movabsq $__probestack, %r1126; X64-LINUX-LARGE-NEXT:  callq *%r1127; X64-LINUX-LARGE-NEXT:  subq %rax, %rsp28 29}30