-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support to Winch for i*.eqz instructions (#6508)
- Loading branch information
1 parent
2b20db1
commit 0893f7c
Showing
10 changed files
with
185 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
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,19 @@ | ||
;;! target = "x86_64" | ||
|
||
(module | ||
(func (result i32) | ||
(i32.const 1) | ||
(i32.eqz) | ||
) | ||
) | ||
;; 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: 83f800 cmp eax, 0 | ||
;; 14: b800000000 mov eax, 0 | ||
;; 19: 400f94c0 sete al | ||
;; 1d: 4883c408 add rsp, 8 | ||
;; 21: 5d pop rbp | ||
;; 22: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
;;! target = "x86_64" | ||
|
||
(module | ||
(func (result i32) | ||
(local $foo i32) | ||
|
||
(i32.const 2) | ||
(local.set $foo) | ||
|
||
(local.get $foo) | ||
(i32.eqz) | ||
) | ||
) | ||
;; 0: 55 push rbp | ||
;; 1: 4889e5 mov rbp, rsp | ||
;; 4: 4883ec10 sub rsp, 0x10 | ||
;; 8: 48c744240800000000 | ||
;; mov qword ptr [rsp + 8], 0 | ||
;; 11: 4c89742404 mov qword ptr [rsp + 4], r14 | ||
;; 16: b802000000 mov eax, 2 | ||
;; 1b: 8944240c mov dword ptr [rsp + 0xc], eax | ||
;; 1f: 8b44240c mov eax, dword ptr [rsp + 0xc] | ||
;; 23: 83f800 cmp eax, 0 | ||
;; 26: b800000000 mov eax, 0 | ||
;; 2b: 400f94c0 sete al | ||
;; 2f: 4883c410 add rsp, 0x10 | ||
;; 33: 5d pop rbp | ||
;; 34: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
;;! target = "x86_64" | ||
|
||
(module | ||
(func (param i32) (result i32) | ||
(local.get 0) | ||
(i32.eqz) | ||
) | ||
) | ||
;; 0: 55 push rbp | ||
;; 1: 4889e5 mov rbp, rsp | ||
;; 4: 4883ec10 sub rsp, 0x10 | ||
;; 8: 897c240c mov dword ptr [rsp + 0xc], edi | ||
;; c: 4c89742404 mov qword ptr [rsp + 4], r14 | ||
;; 11: 8b44240c mov eax, dword ptr [rsp + 0xc] | ||
;; 15: 83f800 cmp eax, 0 | ||
;; 18: b800000000 mov eax, 0 | ||
;; 1d: 400f94c0 sete al | ||
;; 21: 4883c410 add rsp, 0x10 | ||
;; 25: 5d pop rbp | ||
;; 26: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
;;! target = "x86_64" | ||
|
||
(module | ||
(func (result i32) | ||
(i64.const 1) | ||
(i64.eqz) | ||
) | ||
) | ||
;; 0: 55 push rbp | ||
;; 1: 4889e5 mov rbp, rsp | ||
;; 4: 4883ec08 sub rsp, 8 | ||
;; 8: 4c893424 mov qword ptr [rsp], r14 | ||
;; c: 48c7c001000000 mov rax, 1 | ||
;; 13: 4883f800 cmp rax, 0 | ||
;; 17: b800000000 mov eax, 0 | ||
;; 1c: 400f94c0 sete al | ||
;; 20: 4883c408 add rsp, 8 | ||
;; 24: 5d pop rbp | ||
;; 25: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
;;! target = "x86_64" | ||
|
||
(module | ||
(func (result i32) | ||
(i64.const 9223372036854775807) | ||
(i64.eqz) | ||
) | ||
) | ||
;; 0: 55 push rbp | ||
;; 1: 4889e5 mov rbp, rsp | ||
;; 4: 4883ec08 sub rsp, 8 | ||
;; 8: 4c893424 mov qword ptr [rsp], r14 | ||
;; c: 48b8ffffffffffffff7f | ||
;; movabs rax, 0x7fffffffffffffff | ||
;; 16: 4883f800 cmp rax, 0 | ||
;; 1a: b800000000 mov eax, 0 | ||
;; 1f: 400f94c0 sete al | ||
;; 23: 4883c408 add rsp, 8 | ||
;; 27: 5d pop rbp | ||
;; 28: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
;;! target = "x86_64" | ||
|
||
(module | ||
(func (result i32) | ||
(local $foo i64) | ||
|
||
(i64.const 2) | ||
(local.set $foo) | ||
|
||
(local.get $foo) | ||
(i64.eqz) | ||
) | ||
) | ||
;; 0: 55 push rbp | ||
;; 1: 4889e5 mov rbp, rsp | ||
;; 4: 4883ec10 sub rsp, 0x10 | ||
;; 8: 48c744240800000000 | ||
;; mov qword ptr [rsp + 8], 0 | ||
;; 11: 4c893424 mov qword ptr [rsp], r14 | ||
;; 15: 48c7c002000000 mov rax, 2 | ||
;; 1c: 4889442408 mov qword ptr [rsp + 8], rax | ||
;; 21: 488b442408 mov rax, qword ptr [rsp + 8] | ||
;; 26: 4883f800 cmp rax, 0 | ||
;; 2a: b800000000 mov eax, 0 | ||
;; 2f: 400f94c0 sete al | ||
;; 33: 4883c410 add rsp, 0x10 | ||
;; 37: 5d pop rbp | ||
;; 38: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
;;! target = "x86_64" | ||
|
||
(module | ||
(func (param i64) (result i32) | ||
(local.get 0) | ||
(i64.eqz) | ||
) | ||
) | ||
;; 0: 55 push rbp | ||
;; 1: 4889e5 mov rbp, rsp | ||
;; 4: 4883ec10 sub rsp, 0x10 | ||
;; 8: 48897c2408 mov qword ptr [rsp + 8], rdi | ||
;; d: 4c893424 mov qword ptr [rsp], r14 | ||
;; 11: 488b442408 mov rax, qword ptr [rsp + 8] | ||
;; 16: 4883f800 cmp rax, 0 | ||
;; 1a: b800000000 mov eax, 0 | ||
;; 1f: 400f94c0 sete al | ||
;; 23: 4883c410 add rsp, 0x10 | ||
;; 27: 5d pop rbp | ||
;; 28: c3 ret |