Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

1.2 KB
Raw Blame
;;! target = "aarch64"
;;! test = "winch"

(module
    (func (result i64)
        (f32.const 1.0)
        (i64.trunc_f32_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    #0x80
;;   2c: mov     x9, x0
;;       sub     x28, x28, #0x10
;;       mov     sp, x28
;;       stur    x0, [x28, #8]
;;       stur    x1, [x28]
;;       fmov    s0, #1.00000000
;;       fcmp    s0, s0
;;       b.vs    #0x84
;;   4c: ldr     s31, #0x90
;;       fcmp    s0, s31
;;       b.le    #0x88
;;   58: ldr     s31, #0x98
;;       fcmp    s0, s31
;;       b.ge    #0x8c
;;   64: fcvtzs  x0, s0
;;       add     x28, x28, #0x10
;;       mov     sp, x28
;;       mov     sp, x28
;;       ldr     x28, [sp], #0x10
;;       ldp     x29, x30, [sp], #0x10
;;       ret
;;   80: udf     #0xc11f
;;   84: udf     #0xc11f
;;   88: udf     #0xc11f
;;   8c: udf     #0xc11f
;;   90: .byte   0x01, 0x00, 0x00, 0xdf
;;   94: udf     #0
;;   98: .byte   0x00, 0x00, 0x00, 0x5f