49 lines · plain
1; RUN: llc -verify-machineinstrs < %s -mtriple=i386-apple-darwin -frame-pointer=all | FileCheck %s -check-prefix=X862; RUN: llc -verify-machineinstrs < %s -mtriple=x86_64-apple-darwin -frame-pointer=all | FileCheck %s -check-prefix=X643 4; Tail call should not use ebp / rbp after it's popped. Use esp / rsp.5 6define void @t1(ptr nocapture %value) nounwind {7entry:8; X86-LABEL: t1:9; X86: jmpl *4(%esp)10 11; X64-LABEL: t1:12; X64: jmpq *%rdi13 tail call void %value() nounwind14 ret void15}16 17define void @t2(i32 %a, ptr nocapture %value) nounwind {18entry:19; X86-LABEL: t2:20; X86: jmpl *8(%esp)21 22; X64-LABEL: t2:23; X64: jmpq *%rsi24 tail call void %value() nounwind25 ret void26}27 28define void @t3(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, ptr nocapture %value) nounwind {29entry:30; X86-LABEL: t3:31; X86: jmpl *28(%esp)32 33; X64-LABEL: t3:34; X64: jmpq *8(%rsp)35 tail call void %value() nounwind36 ret void37}38 39define void @t4(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, ptr nocapture %value) nounwind {40entry:41; X86-LABEL: t4:42; X86: jmpl *32(%esp)43 44; X64-LABEL: t4:45; X64: jmpq *16(%rsp)46 tail call void %value() nounwind47 ret void48}49