Bug 937944 - SpiderMonkey: Use d15 as the float scratch register on ARM, to avoid conflicts with argument registers. r=mjrosenb

This commit is contained in:
Dan Gohman 2013-11-12 20:20:22 -08:00
parent bc1ea74b99
commit ba59726418
3 changed files with 8 additions and 9 deletions

View File

@ -150,7 +150,6 @@ class FloatRegisters
d1,
d2,
d3,
SD0 = d3,
d4,
d5,
d6,
@ -195,6 +194,7 @@ class FloatRegisters
static const uint32_t AllMask = (1 << Total) - 1;
// d15 is the ScratchFloatReg.
static const uint32_t NonVolatileMask =
(1 << d8) |
(1 << d9) |
@ -202,15 +202,14 @@ class FloatRegisters
(1 << d11) |
(1 << d12) |
(1 << d13) |
(1 << d14) |
(1 << d15);
(1 << d14);
static const uint32_t VolatileMask = AllMask & ~NonVolatileMask;
static const uint32_t WrapperMask = VolatileMask;
// d1 is the ARM scratch float register.
static const uint32_t NonAllocatableMask = (1 << d1) | (1 << invalid_freg);
// d15 is the ARM scratch float register.
static const uint32_t NonAllocatableMask = (1 << d15) | (1 << invalid_freg);
// Registers that can be allocated without being saved, generally.
static const uint32_t TempMask = VolatileMask & ~NonAllocatableMask;

View File

@ -98,9 +98,9 @@ static MOZ_CONSTEXPR_VAR Register StackPointer = sp;
static MOZ_CONSTEXPR_VAR Register FramePointer = InvalidReg;
static MOZ_CONSTEXPR_VAR Register ReturnReg = r0;
static MOZ_CONSTEXPR_VAR FloatRegister ReturnFloatReg = { FloatRegisters::d0 };
static MOZ_CONSTEXPR_VAR FloatRegister ScratchFloatReg = { FloatRegisters::d1 };
static MOZ_CONSTEXPR_VAR FloatRegister ScratchFloatReg = { FloatRegisters::d15 };
static MOZ_CONSTEXPR_VAR FloatRegister NANReg = { FloatRegisters::d15 };
static MOZ_CONSTEXPR_VAR FloatRegister NANReg = { FloatRegisters::d14 };
static MOZ_CONSTEXPR_VAR FloatRegister d0 = {FloatRegisters::d0};
static MOZ_CONSTEXPR_VAR FloatRegister d1 = {FloatRegisters::d1};

View File

@ -48,9 +48,9 @@ static MOZ_CONSTEXPR_VAR Register BaselineSecondScratchReg = r6;
// register. In ARM code emission, we do not clobber BaselineTailCallReg
// since we keep the return address for calls there.
// FloatReg0 must be equal to ReturnFloatReg. d1 is ScratchFloatReg.
// FloatReg0 must be equal to ReturnFloatReg.
static MOZ_CONSTEXPR_VAR FloatRegister FloatReg0 = d0;
static MOZ_CONSTEXPR_VAR FloatRegister FloatReg1 = d2;
static MOZ_CONSTEXPR_VAR FloatRegister FloatReg1 = d1;
} // namespace jit
} // namespace js