Bug 988950 - Improve postbarrier codegen on ARM r=mjrosenb

This commit is contained in:
Jon Coppeard 2014-04-26 09:12:27 +01:00
Родитель 60ca814140
Коммит c1385ff4f5
2 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -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