diff options
| author | Reid Kleckner <rnk@google.com> | 2015-09-10 22:00:02 +0000 |
|---|---|---|
| committer | Reid Kleckner <rnk@google.com> | 2015-09-10 22:00:02 +0000 |
| commit | da6dcc5d926cb7481ff28b127c5e67da4501a99c (patch) | |
| tree | 8e2a98be4158adb8031bc39895486e5838d70ab7 /llvm/test | |
| parent | 7433cd4fe6a46893d69da8670fdd26246bd918f6 (diff) | |
| download | bcm5719-llvm-da6dcc5d926cb7481ff28b127c5e67da4501a99c.tar.gz bcm5719-llvm-da6dcc5d926cb7481ff28b127c5e67da4501a99c.zip | |
[WinEH] Push and pop EBP for 32-bit funclets
The Win32 EH runtime caller does not preserve EBP, even though it does
preserve the CSRs (EBX, ESI, EDI) for us. The result was that each
finally funclet call would leave the frame pointer off by 12 bytes.
llvm-svn: 247348
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/CodeGen/X86/win-catchpad-csrs.ll | 3 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/win-catchpad.ll | 4 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/win32-seh-cleanupendpad.ll | 8 |
3 files changed, 14 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/X86/win-catchpad-csrs.ll b/llvm/test/CodeGen/X86/win-catchpad-csrs.ll index 6e72268432a..c4cc945fe7d 100644 --- a/llvm/test/CodeGen/X86/win-catchpad-csrs.ll +++ b/llvm/test/CodeGen/X86/win-catchpad-csrs.ll @@ -73,6 +73,7 @@ catchendblock: ; preds = %catch, ; X86: retl ; X86: [[catch1bb:LBB0_[0-9]+]]: # %catch{{$}} +; X86: pushl %ebp ; X86-NOT: pushl ; X86: addl $12, %ebp ; X86: subl $16, %esp @@ -81,7 +82,7 @@ catchendblock: ; preds = %catch, ; X86: calll _f ; X86: movl $[[contbb]], %eax ; X86-NEXT: addl $16, %esp -; X86-NOT: popl +; X86-NEXT: popl %ebp ; X86-NEXT: retl ; X86: L__ehtable$try_catch_catch: diff --git a/llvm/test/CodeGen/X86/win-catchpad.ll b/llvm/test/CodeGen/X86/win-catchpad.ll index c41087a4deb..a6600fb1f8a 100644 --- a/llvm/test/CodeGen/X86/win-catchpad.ll +++ b/llvm/test/CodeGen/X86/win-catchpad.ll @@ -76,6 +76,7 @@ catchendblock: ; preds = %catch, %catch.2, %c ; X86: retl ; X86: [[catch1bb:LBB0_[0-9]+]]: # %catch{{$}} +; X86: pushl %ebp ; X86: addl $12, %ebp ; X86: subl $8, %esp ; X86: movl $1, -{{[0-9]+}}(%ebp) @@ -85,9 +86,11 @@ catchendblock: ; preds = %catch, %catch.2, %c ; X86: calll _f ; X86: movl $[[contbb]], %eax ; X86-NEXT: addl $8, %esp +; X86-NEXT: popl %ebp ; X86-NEXT: retl ; X86: [[catch2bb:LBB0_[0-9]+]]: # %catch.2{{$}} +; X86: pushl %ebp ; X86: addl $12, %ebp ; X86: subl $8, %esp ; X86: movl $1, -{{[0-9]+}}(%ebp) @@ -97,6 +100,7 @@ catchendblock: ; preds = %catch, %catch.2, %c ; X86: calll _f ; X86: movl $[[contbb]], %eax ; X86-NEXT: addl $8, %esp +; X86-NEXT: popl %ebp ; X86-NEXT: retl ; X86: L__ehtable$try_catch_catch: diff --git a/llvm/test/CodeGen/X86/win32-seh-cleanupendpad.ll b/llvm/test/CodeGen/X86/win32-seh-cleanupendpad.ll index 7f1fc322d18..35d9bfeb66e 100644 --- a/llvm/test/CodeGen/X86/win32-seh-cleanupendpad.ll +++ b/llvm/test/CodeGen/X86/win32-seh-cleanupendpad.ll @@ -63,14 +63,22 @@ attributes #3 = { noinline } ; CHECK: retl ; CHECK: LBB0_[[inner:[0-9]+]]: # %ehcleanup +; CHECK: pushl %ebp +; CHECK: addl $12, %ebp ; CHECK: movl $0, -[[state]](%ebp) ; CHECK: movl $2, (%esp) ; CHECK: calll _f +; CHECK: popl %ebp +; CHECK: retl ; CHECK: LBB0_[[outer:[0-9]+]]: # %ehcleanup.3 +; CHECK: pushl %ebp +; CHECK: addl $12, %ebp ; CHECK: movl $-1, -[[state]](%ebp) ; CHECK: movl $3, (%esp) ; CHECK: calll _f +; CHECK: popl %ebp +; CHECK: retl ; CHECK: L__ehtable$nested_finally: ; CHECK: .long -1 |

