Browse Source
* winch(arm64): and, or, xor, shifts Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com> * fmt Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com> * docs Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com> * shift Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com> * shifts: test cases Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com> * cleanup Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com> * apply first batch of suggestions Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com> * refactor shift operations Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com> * fix doc strings Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com> * Minor cleanups This commit includes very minor clean-ups, these are mechanical changes only. * Rename `shift_rr` to `shift`, as we're still passing the context in, the callee can decide what to do with the instruction arguments. * Delete the un-used `Into<AluOp> for ShiftKind` --------- Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com> Co-authored-by: Saúl Cabrera <saulecabrera@gmail.com>pull/8756/head
Edoardo Vacchi
4 months ago
committed by
GitHub
68 changed files with 2235 additions and 82 deletions
@ -0,0 +1,26 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i32) |
|||
(i32.const 1) |
|||
(i32.const 2) |
|||
(i32.and) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #1 |
|||
;; mov w0, w16 |
|||
;; and w0, w0, #2 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,44 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i32) |
|||
(local $foo i32) |
|||
(local $bar i32) |
|||
|
|||
(i32.const 1) |
|||
(local.set $foo) |
|||
|
|||
(i32.const 2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
(i32.and) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x10] |
|||
;; stur x1, [x28, #8] |
|||
;; mov x16, #0 |
|||
;; stur x16, [x28] |
|||
;; mov x16, #1 |
|||
;; mov w0, w16 |
|||
;; stur w0, [x28, #4] |
|||
;; mov x16, #2 |
|||
;; mov w0, w16 |
|||
;; stur w0, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; and w1, w1, w0 |
|||
;; mov w0, w1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param i32) (param i32) (result i32) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(i32.and) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x10] |
|||
;; stur x1, [x28, #8] |
|||
;; stur w2, [x28, #4] |
|||
;; stur w3, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; and w1, w1, w0 |
|||
;; mov w0, w1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,26 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i32) |
|||
(i32.const 1) |
|||
(i32.const 2) |
|||
(i32.or) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #1 |
|||
;; mov w0, w16 |
|||
;; orr w0, w0, #2 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,44 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i32) |
|||
(local $foo i32) |
|||
(local $bar i32) |
|||
|
|||
(i32.const 1) |
|||
(local.set $foo) |
|||
|
|||
(i32.const 2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
(i32.or) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x10] |
|||
;; stur x1, [x28, #8] |
|||
;; mov x16, #0 |
|||
;; stur x16, [x28] |
|||
;; mov x16, #1 |
|||
;; mov w0, w16 |
|||
;; stur w0, [x28, #4] |
|||
;; mov x16, #2 |
|||
;; mov w0, w16 |
|||
;; stur w0, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; orr w1, w1, w0 |
|||
;; mov w0, w1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param i32) (param i32) (result i32) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(i32.or) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x10] |
|||
;; stur x1, [x28, #8] |
|||
;; stur w2, [x28, #4] |
|||
;; stur w3, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; orr w1, w1, w0 |
|||
;; mov w0, w1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,28 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i32) |
|||
(i32.const 1) |
|||
(i32.const 512) |
|||
(i32.rotl) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #1 |
|||
;; mov w0, w16 |
|||
;; sub w0, w0, wzr |
|||
;; mov x16, #0x200 |
|||
;; ror w0, w0, w16 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,27 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i32) |
|||
(i32.const 1) |
|||
(i32.const 2) |
|||
(i32.rotl) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #1 |
|||
;; mov w0, w16 |
|||
;; sub w0, w0, wzr |
|||
;; ror w0, w0, #2 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,45 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i32) |
|||
(local $foo i32) |
|||
(local $bar i32) |
|||
|
|||
(i32.const 1) |
|||
(local.set $foo) |
|||
|
|||
(i32.const 2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
(i32.rotl) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x10] |
|||
;; stur x1, [x28, #8] |
|||
;; mov x16, #0 |
|||
;; stur x16, [x28] |
|||
;; mov x16, #1 |
|||
;; mov w0, w16 |
|||
;; stur w0, [x28, #4] |
|||
;; mov x16, #2 |
|||
;; mov w0, w16 |
|||
;; stur w0, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; sub w0, w0, wzr |
|||
;; ror w1, w1, w0 |
|||
;; mov w0, w1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,30 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param i32) (param i32) (result i32) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(i32.rotl) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x10] |
|||
;; stur x1, [x28, #8] |
|||
;; stur w2, [x28, #4] |
|||
;; stur w3, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; sub w0, w0, wzr |
|||
;; ror w1, w1, w0 |
|||
;; mov w0, w1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,27 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i32) |
|||
(i32.const 1) |
|||
(i32.const 512) |
|||
(i32.rotr) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #1 |
|||
;; mov w0, w16 |
|||
;; mov x16, #0x200 |
|||
;; ror w0, w0, w16 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,26 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i32) |
|||
(i32.const 1) |
|||
(i32.const 2) |
|||
(i32.rotr) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #1 |
|||
;; mov w0, w16 |
|||
;; ror w0, w0, #2 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,44 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i32) |
|||
(local $foo i32) |
|||
(local $bar i32) |
|||
|
|||
(i32.const 1) |
|||
(local.set $foo) |
|||
|
|||
(i32.const 2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
(i32.rotr) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x10] |
|||
;; stur x1, [x28, #8] |
|||
;; mov x16, #0 |
|||
;; stur x16, [x28] |
|||
;; mov x16, #1 |
|||
;; mov w0, w16 |
|||
;; stur w0, [x28, #4] |
|||
;; mov x16, #2 |
|||
;; mov w0, w16 |
|||
;; stur w0, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; ror w1, w1, w0 |
|||
;; mov w0, w1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param i32) (param i32) (result i32) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(i32.rotr) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x10] |
|||
;; stur x1, [x28, #8] |
|||
;; stur w2, [x28, #4] |
|||
;; stur w3, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; ror w1, w1, w0 |
|||
;; mov w0, w1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,28 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i32) |
|||
(i32.const 1) |
|||
(i32.const 512) |
|||
(i32.shl) |
|||
) |
|||
) |
|||
|
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #1 |
|||
;; mov w0, w16 |
|||
;; mov x16, #0x200 |
|||
;; lsl w0, w0, w16 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,27 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i32) |
|||
(i32.const 1) |
|||
(i32.const 2) |
|||
(i32.shl) |
|||
) |
|||
) |
|||
|
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #1 |
|||
;; mov w0, w16 |
|||
;; lsl w0, w0, #2 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,44 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i32) |
|||
(local $foo i32) |
|||
(local $bar i32) |
|||
|
|||
(i32.const 1) |
|||
(local.set $foo) |
|||
|
|||
(i32.const 2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
(i32.shl) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x10] |
|||
;; stur x1, [x28, #8] |
|||
;; mov x16, #0 |
|||
;; stur x16, [x28] |
|||
;; mov x16, #1 |
|||
;; mov w0, w16 |
|||
;; stur w0, [x28, #4] |
|||
;; mov x16, #2 |
|||
;; mov w0, w16 |
|||
;; stur w0, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; lsl w1, w1, w0 |
|||
;; mov w0, w1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param i32) (param i32) (result i32) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(i32.shl) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x10] |
|||
;; stur x1, [x28, #8] |
|||
;; stur w2, [x28, #4] |
|||
;; stur w3, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; lsl w1, w1, w0 |
|||
;; mov w0, w1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,27 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i32) |
|||
(i32.const 1) |
|||
(i32.const 512) |
|||
(i32.shr_s) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #1 |
|||
;; mov w0, w16 |
|||
;; mov x16, #0x200 |
|||
;; asr w0, w0, w16 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,26 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i32) |
|||
(i32.const 1) |
|||
(i32.const 2) |
|||
(i32.shr_s) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #1 |
|||
;; mov w0, w16 |
|||
;; asr w0, w0, #2 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,44 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i32) |
|||
(local $foo i32) |
|||
(local $bar i32) |
|||
|
|||
(i32.const 1) |
|||
(local.set $foo) |
|||
|
|||
(i32.const 2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
(i32.shr_s) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x10] |
|||
;; stur x1, [x28, #8] |
|||
;; mov x16, #0 |
|||
;; stur x16, [x28] |
|||
;; mov x16, #1 |
|||
;; mov w0, w16 |
|||
;; stur w0, [x28, #4] |
|||
;; mov x16, #2 |
|||
;; mov w0, w16 |
|||
;; stur w0, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; asr w1, w1, w0 |
|||
;; mov w0, w1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param i32) (param i32) (result i32) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(i32.shr_s) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x10] |
|||
;; stur x1, [x28, #8] |
|||
;; stur w2, [x28, #4] |
|||
;; stur w3, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; asr w1, w1, w0 |
|||
;; mov w0, w1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,27 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i32) |
|||
(i32.const 1) |
|||
(i32.const 512) |
|||
(i32.shr_u) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #1 |
|||
;; mov w0, w16 |
|||
;; mov x16, #0x200 |
|||
;; lsr w0, w0, w16 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,26 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i32) |
|||
(i32.const 1) |
|||
(i32.const 2) |
|||
(i32.shr_u) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #1 |
|||
;; mov w0, w16 |
|||
;; lsr w0, w0, #2 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,44 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i32) |
|||
(local $foo i32) |
|||
(local $bar i32) |
|||
|
|||
(i32.const 1) |
|||
(local.set $foo) |
|||
|
|||
(i32.const 2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
(i32.shr_u) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x10] |
|||
;; stur x1, [x28, #8] |
|||
;; mov x16, #0 |
|||
;; stur x16, [x28] |
|||
;; mov x16, #1 |
|||
;; mov w0, w16 |
|||
;; stur w0, [x28, #4] |
|||
;; mov x16, #2 |
|||
;; mov w0, w16 |
|||
;; stur w0, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; lsr w1, w1, w0 |
|||
;; mov w0, w1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param i32) (param i32) (result i32) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(i32.shr_u) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x10] |
|||
;; stur x1, [x28, #8] |
|||
;; stur w2, [x28, #4] |
|||
;; stur w3, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; lsr w1, w1, w0 |
|||
;; mov w0, w1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,26 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i32) |
|||
(i32.const 1) |
|||
(i32.const 2) |
|||
(i32.xor) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #1 |
|||
;; mov w0, w16 |
|||
;; eor w0, w0, #2 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,44 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i32) |
|||
(local $foo i32) |
|||
(local $bar i32) |
|||
|
|||
(i32.const 1) |
|||
(local.set $foo) |
|||
|
|||
(i32.const 2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
(i32.xor) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x10] |
|||
;; stur x1, [x28, #8] |
|||
;; mov x16, #0 |
|||
;; stur x16, [x28] |
|||
;; mov x16, #1 |
|||
;; mov w0, w16 |
|||
;; stur w0, [x28, #4] |
|||
;; mov x16, #2 |
|||
;; mov w0, w16 |
|||
;; stur w0, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; eor w1, w1, w0 |
|||
;; mov w0, w1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param i32) (param i32) (result i32) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(i32.xor) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x10] |
|||
;; stur x1, [x28, #8] |
|||
;; stur w2, [x28, #4] |
|||
;; stur w3, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; eor w1, w1, w0 |
|||
;; mov w0, w1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,26 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i64) |
|||
(i64.const 2) |
|||
(i64.const 3) |
|||
(i64.and) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #2 |
|||
;; mov x0, x16 |
|||
;; and x0, x0, #3 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,26 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i64) |
|||
(i64.const 9223372036854775806) |
|||
(i64.const 9223372036854775807) |
|||
(i64.and) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; orr x16, xzr, #0x7ffffffffffffffe |
|||
;; mov x0, x16 |
|||
;; and x0, x0, #0x7fffffffffffffff |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,44 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i64) |
|||
(local $foo i64) |
|||
(local $bar i64) |
|||
|
|||
(i64.const 2) |
|||
(local.set $foo) |
|||
(i64.const 3) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
(i64.and) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x18] |
|||
;; stur x1, [x28, #0x10] |
|||
;; mov x16, #0 |
|||
;; stur x16, [x28, #8] |
|||
;; stur x16, [x28] |
|||
;; mov x16, #2 |
|||
;; mov x0, x16 |
|||
;; stur x0, [x28, #8] |
|||
;; mov x16, #3 |
|||
;; mov x0, x16 |
|||
;; stur x0, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; and x1, x1, x0 |
|||
;; mov x0, x1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param i64) (param i64) (result i64) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(i64.and) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x18] |
|||
;; stur x1, [x28, #0x10] |
|||
;; stur x2, [x28, #8] |
|||
;; stur x3, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; and x1, x1, x0 |
|||
;; mov x0, x1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,26 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i64) |
|||
(i64.const 2) |
|||
(i64.const 3) |
|||
(i64.or) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #2 |
|||
;; mov x0, x16 |
|||
;; orr x0, x0, #3 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,26 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i64) |
|||
(i64.const 9223372036854775806) |
|||
(i64.const 9223372036854775807) |
|||
(i64.or) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; orr x16, xzr, #0x7ffffffffffffffe |
|||
;; mov x0, x16 |
|||
;; orr x0, x0, #0x7fffffffffffffff |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,44 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i64) |
|||
(local $foo i64) |
|||
(local $bar i64) |
|||
|
|||
(i64.const 2) |
|||
(local.set $foo) |
|||
(i64.const 3) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
(i64.or) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x18] |
|||
;; stur x1, [x28, #0x10] |
|||
;; mov x16, #0 |
|||
;; stur x16, [x28, #8] |
|||
;; stur x16, [x28] |
|||
;; mov x16, #2 |
|||
;; mov x0, x16 |
|||
;; stur x0, [x28, #8] |
|||
;; mov x16, #3 |
|||
;; mov x0, x16 |
|||
;; stur x0, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; orr x1, x1, x0 |
|||
;; mov x0, x1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param i64) (param i64) (result i64) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(i64.or) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x18] |
|||
;; stur x1, [x28, #0x10] |
|||
;; stur x2, [x28, #8] |
|||
;; stur x3, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; orr x1, x1, x0 |
|||
;; mov x0, x1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,28 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i64) |
|||
(i64.const 1) |
|||
(i64.const 512) |
|||
(i64.rotl) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #1 |
|||
;; mov x0, x16 |
|||
;; sub x0, x0, xzr |
|||
;; mov x16, #0x200 |
|||
;; ror x0, x0, x16 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,27 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i64) |
|||
(i64.const 1) |
|||
(i64.const 2) |
|||
(i64.rotl) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #1 |
|||
;; mov x0, x16 |
|||
;; sub x0, x0, xzr |
|||
;; ror x0, x0, #2 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,46 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i64) |
|||
(local $foo i64) |
|||
(local $bar i64) |
|||
|
|||
(i64.const 1) |
|||
(local.set $foo) |
|||
|
|||
(i64.const 2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
(i64.rotl) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x18] |
|||
;; stur x1, [x28, #0x10] |
|||
;; mov x16, #0 |
|||
;; stur x16, [x28, #8] |
|||
;; stur x16, [x28] |
|||
;; mov x16, #1 |
|||
;; mov x0, x16 |
|||
;; stur x0, [x28, #8] |
|||
;; mov x16, #2 |
|||
;; mov x0, x16 |
|||
;; stur x0, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; sub x0, x0, xzr |
|||
;; ror x1, x1, x0 |
|||
;; mov x0, x1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,30 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param i64) (param i64) (result i64) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(i64.rotl) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x18] |
|||
;; stur x1, [x28, #0x10] |
|||
;; stur x2, [x28, #8] |
|||
;; stur x3, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; sub x0, x0, xzr |
|||
;; ror x1, x1, x0 |
|||
;; mov x0, x1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,27 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i64) |
|||
(i64.const 1) |
|||
(i64.const 512) |
|||
(i64.rotr) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #1 |
|||
;; mov x0, x16 |
|||
;; mov x16, #0x200 |
|||
;; ror x0, x0, x16 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,26 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i64) |
|||
(i64.const 1) |
|||
(i64.const 2) |
|||
(i64.rotr) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #1 |
|||
;; mov x0, x16 |
|||
;; ror x0, x0, #2 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,45 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i64) |
|||
(local $foo i64) |
|||
(local $bar i64) |
|||
|
|||
(i64.const 1) |
|||
(local.set $foo) |
|||
|
|||
(i64.const 2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
(i64.rotr) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x18] |
|||
;; stur x1, [x28, #0x10] |
|||
;; mov x16, #0 |
|||
;; stur x16, [x28, #8] |
|||
;; stur x16, [x28] |
|||
;; mov x16, #1 |
|||
;; mov x0, x16 |
|||
;; stur x0, [x28, #8] |
|||
;; mov x16, #2 |
|||
;; mov x0, x16 |
|||
;; stur x0, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; ror x1, x1, x0 |
|||
;; mov x0, x1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param i64) (param i64) (result i64) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(i64.rotr) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x18] |
|||
;; stur x1, [x28, #0x10] |
|||
;; stur x2, [x28, #8] |
|||
;; stur x3, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; ror x1, x1, x0 |
|||
;; mov x0, x1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,27 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i64) |
|||
(i64.const 1) |
|||
(i64.const 512) |
|||
(i64.shl) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #1 |
|||
;; mov x0, x16 |
|||
;; mov x16, #0x200 |
|||
;; lsl x0, x0, x16 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,26 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i64) |
|||
(i64.const 1) |
|||
(i64.const 2) |
|||
(i64.shl) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #1 |
|||
;; mov x0, x16 |
|||
;; lsl x0, x0, #2 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,45 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i64) |
|||
(local $foo i64) |
|||
(local $bar i64) |
|||
|
|||
(i64.const 1) |
|||
(local.set $foo) |
|||
|
|||
(i64.const 2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
(i64.shl) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x18] |
|||
;; stur x1, [x28, #0x10] |
|||
;; mov x16, #0 |
|||
;; stur x16, [x28, #8] |
|||
;; stur x16, [x28] |
|||
;; mov x16, #1 |
|||
;; mov x0, x16 |
|||
;; stur x0, [x28, #8] |
|||
;; mov x16, #2 |
|||
;; mov x0, x16 |
|||
;; stur x0, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; lsl x1, x1, x0 |
|||
;; mov x0, x1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param i64) (param i64) (result i64) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(i64.shl) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x18] |
|||
;; stur x1, [x28, #0x10] |
|||
;; stur x2, [x28, #8] |
|||
;; stur x3, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; lsl x1, x1, x0 |
|||
;; mov x0, x1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,27 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i64) |
|||
(i64.const 1) |
|||
(i64.const 512) |
|||
(i64.shr_s) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #1 |
|||
;; mov x0, x16 |
|||
;; mov x16, #0x200 |
|||
;; asr x0, x0, x16 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,26 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i64) |
|||
(i64.const 1) |
|||
(i64.const 2) |
|||
(i64.shr_s) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #1 |
|||
;; mov x0, x16 |
|||
;; asr x0, x0, #2 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,45 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i64) |
|||
(local $foo i64) |
|||
(local $bar i64) |
|||
|
|||
(i64.const 1) |
|||
(local.set $foo) |
|||
|
|||
(i64.const 2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
(i64.shr_s) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x18] |
|||
;; stur x1, [x28, #0x10] |
|||
;; mov x16, #0 |
|||
;; stur x16, [x28, #8] |
|||
;; stur x16, [x28] |
|||
;; mov x16, #1 |
|||
;; mov x0, x16 |
|||
;; stur x0, [x28, #8] |
|||
;; mov x16, #2 |
|||
;; mov x0, x16 |
|||
;; stur x0, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; asr x1, x1, x0 |
|||
;; mov x0, x1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param i64) (param i64) (result i64) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(i64.shr_s) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x18] |
|||
;; stur x1, [x28, #0x10] |
|||
;; stur x2, [x28, #8] |
|||
;; stur x3, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; asr x1, x1, x0 |
|||
;; mov x0, x1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,27 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i64) |
|||
(i64.const 1) |
|||
(i64.const 512) |
|||
(i64.shr_u) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #1 |
|||
;; mov x0, x16 |
|||
;; mov x16, #0x200 |
|||
;; lsr x0, x0, x16 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,26 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i64) |
|||
(i64.const 1) |
|||
(i64.const 2) |
|||
(i64.shr_u) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #1 |
|||
;; mov x0, x16 |
|||
;; lsr x0, x0, #2 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,45 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i64) |
|||
(local $foo i64) |
|||
(local $bar i64) |
|||
|
|||
(i64.const 1) |
|||
(local.set $foo) |
|||
|
|||
(i64.const 2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
(i64.shr_u) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x18] |
|||
;; stur x1, [x28, #0x10] |
|||
;; mov x16, #0 |
|||
;; stur x16, [x28, #8] |
|||
;; stur x16, [x28] |
|||
;; mov x16, #1 |
|||
;; mov x0, x16 |
|||
;; stur x0, [x28, #8] |
|||
;; mov x16, #2 |
|||
;; mov x0, x16 |
|||
;; stur x0, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; lsr x1, x1, x0 |
|||
;; mov x0, x1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param i64) (param i64) (result i64) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(i64.shr_u) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x18] |
|||
;; stur x1, [x28, #0x10] |
|||
;; stur x2, [x28, #8] |
|||
;; stur x3, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; lsr x1, x1, x0 |
|||
;; mov x0, x1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,26 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i64) |
|||
(i64.const 2) |
|||
(i64.const 3) |
|||
(i64.xor) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; mov x16, #2 |
|||
;; mov x0, x16 |
|||
;; eor x0, x0, #3 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,26 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i64) |
|||
(i64.const 9223372036854775806) |
|||
(i64.const 9223372036854775807) |
|||
(i64.xor) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; orr x16, xzr, #0x7ffffffffffffffe |
|||
;; mov x0, x16 |
|||
;; eor x0, x0, #0x7fffffffffffffff |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,44 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result i64) |
|||
(local $foo i64) |
|||
(local $bar i64) |
|||
|
|||
(i64.const 2) |
|||
(local.set $foo) |
|||
(i64.const 3) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
(i64.xor) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x18] |
|||
;; stur x1, [x28, #0x10] |
|||
;; mov x16, #0 |
|||
;; stur x16, [x28, #8] |
|||
;; stur x16, [x28] |
|||
;; mov x16, #2 |
|||
;; mov x0, x16 |
|||
;; stur x0, [x28, #8] |
|||
;; mov x16, #3 |
|||
;; mov x0, x16 |
|||
;; stur x0, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; eor x1, x1, x0 |
|||
;; mov x0, x1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param i64) (param i64) (result i64) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(i64.xor) |
|||
) |
|||
) |
|||
;; wasm[0]::function[0]: |
|||
;; stp x29, x30, [sp, #-0x10]! |
|||
;; mov x29, sp |
|||
;; mov x28, sp |
|||
;; mov x9, x0 |
|||
;; sub sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; stur x0, [x28, #0x18] |
|||
;; stur x1, [x28, #0x10] |
|||
;; stur x2, [x28, #8] |
|||
;; stur x3, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; eor x1, x1, x0 |
|||
;; mov x0, x1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
Loading…
Reference in new issue