mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 02:35:41 +00:00
Bug 1437862 part 1 - Clean up register allocation in generateArgumentsChecks. r=nbp
--HG-- extra : rebase_source : a44f4b54571d2030d96ef6af7dae330da5282f62
This commit is contained in:
parent
92e6d42b4b
commit
10f36f5027
@ -5077,9 +5077,6 @@ CodeGenerator::visitCallDirectEval(LCallDirectEval* lir)
|
||||
void
|
||||
CodeGenerator::generateArgumentsChecks(bool bailout)
|
||||
{
|
||||
// Registers safe for use before generatePrologue().
|
||||
static const uint32_t EntryTempMask = Registers::TempMask & ~(1 << OsrFrameReg.code());
|
||||
|
||||
// This function can be used the normal way to check the argument types,
|
||||
// before entering the function and bailout when arguments don't match.
|
||||
// For debug purpose, this is can also be used to force/check that the
|
||||
@ -5089,7 +5086,7 @@ CodeGenerator::generateArgumentsChecks(bool bailout)
|
||||
MResumePoint* rp = mir.entryResumePoint();
|
||||
|
||||
// No registers are allocated yet, so it's safe to grab anything.
|
||||
Register temp = AllocatableGeneralRegisterSet(EntryTempMask).getAny();
|
||||
Register temp = AllocatableGeneralRegisterSet(GeneralRegisterSet::All()).getAny();
|
||||
|
||||
const CompileInfo& info = gen->info();
|
||||
|
||||
|
@ -151,9 +151,6 @@ class Registers
|
||||
(1 << Registers::lr) |
|
||||
(1 << Registers::pc);
|
||||
|
||||
// Registers that can be allocated without being saved, generally.
|
||||
static const SetType TempMask = VolatileMask & ~NonAllocatableMask;
|
||||
|
||||
// Registers returned from a JS -> JS call.
|
||||
static const SetType JSCallMask =
|
||||
(1 << Registers::r2) |
|
||||
@ -362,9 +359,6 @@ class FloatRegisters
|
||||
(1ULL << s30) |
|
||||
(1ULL << s31);
|
||||
|
||||
// Registers that can be allocated without being saved, generally.
|
||||
static const SetType TempMask = VolatileMask & ~NonAllocatableMask;
|
||||
|
||||
static const SetType AllocatableMask = AllMask & ~NonAllocatableMask;
|
||||
};
|
||||
|
||||
|
@ -171,9 +171,6 @@ class Registers {
|
||||
(1 << Registers::lr) |
|
||||
(1 << Registers::sp);
|
||||
|
||||
// Registers that can be allocated without being saved, generally.
|
||||
static const SetType TempMask = VolatileMask & ~NonAllocatableMask;
|
||||
|
||||
static const SetType WrapperMask = VolatileMask;
|
||||
|
||||
// Registers returned from a JS -> JS call.
|
||||
@ -283,9 +280,6 @@ class FloatRegisters
|
||||
// d31 is the ScratchFloatReg.
|
||||
static const SetType NonAllocatableMask = (SetType(1) << FloatRegisters::d31) * SpreadCoefficient;
|
||||
|
||||
// Registers that can be allocated without being saved, generally.
|
||||
static const SetType TempMask = VolatileMask & ~NonAllocatableMask;
|
||||
|
||||
static const SetType AllocatableMask = AllMask & ~NonAllocatableMask;
|
||||
union RegisterContent {
|
||||
float s;
|
||||
|
@ -201,9 +201,6 @@ class Registers
|
||||
(1 << Registers::sp) |
|
||||
(1 << Registers::ra);
|
||||
|
||||
// Registers that can be allocated without being saved, generally.
|
||||
static const SetType TempMask = VolatileMask & ~NonAllocatableMask;
|
||||
|
||||
// Registers returned from a JS -> JS call.
|
||||
static const SetType JSCallMask;
|
||||
|
||||
|
@ -97,9 +97,6 @@ class FloatRegisters : public FloatRegistersMIPSShared
|
||||
((SetType(1) << (FloatRegisters::f16 >> 1)) |
|
||||
(SetType(1) << (FloatRegisters::f18 >> 1))) * ((1 << TotalSingle) + 1);
|
||||
|
||||
// Registers that can be allocated without being saved, generally.
|
||||
static const SetType TempMask = VolatileMask & ~NonAllocatableMask;
|
||||
|
||||
static const SetType AllocatableMask = AllMask & ~NonAllocatableMask;
|
||||
};
|
||||
|
||||
|
@ -84,9 +84,6 @@ class FloatRegisters : public FloatRegistersMIPSShared
|
||||
(1U << FloatRegisters::f23)
|
||||
) * Spread;
|
||||
|
||||
// Registers that can be allocated without being saved, generally.
|
||||
static const SetType TempMask = VolatileMask & ~NonAllocatableMask;
|
||||
|
||||
static const SetType AllocatableMask = AllMask & ~NonAllocatableMask;
|
||||
};
|
||||
|
||||
|
@ -60,7 +60,6 @@ class Registers
|
||||
static const SetType NonVolatileMask = 0;
|
||||
static const SetType NonAllocatableMask = 0;
|
||||
static const SetType AllocatableMask = 0;
|
||||
static const SetType TempMask = 0;
|
||||
static const SetType JSCallMask = 0;
|
||||
static const SetType CallMask = 0;
|
||||
};
|
||||
|
@ -193,9 +193,6 @@ class Registers {
|
||||
AllMask & ~VolatileMask & ~(1 << X86Encoding::rsp);
|
||||
|
||||
static const SetType AllocatableMask = AllMask & ~NonAllocatableMask;
|
||||
|
||||
// Registers that can be allocated without being saved, generally.
|
||||
static const SetType TempMask = VolatileMask & ~NonAllocatableMask;
|
||||
};
|
||||
|
||||
typedef Registers::SetType PackedRegisterMask;
|
||||
|
Loading…
Reference in New Issue
Block a user