diff options
author | Derek Schuff <dschuff@chromium.org> | 2016-03-21 15:33:46 -0700 |
---|---|---|
committer | Derek Schuff <dschuff@chromium.org> | 2016-03-21 15:33:46 -0700 |
commit | b2489b81b9b6fef70e4cbb0af913734442d2bd03 (patch) | |
tree | 70fd888d74b9cf9996976352591f75343ecf81b5 /src/passes/Print.cpp | |
parent | c34ed229b2df8bf4e8d0773917d0301c034980e3 (diff) | |
download | binaryen-b2489b81b9b6fef70e4cbb0af913734442d2bd03.tar.gz binaryen-b2489b81b9b6fef70e4cbb0af913734442d2bd03.tar.bz2 binaryen-b2489b81b9b6fef70e4cbb0af913734442d2bd03.zip |
Make type of EqZ unary operators always i32
This makes them symmetric to binary relational operators.
Also support eqz in the s2wasm parser.
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r-- | src/passes/Print.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 0fdb4255f..77dcb6154 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -259,7 +259,7 @@ struct PrintSExpression : public WasmVisitor<PrintSExpression, void> { } void visitUnary(Unary *curr) { o << '('; - prepareColor(o) << printWasmType(curr->type) << '.'; + prepareColor(o) << printWasmType(curr->isRelational() ? curr->value->type : curr->type) << '.'; switch (curr->op) { case Clz: o << "clz"; break; case Ctz: o << "ctz"; break; |