diff options
author | jgravelle-google <jgravelle@google.com> | 2016-10-04 11:27:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-04 11:27:25 -0700 |
commit | a78bd60bc68993c746a9f236d01558e04b6765bd (patch) | |
tree | a72a50c27fef3fe785051a48bb685b4a12cc0d42 | |
parent | be02365a017f93febcae641705945e9df55ff907 (diff) | |
download | binaryen-a78bd60bc68993c746a9f236d01558e04b6765bd.tar.gz binaryen-a78bd60bc68993c746a9f236d01558e04b6765bd.tar.bz2 binaryen-a78bd60bc68993c746a9f236d01558e04b6765bd.zip |
Update i64 stores for 0xc (#731)
* Update i64 stores for 0xc
* Update autogenerated LLVM tests
* Update known torture test failures
* Add i64.store32 test to unit.wast
-rw-r--r-- | src/passes/Print.cpp | 2 | ||||
-rw-r--r-- | test/llvm_autogenerated/i64-load-store-alignment.wast | 8 | ||||
-rw-r--r-- | test/llvm_autogenerated/store-trunc.wast | 2 | ||||
-rw-r--r-- | test/s2wasm_known_binaryen_shell_test_failures.txt | 4 | ||||
-rw-r--r-- | test/unit.wast | 7 | ||||
-rw-r--r-- | test/unit.wast.fromBinary | 7 | ||||
-rw-r--r-- | test/unit.wast.fromBinary.noDebugInfo | 7 |
7 files changed, 27 insertions, 10 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index e5487d58e..590f9bce2 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -299,7 +299,7 @@ struct PrintSExpression : public Visitor<PrintSExpression> { void visitStore(Store *curr) { o << '('; prepareColor(o) << printWasmType(curr->valueType) << ".store"; - if (curr->bytes < 4 || (curr->type == i64 && curr->bytes < 8)) { + if (curr->bytes < 4 || (curr->valueType == i64 && curr->bytes < 8)) { if (curr->bytes == 1) { o << '8'; } else if (curr->bytes == 2) { diff --git a/test/llvm_autogenerated/i64-load-store-alignment.wast b/test/llvm_autogenerated/i64-load-store-alignment.wast index 8db61465b..929f68618 100644 --- a/test/llvm_autogenerated/i64-load-store-alignment.wast +++ b/test/llvm_autogenerated/i64-load-store-alignment.wast @@ -217,28 +217,28 @@ (return) ) (func $sti32_a1 (param $0 i32) (param $1 i64) - (i64.store align=1 + (i64.store32 align=1 (get_local $0) (get_local $1) ) (return) ) (func $sti32_a2 (param $0 i32) (param $1 i64) - (i64.store align=2 + (i64.store32 align=2 (get_local $0) (get_local $1) ) (return) ) (func $sti32_a4 (param $0 i32) (param $1 i64) - (i64.store + (i64.store32 (get_local $0) (get_local $1) ) (return) ) (func $sti32_a8 (param $0 i32) (param $1 i64) - (i64.store + (i64.store32 (get_local $0) (get_local $1) ) diff --git a/test/llvm_autogenerated/store-trunc.wast b/test/llvm_autogenerated/store-trunc.wast index a6249c9fa..6fd2f9896 100644 --- a/test/llvm_autogenerated/store-trunc.wast +++ b/test/llvm_autogenerated/store-trunc.wast @@ -34,7 +34,7 @@ ) ) (func $trunc_i32_i64 (param $0 i32) (param $1 i64) - (i64.store + (i64.store32 (get_local $0) (get_local $1) ) diff --git a/test/s2wasm_known_binaryen_shell_test_failures.txt b/test/s2wasm_known_binaryen_shell_test_failures.txt index 75941a4f1..e007e305a 100644 --- a/test/s2wasm_known_binaryen_shell_test_failures.txt +++ b/test/s2wasm_known_binaryen_shell_test_failures.txt @@ -55,7 +55,6 @@ complex-7.c.s.wast 920612-1.c.s.wast 920625-1.c.s.wast 920711-1.c.s.wast -930126-1.c.s.wast 931004-10.c.s.wast 931004-12.c.s.wast 931004-14.c.s.wast @@ -149,6 +148,3 @@ va-arg-22.c.s.wast # memcpy va-arg-21.c.s.wast # malloc vprintf-chk-1.c.s.wast # vprintf vprintf-1.c.s.wast # vprintf - -# new in 0xc -930126-1.c.s.wast # called abort() diff --git a/test/unit.wast b/test/unit.wast index 56d77310a..9aa256298 100644 --- a/test/unit.wast +++ b/test/unit.wast @@ -10,6 +10,7 @@ (type $6 (func (param i32) (result i32))) (type $7 (func (param f64) (result f64))) (type $8 (func (result i64))) + (type $9 (func (param i32 i64))) (import "env" "_emscripten_asm_const_vi" (func $_emscripten_asm_const_vi)) (import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32))) (import "asm2wasm" "f64-rem" (func $f64-rem (param f64 f64) (result f64))) @@ -440,4 +441,10 @@ (func $big-i64 (type $8) (result i64) (i64.const -9218868437227405313) ) + (func $i64-store32 (type $9) (param $0 i32) (param $1 i64) + (i64.store32 + (get_local $0) + (get_local $1) + ) + ) ) diff --git a/test/unit.wast.fromBinary b/test/unit.wast.fromBinary index 5e8ab323b..0e25dfe07 100644 --- a/test/unit.wast.fromBinary +++ b/test/unit.wast.fromBinary @@ -10,6 +10,7 @@ (type $6 (func (param i32) (result i32))) (type $7 (func (param f64) (result f64))) (type $8 (func (result i64))) + (type $9 (func (param i32 i64))) (import "env" "_emscripten_asm_const_vi" (func $import$0)) (import "asm2wasm" "f64-to-int" (func $import$1 (param f64) (result i32))) (import "asm2wasm" "f64-rem" (func $import$2 (param f64 f64) (result f64))) @@ -450,5 +451,11 @@ (func $big-i64 (type $8) (result i64) (i64.const -9218868437227405313) ) + (func $i64-store32 (type $9) (param $var$0 i32) (param $var$1 i64) + (i64.store32 + (get_local $var$0) + (get_local $var$1) + ) + ) ) diff --git a/test/unit.wast.fromBinary.noDebugInfo b/test/unit.wast.fromBinary.noDebugInfo index d12ac3578..0b8ca6b2d 100644 --- a/test/unit.wast.fromBinary.noDebugInfo +++ b/test/unit.wast.fromBinary.noDebugInfo @@ -10,6 +10,7 @@ (type $6 (func (param i32) (result i32))) (type $7 (func (param f64) (result f64))) (type $8 (func (result i64))) + (type $9 (func (param i32 i64))) (import "env" "_emscripten_asm_const_vi" (func $import$0)) (import "asm2wasm" "f64-to-int" (func $import$1 (param f64) (result i32))) (import "asm2wasm" "f64-rem" (func $import$2 (param f64 f64) (result f64))) @@ -450,5 +451,11 @@ (func $21 (type $8) (result i64) (i64.const -9218868437227405313) ) + (func $22 (type $9) (param $var$0 i32) (param $var$1 i64) + (i64.store32 + (get_local $var$0) + (get_local $var$1) + ) + ) ) |