Bug 1353347 - wasm baseline, properly chop int32 constants to 32 bits. r=luke, a=jcristau
authorLars T Hansen <lhansen@mozilla.com>
Fri, 07 Apr 2017 13:12:20 +0200
changeset 395882 e53f7f1785ebedaf692d599d70e3a7a9e1bb5f4f
parent 395881 ed4e7993e34d7765b86ba74dd5736e4e33b699ca
child 395883 93ed3f97f4e46579f43a8c2b0abe1bb633c03a2a
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke, jcristau
bugs1353347
milestone54.0a2
Bug 1353347 - wasm baseline, properly chop int32 constants to 32 bits. r=luke, a=jcristau
js/src/wasm/WasmBaselineCompile.cpp
--- a/js/src/wasm/WasmBaselineCompile.cpp
+++ b/js/src/wasm/WasmBaselineCompile.cpp
@@ -1161,21 +1161,21 @@ class BaseCompiler
             masm.moveFloat32(src, dest);
     }
 
     void setI64(int64_t v, RegI64 r) {
         masm.move64(Imm64(v), r);
     }
 
     void loadConstI32(Register r, Stk& src) {
-        masm.mov(ImmWord((uint32_t)src.i32val() & 0xFFFFFFFFU), r);
+        masm.mov(ImmWord(uint32_t(src.i32val())), r);
     }
 
     void loadConstI32(Register r, int32_t v) {
-        masm.mov(ImmWord(v), r);
+        masm.mov(ImmWord(uint32_t(v)), r);
     }
 
     void loadMemI32(Register r, Stk& src) {
         loadFromFrameI32(r, src.offs());
     }
 
     void loadLocalI32(Register r, Stk& src) {
         loadFromFrameI32(r, frameOffsetFromSlot(src.slot(), MIRType::Int32));