-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add i32.popcnt and i64.popcnt to winch
Co-authored-by: Nick Fitzgerald <fitzgen@gmail.com> Co-authored-by: Chris Fallin <chris@cfallin.org>
- Loading branch information
1 parent
1d60443
commit 87b4096
Showing
9 changed files
with
115 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
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,18 @@ | ||
;;! target = "x86_64" | ||
;;! flags = ["has_popcnt", "has_sse42"] | ||
|
||
(module | ||
(func (result i32) | ||
i32.const 3 | ||
i32.popcnt | ||
) | ||
) | ||
;; 0: 55 push rbp | ||
;; 1: 4889e5 mov rbp, rsp | ||
;; 4: 4883ec08 sub rsp, 8 | ||
;; 8: 4c893424 mov qword ptr [rsp], r14 | ||
;; c: b803000000 mov eax, 3 | ||
;; 11: f30fb8c0 popcnt eax, eax | ||
;; 15: 4883c408 add rsp, 8 | ||
;; 19: 5d pop rbp | ||
;; 1a: 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" | ||
;;! flags = ["has_popcnt", "has_sse42"] | ||
|
||
(module | ||
(func (param i32) (result i32) | ||
local.get 0 | ||
i32.popcnt | ||
) | ||
) | ||
;; 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: f30fb8c0 popcnt eax, eax | ||
;; 19: 4883c410 add rsp, 0x10 | ||
;; 1d: 5d pop rbp | ||
;; 1e: 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,18 @@ | ||
;;! target = "x86_64" | ||
;;! flags = ["has_popcnt", "has_sse42"] | ||
|
||
(module | ||
(func (result i64) | ||
i64.const 3 | ||
i64.popcnt | ||
) | ||
) | ||
;; 0: 55 push rbp | ||
;; 1: 4889e5 mov rbp, rsp | ||
;; 4: 4883ec08 sub rsp, 8 | ||
;; 8: 4c893424 mov qword ptr [rsp], r14 | ||
;; c: 48c7c003000000 mov rax, 3 | ||
;; 13: f3480fb8c0 popcnt rax, rax | ||
;; 18: 4883c408 add rsp, 8 | ||
;; 1c: 5d pop rbp | ||
;; 1d: 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" | ||
;;! flags = ["has_popcnt", "has_sse42"] | ||
|
||
(module | ||
(func (param i64) (result i64) | ||
local.get 0 | ||
i64.popcnt | ||
) | ||
) | ||
;; 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: f3480fb8c0 popcnt rax, rax | ||
;; 1b: 4883c410 add rsp, 0x10 | ||
;; 1f: 5d pop rbp | ||
;; 20: c3 ret |