forked from bytecodealliance/wasmtime
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pulley: Add a multiply-and-add macro instruction (bytecodealliance#10081
) This is present in riscv64 and aarch64 native ISAs and was found in a benchmark I was looking at so let's add a macro-op as well to help cases where this crops up in the wild.
- Loading branch information
1 parent
ca95576
commit 2f27a10
Showing
4 changed files
with
61 additions
and
8 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,25 @@ | ||
;;! target = "pulley32" | ||
;;! test = "compile" | ||
|
||
(module | ||
(func $madd32 (param i32 i32 i32) (result i32) | ||
(i32.add | ||
(i32.mul (local.get 0) (local.get 1)) | ||
(local.get 2))) | ||
|
||
(func $madd64 (param i64 i64 i64) (result i64) | ||
(i64.add | ||
(i64.mul (local.get 0) (local.get 1)) | ||
(local.get 2))) | ||
) | ||
;; wasm[0]::function[0]::madd32: | ||
;; push_frame | ||
;; xmadd32 x0, x2, x3, x4 | ||
;; pop_frame | ||
;; ret | ||
;; | ||
;; wasm[0]::function[1]::madd64: | ||
;; push_frame | ||
;; xmadd64 x0, x2, x3, x4 | ||
;; pop_frame | ||
;; ret |