Bug 1214562 part 1 - SetElementCache no longer needs a byteop register on x86. r=bhackett
authorJan de Mooij <jdemooij@mozilla.com>
Thu, 15 Oct 2015 15:52:47 +0200
changeset 267936 0ea76f0263ef67182b05fb12970ad24136365584
parent 267935 03f521f50792b4b4fd453d30f584001cf52dffe0
child 267937 d8012b35413bde0202624356b725c62dc2fd24a5
push id29536
push usercbook@mozilla.com
push dateFri, 16 Oct 2015 11:18:16 +0000
treeherdermozilla-central@ccf288f65821 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbhackett
bugs1214562
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 1214562 part 1 - SetElementCache no longer needs a byteop register on x86. r=bhackett
js/src/jit/Lowering.cpp
--- a/js/src/jit/Lowering.cpp
+++ b/js/src/jit/Lowering.cpp
@@ -3520,31 +3520,27 @@ LIRGenerator::visitSetPropertyCache(MSet
 void
 LIRGenerator::visitSetElementCache(MSetElementCache* ins)
 {
     MOZ_ASSERT(ins->object()->type() == MIRType_Object);
     MOZ_ASSERT(ins->index()->type() == MIRType_Value);
 
     gen->setPerformsCall(); // See visitSetPropertyCache.
 
-    // Due to lack of registers on x86, we reuse the object register as a
-    // temporary. This register may be used in a 1-byte store, which on x86
-    // again has constraints; thus the use of |useByteOpRegister| over
-    // |useRegister| below.
     LInstruction* lir;
     if (ins->value()->type() == MIRType_Value) {
         LDefinition tempF32 = hasUnaliasedDouble() ? tempFloat32() : LDefinition::BogusTemp();
-        lir = new(alloc()) LSetElementCacheV(useByteOpRegister(ins->object()), tempToUnbox(),
+        lir = new(alloc()) LSetElementCacheV(useRegister(ins->object()), tempToUnbox(),
                                              temp(), tempDouble(), tempF32);
 
         useBox(lir, LSetElementCacheV::Index, ins->index());
         useBox(lir, LSetElementCacheV::Value, ins->value());
     } else {
         LDefinition tempF32 = hasUnaliasedDouble() ? tempFloat32() : LDefinition::BogusTemp();
-        lir = new(alloc()) LSetElementCacheT(useByteOpRegister(ins->object()),
+        lir = new(alloc()) LSetElementCacheT(useRegister(ins->object()),
                                              useRegisterOrConstant(ins->value()),
                                              tempToUnbox(), temp(), tempDouble(),
                                              tempF32);
 
         useBox(lir, LSetElementCacheT::Index, ins->index());
     }
 
     add(lir, ins);