Bug 871777 - Fold a load and a jump. r=jandem

This commit is contained in:
Dan Gohman 2013-05-15 22:16:58 -04:00
Родитель 5de49744cb
Коммит 67808e8d3d
3 изменённых файлов: 7 добавлений и 21 удалений

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

@ -562,6 +562,9 @@ class AssemblerX86Shared
void jmp(const Operand &op){
switch (op.kind()) {
case Operand::REG_DISP:
masm.jmp_m(op.disp(), op.base());
break;
case Operand::SCALE:
masm.jmp_m(op.disp(), op.base(), op.index(), op.scale());
break;

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

@ -47,12 +47,8 @@ EmitEnterTypeMonitorIC(MacroAssembler &masm,
// is properly initialized to point to the stub.
masm.movq(Operand(BaselineStubReg, (int32_t) monitorStubOffset), BaselineStubReg);
// Load stubcode pointer from BaselineStubEntry into BaselineTailCallReg.
masm.movq(Operand(BaselineStubReg, (int32_t) ICStub::offsetOfStubCode()),
BaselineTailCallReg);
// Jump to the stubcode.
masm.jmp(Operand(BaselineTailCallReg));
masm.jmp(Operand(BaselineStubReg, (int32_t) ICStub::offsetOfStubCode()));
}
inline void
@ -270,12 +266,8 @@ EmitStubGuardFailure(MacroAssembler &masm)
// Load next stub into BaselineStubReg
masm.movq(Operand(BaselineStubReg, ICStub::offsetOfNext()), BaselineStubReg);
// Load stubcode pointer from BaselineStubEntry into BaselineTailCallReg
// BaselineTailCallReg will always be unused in the contexts where IC stub guards fail
masm.movq(Operand(BaselineStubReg, ICStub::offsetOfStubCode()), BaselineTailCallReg);
// Return address is already loaded, just jump to the next stubcode.
masm.jmp(Operand(BaselineTailCallReg));
masm.jmp(Operand(BaselineStubReg, ICStub::offsetOfStubCode()));
}

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

@ -48,12 +48,8 @@ EmitEnterTypeMonitorIC(MacroAssembler &masm,
// is properly initialized to point to the stub.
masm.movl(Operand(BaselineStubReg, (int32_t) monitorStubOffset), BaselineStubReg);
// Load stubcode pointer from BaselineStubReg into BaselineTailCallReg.
masm.movl(Operand(BaselineStubReg, (int32_t) ICStub::offsetOfStubCode()),
BaselineTailCallReg);
// Jump to the stubcode.
masm.jmp(Operand(BaselineTailCallReg));
masm.jmp(Operand(BaselineStubReg, (int32_t) ICStub::offsetOfStubCode()));
}
inline void
@ -276,13 +272,8 @@ EmitStubGuardFailure(MacroAssembler &masm)
// Load next stub into BaselineStubReg
masm.movl(Operand(BaselineStubReg, (int32_t) ICStub::offsetOfNext()), BaselineStubReg);
// Load stubcode pointer from BaselineStubEntry into BaselineTailCallReg
// BaselineTailCallReg will always be unused in the contexts where IC stub guards fail
masm.movl(Operand(BaselineStubReg, (int32_t) ICStub::offsetOfStubCode()),
BaselineTailCallReg);
// Return address is already loaded, just jump to the next stubcode.
masm.jmp(Operand(BaselineTailCallReg));
masm.jmp(Operand(BaselineStubReg, (int32_t) ICStub::offsetOfStubCode()));
}