Browse Source
* winch(arm64): fpu arithmetics (add, sub, mul, div, min, max) Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com> * disas: add fpu test cases (add) Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com> * winch(arm64): regalloc for fpu Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com> * disas: add fpu test cases (add64) Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com> * disas: add fpu test cases Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Saúl Cabrera <saulecabrera@gmail.com> * Apply suggestions from code review Co-authored-by: Saúl Cabrera <saulecabrera@gmail.com> * add todo for f32 mov Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com> --------- Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com> Co-authored-by: Saúl Cabrera <saulecabrera@gmail.com>pull/8372/head
Edoardo Vacchi
7 months ago
committed by
GitHub
43 changed files with 1444 additions and 23 deletions
@ -0,0 +1,31 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result f32) |
|||
(f32.const 1.1) |
|||
(f32.const 2.2) |
|||
(f32.add) |
|||
) |
|||
) |
|||
;; 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 w16, #0xcccd |
|||
;; movk w16, #0x400c, lsl #16 |
|||
;; fmov s0, w16 |
|||
;; mov w16, #0xcccd |
|||
;; movk w16, #0x3f8c, lsl #16 |
|||
;; fmov s1, w16 |
|||
;; fadd s1, s1, s0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,46 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result f32) |
|||
(local $foo f32) |
|||
(local $bar f32) |
|||
|
|||
(f32.const 1.1) |
|||
(local.set $foo) |
|||
|
|||
(f32.const 2.2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
f32.add |
|||
) |
|||
) |
|||
;; 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 w16, #0xcccd |
|||
;; movk w16, #0x3f8c, lsl #16 |
|||
;; fmov s0, w16 |
|||
;; stur w0, [x28, #4] |
|||
;; mov w16, #0xcccd |
|||
;; movk w16, #0x400c, lsl #16 |
|||
;; fmov s0, w16 |
|||
;; stur w0, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; fadd s1, s1, s0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param f32) (param f32) (result f32) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(f32.add) |
|||
) |
|||
) |
|||
;; 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 w0, [x28, #4] |
|||
;; stur w1, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; fadd s1, s1, s0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,31 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result f32) |
|||
(f32.const 1.1) |
|||
(f32.const 2.2) |
|||
(f32.div) |
|||
) |
|||
) |
|||
;; 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 w16, #0xcccd |
|||
;; movk w16, #0x400c, lsl #16 |
|||
;; fmov s0, w16 |
|||
;; mov w16, #0xcccd |
|||
;; movk w16, #0x3f8c, lsl #16 |
|||
;; fmov s1, w16 |
|||
;; fdiv s1, s1, s0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,46 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result f32) |
|||
(local $foo f32) |
|||
(local $bar f32) |
|||
|
|||
(f32.const 1.1) |
|||
(local.set $foo) |
|||
|
|||
(f32.const 2.2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
f32.div |
|||
) |
|||
) |
|||
;; 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 w16, #0xcccd |
|||
;; movk w16, #0x3f8c, lsl #16 |
|||
;; fmov s0, w16 |
|||
;; stur w0, [x28, #4] |
|||
;; mov w16, #0xcccd |
|||
;; movk w16, #0x400c, lsl #16 |
|||
;; fmov s0, w16 |
|||
;; stur w0, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; fdiv s1, s1, s0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param f32) (param f32) (result f32) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(f32.div) |
|||
) |
|||
) |
|||
;; 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 w0, [x28, #4] |
|||
;; stur w1, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; fdiv s1, s1, s0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,31 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result f32) |
|||
(f32.const 1.1) |
|||
(f32.const 2.2) |
|||
(f32.max) |
|||
) |
|||
) |
|||
;; 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 w16, #0xcccd |
|||
;; movk w16, #0x400c, lsl #16 |
|||
;; fmov s0, w16 |
|||
;; mov w16, #0xcccd |
|||
;; movk w16, #0x3f8c, lsl #16 |
|||
;; fmov s1, w16 |
|||
;; fmax s1, s1, s0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,46 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result f32) |
|||
(local $foo f32) |
|||
(local $bar f32) |
|||
|
|||
(f32.const 1.1) |
|||
(local.set $foo) |
|||
|
|||
(f32.const 2.2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
f32.max |
|||
) |
|||
) |
|||
;; 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 w16, #0xcccd |
|||
;; movk w16, #0x3f8c, lsl #16 |
|||
;; fmov s0, w16 |
|||
;; stur w0, [x28, #4] |
|||
;; mov w16, #0xcccd |
|||
;; movk w16, #0x400c, lsl #16 |
|||
;; fmov s0, w16 |
|||
;; stur w0, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; fmax s1, s1, s0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param f32) (param f32) (result f32) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(f32.max) |
|||
) |
|||
) |
|||
;; 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 w0, [x28, #4] |
|||
;; stur w1, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; fmax s1, s1, s0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,31 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result f32) |
|||
(f32.const 1.1) |
|||
(f32.const 2.2) |
|||
(f32.min) |
|||
) |
|||
) |
|||
;; 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 w16, #0xcccd |
|||
;; movk w16, #0x400c, lsl #16 |
|||
;; fmov s0, w16 |
|||
;; mov w16, #0xcccd |
|||
;; movk w16, #0x3f8c, lsl #16 |
|||
;; fmov s1, w16 |
|||
;; fmin s1, s1, s0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,46 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result f32) |
|||
(local $foo f32) |
|||
(local $bar f32) |
|||
|
|||
(f32.const 1.1) |
|||
(local.set $foo) |
|||
|
|||
(f32.const 2.2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
f32.min |
|||
) |
|||
) |
|||
;; 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 w16, #0xcccd |
|||
;; movk w16, #0x3f8c, lsl #16 |
|||
;; fmov s0, w16 |
|||
;; stur w0, [x28, #4] |
|||
;; mov w16, #0xcccd |
|||
;; movk w16, #0x400c, lsl #16 |
|||
;; fmov s0, w16 |
|||
;; stur w0, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; fmin s1, s1, s0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param f32) (param f32) (result f32) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(f32.min) |
|||
) |
|||
) |
|||
;; 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 w0, [x28, #4] |
|||
;; stur w1, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; fmin s1, s1, s0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,31 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result f32) |
|||
(f32.const 1.1) |
|||
(f32.const 2.2) |
|||
(f32.mul) |
|||
) |
|||
) |
|||
;; 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 w16, #0xcccd |
|||
;; movk w16, #0x400c, lsl #16 |
|||
;; fmov s0, w16 |
|||
;; mov w16, #0xcccd |
|||
;; movk w16, #0x3f8c, lsl #16 |
|||
;; fmov s1, w16 |
|||
;; fmul s1, s1, s0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,46 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result f32) |
|||
(local $foo f32) |
|||
(local $bar f32) |
|||
|
|||
(f32.const 1.1) |
|||
(local.set $foo) |
|||
|
|||
(f32.const 2.2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
f32.mul |
|||
) |
|||
) |
|||
;; 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 w16, #0xcccd |
|||
;; movk w16, #0x3f8c, lsl #16 |
|||
;; fmov s0, w16 |
|||
;; stur w0, [x28, #4] |
|||
;; mov w16, #0xcccd |
|||
;; movk w16, #0x400c, lsl #16 |
|||
;; fmov s0, w16 |
|||
;; stur w0, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; fmul s1, s1, s0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param f32) (param f32) (result f32) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(f32.mul) |
|||
) |
|||
) |
|||
;; 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 w0, [x28, #4] |
|||
;; stur w1, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; fmul s1, s1, s0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,31 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result f32) |
|||
(f32.const 1.1) |
|||
(f32.const 2.2) |
|||
(f32.sub) |
|||
) |
|||
) |
|||
;; 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 w16, #0xcccd |
|||
;; movk w16, #0x400c, lsl #16 |
|||
;; fmov s0, w16 |
|||
;; mov w16, #0xcccd |
|||
;; movk w16, #0x3f8c, lsl #16 |
|||
;; fmov s1, w16 |
|||
;; fsub s1, s1, s0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,46 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result f32) |
|||
(local $foo f32) |
|||
(local $bar f32) |
|||
|
|||
(f32.const 1.1) |
|||
(local.set $foo) |
|||
|
|||
(f32.const 2.2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
f32.sub |
|||
) |
|||
) |
|||
;; 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 w16, #0xcccd |
|||
;; movk w16, #0x3f8c, lsl #16 |
|||
;; fmov s0, w16 |
|||
;; stur w0, [x28, #4] |
|||
;; mov w16, #0xcccd |
|||
;; movk w16, #0x400c, lsl #16 |
|||
;; fmov s0, w16 |
|||
;; stur w0, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; fsub s1, s1, s0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param f32) (param f32) (result f32) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(f32.sub) |
|||
) |
|||
) |
|||
;; 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 w0, [x28, #4] |
|||
;; stur w1, [x28] |
|||
;; ldur w0, [x28] |
|||
;; ldur w1, [x28, #4] |
|||
;; fsub s1, s1, s0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x18 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,35 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result f64) |
|||
(f64.const 1.1) |
|||
(f64.const 2.2) |
|||
(f64.add) |
|||
) |
|||
) |
|||
;; 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, #0x999a |
|||
;; movk x16, #0x9999, lsl #16 |
|||
;; movk x16, #0x9999, lsl #32 |
|||
;; movk x16, #0x4001, lsl #48 |
|||
;; fmov d0, x16 |
|||
;; mov x16, #0x999a |
|||
;; movk x16, #0x9999, lsl #16 |
|||
;; movk x16, #0x9999, lsl #32 |
|||
;; movk x16, #0x3ff1, lsl #48 |
|||
;; fmov d1, x16 |
|||
;; fadd d1, d1, d0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,51 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result f64) |
|||
(local $foo f64) |
|||
(local $bar f64) |
|||
|
|||
(f64.const 1.1) |
|||
(local.set $foo) |
|||
|
|||
(f64.const 2.2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
f64.add |
|||
) |
|||
) |
|||
;; 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, #0x999a |
|||
;; movk x16, #0x9999, lsl #16 |
|||
;; movk x16, #0x9999, lsl #32 |
|||
;; movk x16, #0x3ff1, lsl #48 |
|||
;; fmov d0, x16 |
|||
;; stur x0, [x28, #8] |
|||
;; mov x16, #0x999a |
|||
;; movk x16, #0x9999, lsl #16 |
|||
;; movk x16, #0x9999, lsl #32 |
|||
;; movk x16, #0x4001, lsl #48 |
|||
;; fmov d0, x16 |
|||
;; stur x0, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; fadd d1, d1, d0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param f64) (param f64) (result f64) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(f64.add) |
|||
) |
|||
) |
|||
;; 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 x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; fadd d1, d1, d0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,35 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result f64) |
|||
(f64.const 1.1) |
|||
(f64.const 2.2) |
|||
(f64.div) |
|||
) |
|||
) |
|||
;; 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, #0x999a |
|||
;; movk x16, #0x9999, lsl #16 |
|||
;; movk x16, #0x9999, lsl #32 |
|||
;; movk x16, #0x4001, lsl #48 |
|||
;; fmov d0, x16 |
|||
;; mov x16, #0x999a |
|||
;; movk x16, #0x9999, lsl #16 |
|||
;; movk x16, #0x9999, lsl #32 |
|||
;; movk x16, #0x3ff1, lsl #48 |
|||
;; fmov d1, x16 |
|||
;; fdiv d1, d1, d0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,51 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result f64) |
|||
(local $foo f64) |
|||
(local $bar f64) |
|||
|
|||
(f64.const 1.1) |
|||
(local.set $foo) |
|||
|
|||
(f64.const 2.2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
f64.div |
|||
) |
|||
) |
|||
;; 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, #0x999a |
|||
;; movk x16, #0x9999, lsl #16 |
|||
;; movk x16, #0x9999, lsl #32 |
|||
;; movk x16, #0x3ff1, lsl #48 |
|||
;; fmov d0, x16 |
|||
;; stur x0, [x28, #8] |
|||
;; mov x16, #0x999a |
|||
;; movk x16, #0x9999, lsl #16 |
|||
;; movk x16, #0x9999, lsl #32 |
|||
;; movk x16, #0x4001, lsl #48 |
|||
;; fmov d0, x16 |
|||
;; stur x0, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; fdiv d1, d1, d0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param f64) (param f64) (result f64) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(f64.div) |
|||
) |
|||
) |
|||
;; 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 x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; fdiv d1, d1, d0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,35 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result f64) |
|||
(f64.const 1.1) |
|||
(f64.const 2.2) |
|||
(f64.max) |
|||
) |
|||
) |
|||
;; 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, #0x999a |
|||
;; movk x16, #0x9999, lsl #16 |
|||
;; movk x16, #0x9999, lsl #32 |
|||
;; movk x16, #0x4001, lsl #48 |
|||
;; fmov d0, x16 |
|||
;; mov x16, #0x999a |
|||
;; movk x16, #0x9999, lsl #16 |
|||
;; movk x16, #0x9999, lsl #32 |
|||
;; movk x16, #0x3ff1, lsl #48 |
|||
;; fmov d1, x16 |
|||
;; fmax d1, d1, d0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,51 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result f64) |
|||
(local $foo f64) |
|||
(local $bar f64) |
|||
|
|||
(f64.const 1.1) |
|||
(local.set $foo) |
|||
|
|||
(f64.const 2.2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
f64.max |
|||
) |
|||
) |
|||
;; 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, #0x999a |
|||
;; movk x16, #0x9999, lsl #16 |
|||
;; movk x16, #0x9999, lsl #32 |
|||
;; movk x16, #0x3ff1, lsl #48 |
|||
;; fmov d0, x16 |
|||
;; stur x0, [x28, #8] |
|||
;; mov x16, #0x999a |
|||
;; movk x16, #0x9999, lsl #16 |
|||
;; movk x16, #0x9999, lsl #32 |
|||
;; movk x16, #0x4001, lsl #48 |
|||
;; fmov d0, x16 |
|||
;; stur x0, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; fmax d1, d1, d0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param f64) (param f64) (result f64) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(f64.max) |
|||
) |
|||
) |
|||
;; 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 x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; fmax d1, d1, d0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,35 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result f64) |
|||
(f64.const 1.1) |
|||
(f64.const 2.2) |
|||
(f64.min) |
|||
) |
|||
) |
|||
;; 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, #0x999a |
|||
;; movk x16, #0x9999, lsl #16 |
|||
;; movk x16, #0x9999, lsl #32 |
|||
;; movk x16, #0x4001, lsl #48 |
|||
;; fmov d0, x16 |
|||
;; mov x16, #0x999a |
|||
;; movk x16, #0x9999, lsl #16 |
|||
;; movk x16, #0x9999, lsl #32 |
|||
;; movk x16, #0x3ff1, lsl #48 |
|||
;; fmov d1, x16 |
|||
;; fmin d1, d1, d0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,51 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result f64) |
|||
(local $foo f64) |
|||
(local $bar f64) |
|||
|
|||
(f64.const 1.1) |
|||
(local.set $foo) |
|||
|
|||
(f64.const 2.2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
f64.min |
|||
) |
|||
) |
|||
;; 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, #0x999a |
|||
;; movk x16, #0x9999, lsl #16 |
|||
;; movk x16, #0x9999, lsl #32 |
|||
;; movk x16, #0x3ff1, lsl #48 |
|||
;; fmov d0, x16 |
|||
;; stur x0, [x28, #8] |
|||
;; mov x16, #0x999a |
|||
;; movk x16, #0x9999, lsl #16 |
|||
;; movk x16, #0x9999, lsl #32 |
|||
;; movk x16, #0x4001, lsl #48 |
|||
;; fmov d0, x16 |
|||
;; stur x0, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; fmin d1, d1, d0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param f64) (param f64) (result f64) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(f64.min) |
|||
) |
|||
) |
|||
;; 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 x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; fmin d1, d1, d0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,35 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result f64) |
|||
(f64.const 1.1) |
|||
(f64.const 2.2) |
|||
(f64.mul) |
|||
) |
|||
) |
|||
;; 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, #0x999a |
|||
;; movk x16, #0x9999, lsl #16 |
|||
;; movk x16, #0x9999, lsl #32 |
|||
;; movk x16, #0x4001, lsl #48 |
|||
;; fmov d0, x16 |
|||
;; mov x16, #0x999a |
|||
;; movk x16, #0x9999, lsl #16 |
|||
;; movk x16, #0x9999, lsl #32 |
|||
;; movk x16, #0x3ff1, lsl #48 |
|||
;; fmov d1, x16 |
|||
;; fmul d1, d1, d0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,51 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result f64) |
|||
(local $foo f64) |
|||
(local $bar f64) |
|||
|
|||
(f64.const 1.1) |
|||
(local.set $foo) |
|||
|
|||
(f64.const 2.2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
f64.mul |
|||
) |
|||
) |
|||
;; 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, #0x999a |
|||
;; movk x16, #0x9999, lsl #16 |
|||
;; movk x16, #0x9999, lsl #32 |
|||
;; movk x16, #0x3ff1, lsl #48 |
|||
;; fmov d0, x16 |
|||
;; stur x0, [x28, #8] |
|||
;; mov x16, #0x999a |
|||
;; movk x16, #0x9999, lsl #16 |
|||
;; movk x16, #0x9999, lsl #32 |
|||
;; movk x16, #0x4001, lsl #48 |
|||
;; fmov d0, x16 |
|||
;; stur x0, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; fmul d1, d1, d0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param f64) (param f64) (result f64) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(f64.mul) |
|||
) |
|||
) |
|||
;; 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 x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; fmul d1, d1, d0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,35 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result f64) |
|||
(f64.const 1.1) |
|||
(f64.const 2.2) |
|||
(f64.sub) |
|||
) |
|||
) |
|||
;; 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, #0x999a |
|||
;; movk x16, #0x9999, lsl #16 |
|||
;; movk x16, #0x9999, lsl #32 |
|||
;; movk x16, #0x4001, lsl #48 |
|||
;; fmov d0, x16 |
|||
;; mov x16, #0x999a |
|||
;; movk x16, #0x9999, lsl #16 |
|||
;; movk x16, #0x9999, lsl #32 |
|||
;; movk x16, #0x3ff1, lsl #48 |
|||
;; fmov d1, x16 |
|||
;; fsub d1, d1, d0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x10 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,51 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (result f64) |
|||
(local $foo f64) |
|||
(local $bar f64) |
|||
|
|||
(f64.const 1.1) |
|||
(local.set $foo) |
|||
|
|||
(f64.const 2.2) |
|||
(local.set $bar) |
|||
|
|||
(local.get $foo) |
|||
(local.get $bar) |
|||
f64.sub |
|||
) |
|||
) |
|||
;; 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, #0x999a |
|||
;; movk x16, #0x9999, lsl #16 |
|||
;; movk x16, #0x9999, lsl #32 |
|||
;; movk x16, #0x3ff1, lsl #48 |
|||
;; fmov d0, x16 |
|||
;; stur x0, [x28, #8] |
|||
;; mov x16, #0x999a |
|||
;; movk x16, #0x9999, lsl #16 |
|||
;; movk x16, #0x9999, lsl #32 |
|||
;; movk x16, #0x4001, lsl #48 |
|||
;; fmov d0, x16 |
|||
;; stur x0, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; fsub d1, d1, d0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
@ -0,0 +1,29 @@ |
|||
;;! target = "aarch64" |
|||
;;! test = "winch" |
|||
|
|||
(module |
|||
(func (param f64) (param f64) (result f64) |
|||
(local.get 0) |
|||
(local.get 1) |
|||
(f64.sub) |
|||
) |
|||
) |
|||
;; 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 x0, [x28, #8] |
|||
;; stur x1, [x28] |
|||
;; ldur x0, [x28] |
|||
;; ldur x1, [x28, #8] |
|||
;; fsub d1, d1, d0 |
|||
;; fmov d0, d1 |
|||
;; add sp, sp, #0x20 |
|||
;; mov x28, sp |
|||
;; ldp x29, x30, [sp], #0x10 |
|||
;; ret |
Loading…
Reference in new issue