brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · e414b08 Raw
45 lines · plain
1; RUN: llc < %s -mtriple=i386-pc-linux -mcpu=corei7 -relocation-model=static | FileCheck --check-prefix=X86 %s2; RUN: llc < %s -mtriple=x86_64-pc-linux -mcpu=corei7 -relocation-model=static | FileCheck --check-prefix=X64 %s3 4target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"5 6%Foo = type { [125 x i8] }7 8declare i32 @llvm.eh.sjlj.setjmp(ptr) nounwind9 10declare void @whatever(i64, ptr, ptr, ptr, ptr, i32)  #011 12attributes #0 = { nounwind uwtable "frame-pointer"="all" }13 14define i32 @test1(i64 %n, ptr byval(%Foo) nocapture readnone align 8 %f) #0 {15entry:16  %buf = alloca [5 x ptr], align 1617  %p = alloca ptr, align 818  %q = alloca i8, align 6419  %s = alloca i8, i64 %n, align 120  store ptr %s, ptr %p, align 821  %t = call i32 @llvm.eh.sjlj.setjmp(ptr %s)22  call void @whatever(i64 %n, ptr %f, ptr %p, ptr %q, ptr %s, i32 %t) #123  ret i32 024; X86: pushl   %esi25; X86-NEXT: pushl   %esi26; X86: movl    %esp, %esi27; X86: movl    %esp, -16(%ebp)28; X86: {{.LBB.*:}}29; X86: movl    -16(%ebp), %esi30; X86: {{.LBB.*:}}31; X86: popl    %esi32; X86-NEXT: popl    %esi33; X64: pushq   %rbx34; X64-NEXT: pushq   %rbx35; X64: movq    %rsp, %rbx36; X64: movq    %rsp, -48(%rbp)37; X64: {{.LBB.*:}}38; X64: movq    -48(%rbp), %rbx39; X64: {{.LBB.*:}}40; X64: popq    %rbx41; X64-NEXT: popq    %rbx42}43 44 45