summaryrefslogtreecommitdiffstats
path: root/js/src/jit/arm/MacroAssembler-arm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit/arm/MacroAssembler-arm.cpp')
-rw-r--r--js/src/jit/arm/MacroAssembler-arm.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/js/src/jit/arm/MacroAssembler-arm.cpp b/js/src/jit/arm/MacroAssembler-arm.cpp
index fe4f36ab26..b031461751 100644
--- a/js/src/jit/arm/MacroAssembler-arm.cpp
+++ b/js/src/jit/arm/MacroAssembler-arm.cpp
@@ -5843,11 +5843,13 @@ inline void EmitRemainderOrQuotient(bool isRemainder, MacroAssembler& masm,
masm.quotient32(rhs, lhsOutput, isUnsigned);
}
} else {
- // Ensure that the output registers are saved and restored properly,
- MOZ_ASSERT(volatileLiveRegs.has(ReturnRegVal0));
- MOZ_ASSERT(volatileLiveRegs.has(ReturnRegVal1));
+ // Ensure that the output registers are saved and restored properly.
+ LiveRegisterSet liveRegs = volatileLiveRegs;
+ liveRegs.addUnchecked(ReturnRegVal0);
+ liveRegs.addUnchecked(ReturnRegVal1);
+
+ masm.PushRegsInMask(liveRegs);
- masm.PushRegsInMask(volatileLiveRegs);
using Fn = int64_t (*)(int, int);
{
ScratchRegisterScope scratch(masm);
@@ -5870,7 +5872,7 @@ inline void EmitRemainderOrQuotient(bool isRemainder, MacroAssembler& masm,
LiveRegisterSet ignore;
ignore.add(lhsOutput);
- masm.PopRegsInMaskIgnore(volatileLiveRegs, ignore);
+ masm.PopRegsInMaskIgnore(liveRegs, ignore);
}
}
@@ -5899,10 +5901,12 @@ void MacroAssembler::flexibleDivMod32(Register rhs, Register lhsOutput,
remainder32(rhs, remOutput, isUnsigned);
quotient32(rhs, lhsOutput, isUnsigned);
} else {
- // Ensure that the output registers are saved and restored properly,
- MOZ_ASSERT(volatileLiveRegs.has(ReturnRegVal0));
- MOZ_ASSERT(volatileLiveRegs.has(ReturnRegVal1));
- PushRegsInMask(volatileLiveRegs);
+ // Ensure that the output registers are saved and restored properly.
+ LiveRegisterSet liveRegs = volatileLiveRegs;
+ liveRegs.addUnchecked(ReturnRegVal0);
+ liveRegs.addUnchecked(ReturnRegVal1);
+
+ PushRegsInMask(liveRegs);
using Fn = int64_t (*)(int, int);
{
@@ -5923,7 +5927,7 @@ void MacroAssembler::flexibleDivMod32(Register rhs, Register lhsOutput,
LiveRegisterSet ignore;
ignore.add(remOutput);
ignore.add(lhsOutput);
- PopRegsInMaskIgnore(volatileLiveRegs, ignore);
+ PopRegsInMaskIgnore(liveRegs, ignore);
}
}