diff options
author | Alon Zakai <azakai@google.com> | 2022-08-18 09:48:18 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-18 09:48:18 -0700 |
commit | 296a63eaaabd28990d6b3acf63af3d9d21190b8d (patch) | |
tree | 430536ca67dddc0550faaf19f3948f0039fc7b24 /test | |
parent | 68bf5e3790c8ca95f52c5c5758775a592e708d77 (diff) | |
download | binaryen-296a63eaaabd28990d6b3acf63af3d9d21190b8d.tar.gz binaryen-296a63eaaabd28990d6b3acf63af3d9d21190b8d.tar.bz2 binaryen-296a63eaaabd28990d6b3acf63af3d9d21190b8d.zip |
Fix Memory64 binary parsing after #4811 (#4933)
Due to missing test coverage, we missed in #4811 that some memory operations
needed to get make64() called on them.
Diffstat (limited to 'test')
-rw-r--r-- | test/lit/memory64-ops.wast | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/lit/memory64-ops.wast b/test/lit/memory64-ops.wast new file mode 100644 index 000000000..5ed44df59 --- /dev/null +++ b/test/lit/memory64-ops.wast @@ -0,0 +1,32 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited. + +;; RUN: foreach %s %t wasm-opt -all --roundtrip -S -o - | filecheck %s + +(module + ;; CHECK: (memory $mem i64 1) + (memory $mem i64 1) + + ;; CHECK: (func $get_heap_size (result i64) + ;; CHECK-NEXT: (i64.shl + ;; CHECK-NEXT: (memory.size) + ;; CHECK-NEXT: (i64.const 16) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + (func $get_heap_size (result i64) + (i64.shl + (memory.size $mem) + (i64.const 16) + ) + ) + + ;; CHECK: (func $grow-heap (result i64) + ;; CHECK-NEXT: (memory.grow + ;; CHECK-NEXT: (i64.const 32) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + (func $grow-heap (result i64) + (memory.grow $mem + (i64.const 32) + ) + ) +) |