A lightweight WebAssembly runtime that is fast, secure, and standards-compliant
;;! target = "aarch64"
;;! test = "winch"
(module
(func (result i64)
(i64.const 0)
(i64.const 0)
(i64.div_s)
)
)
;; wasm[0]::function[0]:
;; stp x29, x30, [sp, #-0x10]!
;; mov x29, sp
;; str x28, [sp, #-0x10]!
;; mov x28, sp
;; ldur x16, [x0, #8]
;; ldur x16, [x16, #0x18]
;; mov x17, #0
;; movk x17, #0x10
;; add x16, x16, x17
;; cmp sp, x16
;; b.lo #0x78
;; 2c: mov x9, x0
;; sub x28, x28, #0x10
;; mov sp, x28
;; stur x0, [x28, #8]
;; stur x1, [x28]
;; mov x0, #0
;; mov x1, #0
;; cbz x0, #0x7c
;; 4c: cmn x0, #1
;; ccmp x1, #1, #0, eq
;; b.vs #0x80
;; 58: sdiv x1, x1, x0
;; mov x0, x1
;; add x28, x28, #0x10
;; mov sp, x28
;; mov sp, x28
;; ldr x28, [sp], #0x10
;; ldp x29, x30, [sp], #0x10
;; ret
;; 78: udf #0xc11f
;; 7c: udf #0xc11f
;; 80: udf #0xc11f