https://bugs.webkit.org/show_bug.cgi?id=69026
Reviewed by Sam Weinig.
* assembler/X86Assembler.h:
(JSC::X86Assembler::fstpl):
* dfg/DFGJITCodeGenerator.h:
(JSC::DFG::callOperation):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96259
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
2011-09-28 Gavin Barraclough <barraclough@apple.com>
+ Implement callOperation(D_DFGOperation_DD) for DFG JIT 32_64
+ https://bugs.webkit.org/show_bug.cgi?id=69026
+
+ Reviewed by Sam Weinig.
+
+ * assembler/X86Assembler.h:
+ (JSC::X86Assembler::fstpl):
+ * dfg/DFGJITCodeGenerator.h:
+ (JSC::DFG::callOperation):
+
+2011-09-28 Gavin Barraclough <barraclough@apple.com>
+
Merge bug#68580, bug#68932 for DFG JIT with JSVALUE32_64
https://bugs.webkit.org/show_bug.cgi?id=69017
OP_INT3 = 0xCC,
OP_GROUP2_Ev1 = 0xD1,
OP_GROUP2_EvCL = 0xD3,
+ OP_ESCAPE_DD = 0xDD,
OP_CALL_rel32 = 0xE8,
OP_JMP_rel32 = 0xE9,
PRE_SSE_F2 = 0xF2,
GROUP5_OP_PUSH = 6,
GROUP11_MOV = 0,
+
+ ESCAPE_DD_FSTP_doubleReal = 3,
} GroupOpcodeID;
class X86InstructionFormatter;
m_formatter.oneByteOp(OP_CDQ);
}
+ void fstpl(int offset, RegisterID base)
+ {
+ m_formatter.oneByteOp(OP_ESCAPE_DD, ESCAPE_DD_FSTP_doubleReal, base, offset);
+ }
+
void xchgl_rr(RegisterID src, RegisterID dst)
{
m_formatter.oneByteOp(OP_XCHG_EvGv, src, dst);
appendCallWithExceptionCheck(operation);
}
- void NO_RETURN callOperation(D_DFGOperation_DD operation, FPRReg result, FPRReg arg1, FPRReg arg2)
+ void callOperation(D_DFGOperation_DD operation, FPRReg result, FPRReg arg1, FPRReg arg2)
{
ASSERT(isFlushed());
- // FIXME: Need to to pass doubles.
- ASSERT_NOT_REACHED();
- UNUSED_PARAM(arg1);
- UNUSED_PARAM(arg2);
+ m_jit.storeDouble(arg2, JITCompiler::Address(JITCompiler::stackPointerRegister, sizeof(double)));
+ m_jit.storeDouble(arg1, JITCompiler::stackPointerRegister);
m_jit.appendCall(operation);
- m_jit.moveDouble(FPRInfo::returnValueFPR, result);
+ m_jit.assembler().fstpl(0, JITCompiler::stackPointerRegister);
+ m_jit.loadDouble(JITCompiler::stackPointerRegister, result);
}
#endif