simd-load-store.txt 689 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
;;; TOOL: run-interp
;;; ARGS*: --enable-simd
(module
  (memory 1)
  (data (i32.const 0) "\ff\ff\ff\ff")
  (data (i32.const 4) "\00\00\ce\41")
  (data (i32.const 8) "\00\00\00\00\00\ff\8f\40")
  (data (i32.const 16) "\ff\ff\ff\ff\ff\ff\ff\ff")

  ;; v128 load
  (func (export "v128_load_0") (result v128)
    i32.const 4
    v128.load)

  ;; v128 store
  (func (export "v128_store_0") (result v128)
    i32.const 4
    v128.const i32 0x11223344 0x55667788 0x99aabbcc 0xddeeff00
    v128.store
    i32.const 4
    v128.load)
)
(;; STDOUT ;;;
v128_load_0() => v128:0x41ce0000 0x00000000 0x408fff00 0xffffffff
v128_store_0() => v128:0x11223344 0x55667788 0x99aabbcc 0xddeeff00
;;; STDOUT ;;)