aboutsummaryrefslogtreecommitdiff
path: root/src/parseTools.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-01-23 13:47:54 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-01-23 13:47:54 -0800
commitd63cf1dce76c9a3901d844ab79bb8a9b6d7edc95 (patch)
tree18debbf804a376c224716d3f6ac302259a71e087 /src/parseTools.js
parent64a88f368257ba8bce99f38b47ab5c167b937a84 (diff)
fix makeComparison for asm
Diffstat (limited to 'src/parseTools.js')
-rw-r--r--src/parseTools.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/parseTools.js b/src/parseTools.js
index 0cd76bc4..c02bc62a 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -1796,7 +1796,8 @@ function makeComparison(a, b, type) {
return a + ' == ' + b;
} else {
assert(type == 'i64');
- return a + '$0 == ' + b + '$0 && ' + a + '$1 == ' + b + '$1';
+ return asmCoercion(a + '$0', 'i32') + ' == ' + asmCoercion(b + '$0', 'i32') + ' & ' +
+ asmCoercion(a + '$1', 'i32') + ' == ' + asmCoercion(b + '$1', 'i32');
}
}