Bug 1204700 - ARM: Use a different scratch register for store32. r=sstangl
authorNicolas B. Pierron <nicolas.b.pierron@mozilla.com>
Mon, 12 Oct 2015 20:21:07 +0200
changeset 267378 464e82856a55ddd3d4f916b1a60487533300a4fc
parent 267377 429258d9a17866a67720a2adc15a05c9d95c43b5
child 267379 0c0654ecff2a5b5a56a2346e8c65d4e8872a710e
push id29517
push usercbook@mozilla.com
push dateTue, 13 Oct 2015 10:01:04 +0000
treeherdermozilla-central@607a236c2299 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssstangl
bugs1204700
milestone44.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 1204700 - ARM: Use a different scratch register for store32. r=sstangl
js/src/jit/arm/MacroAssembler-arm.cpp
--- a/js/src/jit/arm/MacroAssembler-arm.cpp
+++ b/js/src/jit/arm/MacroAssembler-arm.cpp
@@ -2334,32 +2334,32 @@ MacroAssemblerARMCompat::store32(Imm32 s
     AutoRegisterScope scratch2(asMasm(), secondScratchReg_);
     move32(src, scratch2);
     storePtr(scratch2, address);
 }
 
 void
 MacroAssemblerARMCompat::store32(Imm32 imm, const BaseIndex& dest)
 {
-    AutoRegisterScope scratch2(asMasm(), secondScratchReg_);
-    ma_mov(imm, scratch2);
-    store32(scratch2, dest);
+    ScratchRegisterScope scratch(asMasm());
+    ma_mov(imm, scratch);
+    store32(scratch, dest);
 }
 
 void
 MacroAssemblerARMCompat::store32(Register src, const BaseIndex& dest)
 {
     Register base = dest.base;
     uint32_t scale = Imm32::ShiftOf(dest.scale).value;
 
-    ScratchRegisterScope scratch(asMasm());
+    AutoRegisterScope scratch2(asMasm(), secondScratchReg_);
 
     if (dest.offset != 0) {
-        ma_add(base, Imm32(dest.offset), scratch);
-        base = scratch;
+        ma_add(base, Imm32(dest.offset), scratch2);
+        base = scratch2;
     }
     ma_str(src, DTRAddr(base, DtrRegImmShift(dest.index, LSL, scale)));
 }
 
 void
 MacroAssemblerARMCompat::store32_NoSecondScratch(Imm32 src, const Address& address)
 {
     // move32() needs to use the ScratchRegister internally, but there is no additional