[WinEH] Setup RBP correctly in Win64 funclet prologues
[oota-llvm.git] / test / CodeGen / X86 / win-catchpad-csrs.ll
index 4a745121cc470df00b742494345e049743108603..b9f99e61669987942731fd01cf0d29e9836bb4e9 100644 (file)
@@ -75,8 +75,8 @@ catchendblock:                                    ; preds = %catch,
 ; X86: LBB0_[[catch1bb]]: # %catch{{$}}
 ; X86: pushl %ebp
 ; X86-NOT: pushl
-; X86: addl $12, %ebp
 ; X86: subl $16, %esp
+; X86: addl $12, %ebp
 ; X86: movl $1, -{{[0-9]+}}(%ebp)
 ; X86: movl $2, (%esp)
 ; X86: calll _f
@@ -105,6 +105,7 @@ catchendblock:                                    ; preds = %catch,
 ; X64: .seh_stackalloc 40
 ; X64: leaq 32(%rsp), %rbp
 ; X64: .seh_setframe 5, 32
+; X64: .seh_endprologue
 ; X64: callq getint
 ; X64: callq getint
 ; X64: callq getint
@@ -121,8 +122,11 @@ catchendblock:                                    ; preds = %catch,
 ; X64: LBB0_[[catch1bb]]: # %catch{{$}}
 ; X64: movq %rdx, 16(%rsp)
 ; X64: pushq %rbp
-; X64: movq %rdx, %rbp
+; X64: .seh_pushreg 5
 ; X64: subq $32, %rsp
+; X64: .seh_stackalloc 32
+; X64: leaq 32(%rdx), %rbp
+; X64: .seh_endprologue
 ; X64: movl $2, %ecx
 ; X64: callq f
 ; X64: leaq [[contbb]](%rip), %rax