forked from bytecodealliance/wasmtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Winch: cleanup stack in br_if in non-fallthrough case (bytecodeallian…
…ce#7590) * Winch: cleanup stack in br_if in non-fallthrough case * Remove unnecessary refetch of sp_offsets * Refactoring based on PR feedback * Have SPOffset implement Ord
- Loading branch information
1 parent
1c7a07b
commit 4d22446
Showing
4 changed files
with
74 additions
and
13 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
42 changes: 42 additions & 0 deletions
42
winch/filetests/filetests/x64/br_if/with_machine_stack_entry.wat
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,42 @@ | ||
;;! target = "x86_64" | ||
|
||
(module | ||
(func (export "") | ||
call 1 | ||
call 1 | ||
br_if 0 | ||
drop | ||
) | ||
(func (;1;) (result i32) | ||
i32.const 1 | ||
) | ||
) | ||
;; 0: 55 push rbp | ||
;; 1: 4889e5 mov rbp, rsp | ||
;; 4: 4883ec08 sub rsp, 8 | ||
;; 8: 4c893424 mov qword ptr [rsp], r14 | ||
;; c: 4883ec08 sub rsp, 8 | ||
;; 10: e800000000 call 0x15 | ||
;; 15: 4883c408 add rsp, 8 | ||
;; 19: 4883ec04 sub rsp, 4 | ||
;; 1d: 890424 mov dword ptr [rsp], eax | ||
;; 20: 4883ec04 sub rsp, 4 | ||
;; 24: e800000000 call 0x29 | ||
;; 29: 4883c404 add rsp, 4 | ||
;; 2d: 85c0 test eax, eax | ||
;; 2f: 0f8409000000 je 0x3e | ||
;; 35: 4883c404 add rsp, 4 | ||
;; 39: e904000000 jmp 0x42 | ||
;; 3e: 4883c404 add rsp, 4 | ||
;; 42: 4883c408 add rsp, 8 | ||
;; 46: 5d pop rbp | ||
;; 47: c3 ret | ||
;; | ||
;; 0: 55 push rbp | ||
;; 1: 4889e5 mov rbp, rsp | ||
;; 4: 4883ec08 sub rsp, 8 | ||
;; 8: 4c893424 mov qword ptr [rsp], r14 | ||
;; c: b801000000 mov eax, 1 | ||
;; 11: 4883c408 add rsp, 8 | ||
;; 15: 5d pop rbp | ||
;; 16: c3 ret |
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