[JAEGER] Added JSOP_GETARG.

This commit is contained in:
David Anderson 2010-06-01 11:12:50 -07:00
parent 6e6c481f29
commit 9c9903f6dc
2 changed files with 11 additions and 0 deletions

View File

@ -433,6 +433,16 @@ mjit::Compiler::generateMethod()
frame.pop();
END_CASE(JSOP_POP)
BEGIN_CASE(JSOP_GETARG)
{
RegisterID reg = frame.allocReg();
uint32 index = GET_SLOTNO(PC);
masm.loadPtr(Address(Assembler::FpReg, offsetof(JSStackFrame, argv)), reg);
frame.freeReg(reg);
frame.push(Address(reg, index * sizeof(Value)));
}
END_CASE(JSOP_GETARG)
BEGIN_CASE(JSOP_UINT16)
frame.push(Value(Int32Tag((int32_t) GET_UINT16(PC))));
END_CASE(JSOP_UINT16)

View File

@ -338,6 +338,7 @@ FrameState::addressOf(const FrameEntry *fe) const
{
uint32 index = (fe - entries);
JS_ASSERT(index >= nargs);
index -= nargs;
return Address(Assembler::FpReg, sizeof(JSStackFrame) + sizeof(Value) * index);
}