This repository has been archived by the owner on Feb 5, 2019. It is now read-only.
forked from luqmana/llvm
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #95 from dotdash/stack_pop
[X86] Don't clobber reserved registers with stack adjustments
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
; RUN: llc < %s | FileCheck %s | ||
|
||
target triple = "i686--windows-msvc" | ||
|
||
declare { i8*, i32 } @param2_ret2(i32, i32) | ||
declare i32 @__CxxFrameHandler3(...) | ||
|
||
|
||
define void @test_reserved_regs() minsize optsize personality i32 (...)* @__CxxFrameHandler3 { | ||
; CHECK-LABEL: test_reserved_regs: | ||
; CHECK: calll _param2_ret2 | ||
; CHECK-NEXT: popl %ecx | ||
; CHECK-NEXT: popl %edi | ||
start: | ||
%s = alloca i64 | ||
store i64 4, i64* %s | ||
%0 = invoke { i8*, i32 } @param2_ret2(i32 0, i32 1) | ||
to label %out unwind label %cleanup | ||
|
||
out: | ||
ret void | ||
|
||
cleanup: | ||
%cp = cleanuppad within none [] | ||
cleanupret from %cp unwind to caller | ||
} |