Bug 1311287 - free register after setglobal. r=bbouvier
authorLars T Hansen <lhansen@mozilla.com>
Wed, 19 Oct 2016 11:23:12 +0200
changeset 318532 e2da3bb6654f97a7139b53ef3e77e4603a5310f5
parent 318531 90a743486346d4372d12233d27e5268c91c5cf82
child 318533 2faa2e745b8e4093ce5e0dfc80441fad3d876f19
push id82955
push userlhansen@mozilla.com
push dateWed, 19 Oct 2016 09:37:15 +0000
treeherdermozilla-inbound@e2da3bb6654f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbouvier
bugs1311287
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1311287 - free register after setglobal. r=bbouvier
js/src/asmjs/WasmBaselineCompile.cpp
--- a/js/src/asmjs/WasmBaselineCompile.cpp
+++ b/js/src/asmjs/WasmBaselineCompile.cpp
@@ -5695,31 +5695,35 @@ BaseCompiler::emitSetGlobal()
         return true;
 
     const GlobalDesc& global = mg_.globals[id];
 
     switch (global.type()) {
       case ValType::I32: {
         RegI32 rv = popI32();
         storeGlobalVarI32(global.offset(), rv);
+        freeI32(rv);
         break;
       }
       case ValType::I64: {
         RegI64 rv = popI64();
         storeGlobalVarI64(global.offset(), rv);
+        freeI64(rv);
         break;
       }
       case ValType::F32: {
         RegF32 rv = popF32();
         storeGlobalVarF32(global.offset(), rv);
+        freeF32(rv);
         break;
       }
       case ValType::F64: {
         RegF64 rv = popF64();
         storeGlobalVarF64(global.offset(), rv);
+        freeF64(rv);
         break;
       }
       default:
         MOZ_CRASH("Global variable type");
         break;
     }
     return true;
 }