Home | History | Annotate | Download | only in X86
      1 ; RUN: llc < %s -mtriple=i386-apple-darwin   -disable-fp-elim | FileCheck %s -check-prefix=32
      2 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -disable-fp-elim | FileCheck %s -check-prefix=64
      3 
      4 ; Tail call should not use ebp / rbp after it's popped. Use esp / rsp.
      5 
      6 define void @t1(i8* nocapture %value) nounwind {
      7 entry:
      8 ; 32-LABEL: t1:
      9 ; 32: jmpl *4(%esp)
     10 
     11 ; 64-LABEL: t1:
     12 ; 64: jmpq *%rdi
     13   %0 = bitcast i8* %value to void ()*
     14   tail call void %0() nounwind
     15   ret void
     16 }
     17 
     18 define void @t2(i32 %a, i8* nocapture %value) nounwind {
     19 entry:
     20 ; 32-LABEL: t2:
     21 ; 32: jmpl *8(%esp)
     22 
     23 ; 64-LABEL: t2:
     24 ; 64: jmpq *%rsi
     25   %0 = bitcast i8* %value to void ()*
     26   tail call void %0() nounwind
     27   ret void
     28 }
     29 
     30 define void @t3(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i8* nocapture %value) nounwind {
     31 entry:
     32 ; 32-LABEL: t3:
     33 ; 32: jmpl *28(%esp)
     34 
     35 ; 64-LABEL: t3:
     36 ; 64: jmpq *8(%rsp)
     37   %0 = bitcast i8* %value to void ()*
     38   tail call void %0() nounwind
     39   ret void
     40 }
     41 
     42 define void @t4(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, i8* nocapture %value) nounwind {
     43 entry:
     44 ; 32-LABEL: t4:
     45 ; 32: jmpl *32(%esp)
     46 
     47 ; 64-LABEL: t4:
     48 ; 64: jmpq *16(%rsp)
     49   %0 = bitcast i8* %value to void ()*
     50   tail call void %0() nounwind
     51   ret void
     52 }
     53