Title: [174682] trunk/Source/_javascript_Core
- Revision
- 174682
- Author
- [email protected]
- Date
- 2014-10-14 09:25:25 -0700 (Tue, 14 Oct 2014)
Log Message
[Win32] Thunk is not implemented.
https://bugs.webkit.org/show_bug.cgi?id=137691
Patch by [email protected] <[email protected]> on 2014-10-14
Reviewed by Mark Lam.
Thunks for functions with double operands (floor, etc.) are not implemented on Win32.
* jit/ThunkGenerators.cpp:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (174681 => 174682)
--- trunk/Source/_javascript_Core/ChangeLog 2014-10-14 12:09:52 UTC (rev 174681)
+++ trunk/Source/_javascript_Core/ChangeLog 2014-10-14 16:25:25 UTC (rev 174682)
@@ -1,3 +1,14 @@
+2014-10-14 [email protected] <[email protected]>
+
+ [Win32] Thunk is not implemented.
+ https://bugs.webkit.org/show_bug.cgi?id=137691
+
+ Reviewed by Mark Lam.
+
+ Thunks for functions with double operands (floor, etc.) are not implemented on Win32.
+
+ * jit/ThunkGenerators.cpp:
+
2014-10-12 Alexey Proskuryakov <[email protected]>
Adding svn:ignore so that .pyc files don't show up as new.
Modified: trunk/Source/_javascript_Core/jit/ThunkGenerators.cpp (174681 => 174682)
--- trunk/Source/_javascript_Core/jit/ThunkGenerators.cpp 2014-10-14 12:09:52 UTC (rev 174681)
+++ trunk/Source/_javascript_Core/jit/ThunkGenerators.cpp 2014-10-14 16:25:25 UTC (rev 174682)
@@ -808,6 +808,31 @@
} \
static MathThunk UnaryDoubleOpWrapper(function) = &function##Thunk;
+#elif CPU(X86) && COMPILER(MSVC) && OS(WINDOWS)
+
+// MSVC does not accept floor, etc, to be called directly from inline assembly, so we need to wrap these functions.
+static double (_cdecl *floorFunction)(double) = floor;
+static double (_cdecl *ceilFunction)(double) = ceil;
+static double (_cdecl *expFunction)(double) = exp;
+static double (_cdecl *logFunction)(double) = log;
+static double (_cdecl *jsRoundFunction)(double) = jsRound;
+
+#define defineUnaryDoubleOpWrapper(function) \
+ extern "C" __declspec(naked) MathThunkCallingConvention function##Thunk(MathThunkCallingConvention) \
+ { \
+ __asm \
+ { \
+ __asm sub esp, 20 \
+ __asm movsd mmword ptr [esp], xmm0 \
+ __asm call function##Function \
+ __asm fstp qword ptr [esp] \
+ __asm movsd xmm0, mmword ptr [esp] \
+ __asm add esp, 20 \
+ __asm ret \
+ } \
+ } \
+ static MathThunk UnaryDoubleOpWrapper(function) = &function##Thunk;
+
#else
#define defineUnaryDoubleOpWrapper(function) \
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes