diff options
author | Alon Zakai <azakai@google.com> | 2023-02-23 10:07:43 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-23 10:07:43 -0800 |
commit | 5a0aef47cda663b312c34454857601ee78d77ab6 (patch) | |
tree | 7912acd8f63f64c5cad51078af33534bee818000 /test/lit/ctor-eval | |
parent | e929b9c23cced499d08630c25a2991391cabdabb (diff) | |
download | binaryen-5a0aef47cda663b312c34454857601ee78d77ab6.tar.gz binaryen-5a0aef47cda663b312c34454857601ee78d77ab6.tar.bz2 binaryen-5a0aef47cda663b312c34454857601ee78d77ab6.zip |
[wasm-ctor-eval] Add v128 load/store support (#5512)
Diffstat (limited to 'test/lit/ctor-eval')
-rw-r--r-- | test/lit/ctor-eval/v128.wast | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/test/lit/ctor-eval/v128.wast b/test/lit/ctor-eval/v128.wast new file mode 100644 index 000000000..1d6cf6947 --- /dev/null +++ b/test/lit/ctor-eval/v128.wast @@ -0,0 +1,43 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. +;; RUN: wasm-ctor-eval %s --ctors=v128 --kept-exports=v128 --quiet -all -S -o - | filecheck %s + +(module + ;; CHECK: (type $i32_=>_i32 (func (param i32) (result i32))) + + ;; CHECK: (type $none_=>_v128 (func (result v128))) + + ;; CHECK: (memory $0 (shared 16 17)) + (memory $0 (shared 16 17)) + + ;; CHECK: (data (i32.const 23) "\e0\ff\c0N\8e\00\00\fe\01\00\12\81\85\fd\ff\90") + + ;; CHECK: (export "v128" (func $v128_0)) + (export "v128" (func $v128)) + ;; CHECK: (export "keepalive" (func $keepalive)) + (export "keepalive" (func $keepalive)) + + (func $v128 (result v128) + (v128.store + (i32.const 23) + (v128.const i32x4 0x4ec0ffe0 0xfe00008e 0x81120001 0x90fffd85) + ) + (v128.load + (i32.const 23) + ) + ) + + ;; CHECK: (func $keepalive (type $i32_=>_i32) (param $x i32) (result i32) + ;; CHECK-NEXT: (i32.load + ;; CHECK-NEXT: (local.get $x) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + (func $keepalive (param $x i32) (result i32) + ;; Keep the memory alive. + (i32.load + (local.get $x) + ) + ) +) +;; CHECK: (func $v128_0 (type $none_=>_v128) (result v128) +;; CHECK-NEXT: (v128.const i32x4 0x4ec0ffe0 0xfe00008e 0x81120001 0x90fffd85) +;; CHECK-NEXT: ) |