зеркало из https://github.com/mozilla/gecko-dev.git
Bug 988950 - Improve postbarrier codegen on ARM r=mjrosenb
This commit is contained in:
Родитель
60ca814140
Коммит
c1385ff4f5
|
@ -54,6 +54,7 @@ class Nursery
|
|||
static const int NumNurseryChunks = 16;
|
||||
static const int LastNurseryChunk = NumNurseryChunks - 1;
|
||||
static const size_t Alignment = gc::ChunkSize;
|
||||
static const size_t ChunkShift = gc::ChunkShift;
|
||||
static const size_t NurserySize = gc::ChunkSize * NumNurseryChunks;
|
||||
|
||||
explicit Nursery(JSRuntime *rt)
|
||||
|
|
|
@ -4352,12 +4352,14 @@ void
|
|||
MacroAssemblerARMCompat::branchPtrInNurseryRange(Register ptr, Register temp, Label *label)
|
||||
{
|
||||
JS_ASSERT(ptr != temp);
|
||||
JS_ASSERT(ptr != ScratchRegister);
|
||||
JS_ASSERT(ptr != secondScratchReg_);
|
||||
|
||||
const Nursery &nursery = GetIonContext()->runtime->gcNursery();
|
||||
movePtr(ImmWord(-ptrdiff_t(nursery.start())), ScratchRegister);
|
||||
addPtr(ptr, ScratchRegister);
|
||||
branchPtr(Assembler::Below, ScratchRegister, Imm32(Nursery::NurserySize), label);
|
||||
uintptr_t startChunk = nursery.start() >> Nursery::ChunkShift;
|
||||
|
||||
ma_mov(Imm32(startChunk), secondScratchReg_);
|
||||
as_rsb(secondScratchReg_, secondScratchReg_, lsr(ptr, Nursery::ChunkShift));
|
||||
branch32(Assembler::Below, secondScratchReg_, Imm32(Nursery::NumNurseryChunks), label);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче