Title: [165264] trunk/Source/_javascript_Core
Revision
165264
Author
[email protected]
Date
2014-03-07 09:03:51 -0800 (Fri, 07 Mar 2014)

Log Message

FLT should call fmod directly on platforms where LLVM cannot relocate the libcall
https://bugs.webkit.org/show_bug.cgi?id=129865

Patch by Andrew Trick <[email protected]> on 2014-03-07
Reviewed by Filip Pizlo.

* ftl/FTLIntrinsicRepository.h:
* ftl/FTLOutput.h:
(JSC::FTL::Output::doubleRem):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (165263 => 165264)


--- trunk/Source/_javascript_Core/ChangeLog	2014-03-07 17:00:03 UTC (rev 165263)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-03-07 17:03:51 UTC (rev 165264)
@@ -1,3 +1,14 @@
+2014-03-07  Andrew Trick  <[email protected]>
+
+        FLT should call fmod directly on platforms where LLVM cannot relocate the libcall
+        https://bugs.webkit.org/show_bug.cgi?id=129865
+
+        Reviewed by Filip Pizlo.
+
+        * ftl/FTLIntrinsicRepository.h:
+        * ftl/FTLOutput.h:
+        (JSC::FTL::Output::doubleRem):
+
 2014-03-06  Filip Pizlo  <[email protected]>
 
         If the FTL is build-time enabled then it should be run-time enabled.

Modified: trunk/Source/_javascript_Core/ftl/FTLIntrinsicRepository.h (165263 => 165264)


--- trunk/Source/_javascript_Core/ftl/FTLIntrinsicRepository.h	2014-03-07 17:00:03 UTC (rev 165263)
+++ trunk/Source/_javascript_Core/ftl/FTLIntrinsicRepository.h	2014-03-07 17:03:51 UTC (rev 165264)
@@ -59,6 +59,7 @@
     macro(C_JITOperation_EJssJssJss, functionType(intPtr, intPtr, intPtr, intPtr, intPtr)) \
     macro(C_JITOperation_ESt, functionType(intPtr, intPtr, intPtr)) \
     macro(D_JITOperation_D, functionType(doubleType, doubleType)) \
+    macro(D_JITOperation_DD, functionType(doubleType, doubleType, doubleType)) \
     macro(I_JITOperation_EJss, functionType(intPtr, intPtr, intPtr)) \
     macro(J_JITOperation_E, functionType(int64, intPtr)) \
     macro(J_JITOperation_EA, functionType(int64, intPtr, intPtr)) \

Modified: trunk/Source/_javascript_Core/ftl/FTLOutput.h (165263 => 165264)


--- trunk/Source/_javascript_Core/ftl/FTLOutput.h	2014-03-07 17:00:03 UTC (rev 165263)
+++ trunk/Source/_javascript_Core/ftl/FTLOutput.h	2014-03-07 17:03:51 UTC (rev 165264)
@@ -127,7 +127,13 @@
     LValue doubleSub(LValue left, LValue right) { return buildFSub(m_builder, left, right); }
     LValue doubleMul(LValue left, LValue right) { return buildFMul(m_builder, left, right); }
     LValue doubleDiv(LValue left, LValue right) { return buildFDiv(m_builder, left, right); }
-    LValue doubleRem(LValue left, LValue right) { return buildFRem(m_builder, left, right); }
+    LValue doubleRem(LValue left, LValue right)
+    {
+        // FIXME: LLVM may soften float operations be expanding them to libcalls.
+        // We cannot allow that on all platforms yet.
+        // <rdar://16196412> MachO large code model support.
+        return isX86() ? buildFRem(m_builder, left, right) : call(operation(fmod), left, right);
+    }
     LValue doubleNeg(LValue value) { return buildFNeg(m_builder, value); }
 
     LValue bitAnd(LValue left, LValue right) { return buildAnd(m_builder, left, right); }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to