Bug 688327 - tempCallReg cannot return callee-saved registers since they may be held live across FASTCALLs (r=dvander)
authorSteve Fink <sfink@mozilla.com>
Thu, 22 Sep 2011 15:06:08 -0700
changeset 77679 ee8a3069dc4c8d2ef94b6df6124921ee020e09ad
parent 77657 7a0db9bd7c37448ffa06b22448f93a6dc240c968
child 77680 230ea0b16f035b2f47d2b0b54641dfd3a83a4f4c
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersdvander
bugs688327
milestone9.0a1
Bug 688327 - tempCallReg cannot return callee-saved registers since they may be held live across FASTCALLs (r=dvander)
js/src/methodjit/MachineRegs.h
--- a/js/src/methodjit/MachineRegs.h
+++ b/js/src/methodjit/MachineRegs.h
@@ -411,17 +411,17 @@ struct Registers {
     static const uint32 AvailAnyRegs = AvailRegs | AvailFPRegs;
 
     static inline uint32 maskReg(AnyRegisterID reg) {
         return (1 << reg.reg_);
     }
 
     /* Get a register which is not live before a FASTCALL. */
     static inline RegisterID tempCallReg() {
-        Registers regs(AvailRegs);
+        Registers regs(TempRegs);
         regs.takeReg(Registers::ArgReg0);
         regs.takeReg(Registers::ArgReg1);
         return regs.takeAnyReg().reg();
     }
 
     /* Get a register which is not live before a normal ABI call with at most four args. */
     static inline Registers tempCallRegMask() {
         Registers regs(AvailRegs);