Title: [96259] trunk/Source/_javascript_Core
Revision
96259
Author
[email protected]
Date
2011-09-28 13:59:24 -0700 (Wed, 28 Sep 2011)

Log Message

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):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (96258 => 96259)


--- trunk/Source/_javascript_Core/ChangeLog	2011-09-28 20:55:50 UTC (rev 96258)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-09-28 20:59:24 UTC (rev 96259)
@@ -1,5 +1,17 @@
 2011-09-28  Gavin Barraclough  <[email protected]>
 
+        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  <[email protected]>
+
         Merge bug#68580, bug#68932 for DFG JIT with JSVALUE32_64
         https://bugs.webkit.org/show_bug.cgi?id=69017
 

Modified: trunk/Source/_javascript_Core/assembler/X86Assembler.h (96258 => 96259)


--- trunk/Source/_javascript_Core/assembler/X86Assembler.h	2011-09-28 20:55:50 UTC (rev 96258)
+++ trunk/Source/_javascript_Core/assembler/X86Assembler.h	2011-09-28 20:59:24 UTC (rev 96259)
@@ -150,6 +150,7 @@
         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,
@@ -218,6 +219,8 @@
         GROUP5_OP_PUSH  = 6,
 
         GROUP11_MOV = 0,
+
+        ESCAPE_DD_FSTP_doubleReal = 3,
     } GroupOpcodeID;
     
     class X86InstructionFormatter;
@@ -984,6 +987,11 @@
         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);

Modified: trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator.h (96258 => 96259)


--- trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator.h	2011-09-28 20:55:50 UTC (rev 96258)
+++ trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator.h	2011-09-28 20:59:24 UTC (rev 96259)
@@ -1307,17 +1307,16 @@
         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
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to