summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-01-29 15:21:17 -0800
committerAlon Zakai <alonzakai@gmail.com>2016-01-29 15:21:17 -0800
commitdf10192f3445648b797977e54ae64ae955d5e21c (patch)
tree2d0b5cce9e9be33ca1351b28000f10d4bec50f40
parent2ecdaa083088588e39705bdbe5d78338283fa9e8 (diff)
downloadbinaryen-df10192f3445648b797977e54ae64ae955d5e21c.tar.gz
binaryen-df10192f3445648b797977e54ae64ae955d5e21c.tar.bz2
binaryen-df10192f3445648b797977e54ae64ae955d5e21c.zip
fix printing of i64 loads of 4 bytes
-rw-r--r--src/wasm.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wasm.h b/src/wasm.h
index 97e0bfc12..33a4587e6 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -676,11 +676,13 @@ public:
std::ostream& doPrint(std::ostream &o, unsigned indent) {
o << '(';
prepareColor(o) << printWasmType(type) << ".load";
- if (bytes < 4) {
+ if (bytes < 4 || (type == i64 && bytes < 8)) {
if (bytes == 1) {
o << '8';
} else if (bytes == 2) {
o << "16";
+ } else if (bytes == 4) {
+ o << "32";
} else {
abort();
}