- Revision
- 160062
- Author
- [email protected]
- Date
- 2013-12-03 17:18:19 -0800 (Tue, 03 Dec 2013)
Log Message
Fix LLINT_C_LOOP build for Win64.
https://bugs.webkit.org/show_bug.cgi?id=125186.
Reviewed by Michael Saboff.
* _javascript_Core.vcxproj/_javascript_Core.vcxproj:
* _javascript_Core.vcxproj/_javascript_Core.vcxproj.filters:
* jit/JITOperationsMSVC64.cpp: Added.
(JSC::getHostCallReturnValueWithExecState):
- Win64 will build JITStubMSVC64.asm even when !ENABLE(JIT). This results
in a linkage error due to a missing getHostCallReturnValueWithExecState().
So, we add a stub getHostCallReturnValueWithExecState() here to satisfy
that linkage. This function will never be called.
The alternative to providing such a stub is to make the MSVC project
recognize if the JIT is enabled or not, and exclude JITStubMSVC64.asm
if it's not enabled. We don't currently set ENABLE(JIT) via the MSVC
project and the work to do that is too much trouble for what we're trying
to achieve here. So, we're opting for this simpler workaround instead.
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter.cpp:
(JSC::CLoop::execute):
- Don't build callToJavaScript if we're building the C loop. Otherwise,
the C loop won't build if !ENABLE(COMPUTE_GOTO_OPCODES).
Modified Paths
Added Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (160061 => 160062)
--- trunk/Source/_javascript_Core/ChangeLog 2013-12-04 00:51:14 UTC (rev 160061)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-12-04 01:18:19 UTC (rev 160062)
@@ -1,3 +1,30 @@
+2013-12-03 Mark Lam <[email protected]>
+
+ Fix LLINT_C_LOOP build for Win64.
+ https://bugs.webkit.org/show_bug.cgi?id=125186.
+
+ Reviewed by Michael Saboff.
+
+ * _javascript_Core.vcxproj/_javascript_Core.vcxproj:
+ * _javascript_Core.vcxproj/_javascript_Core.vcxproj.filters:
+ * jit/JITOperationsMSVC64.cpp: Added.
+ (JSC::getHostCallReturnValueWithExecState):
+ - Win64 will build JITStubMSVC64.asm even when !ENABLE(JIT). This results
+ in a linkage error due to a missing getHostCallReturnValueWithExecState().
+ So, we add a stub getHostCallReturnValueWithExecState() here to satisfy
+ that linkage. This function will never be called.
+ The alternative to providing such a stub is to make the MSVC project
+ recognize if the JIT is enabled or not, and exclude JITStubMSVC64.asm
+ if it's not enabled. We don't currently set ENABLE(JIT) via the MSVC
+ project and the work to do that is too much trouble for what we're trying
+ to achieve here. So, we're opting for this simpler workaround instead.
+
+ * llint/LowLevelInterpreter.asm:
+ * llint/LowLevelInterpreter.cpp:
+ (JSC::CLoop::execute):
+ - Don't build callToJavaScript if we're building the C loop. Otherwise,
+ the C loop won't build if !ENABLE(COMPUTE_GOTO_OPCODES).
+
2013-12-03 Michael Saboff <[email protected]>
ARM64: Crash in JIT code due to improper reuse of cached memory temp register
Modified: trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj (160061 => 160062)
--- trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj 2013-12-04 00:51:14 UTC (rev 160061)
+++ trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj 2013-12-04 01:18:19 UTC (rev 160062)
@@ -478,6 +478,7 @@
<ClCompile Include="..\jit\JITOpcodes.cpp" />
<ClCompile Include="..\jit\JITOpcodes32_64.cpp" />
<ClCompile Include="..\jit\JITOperations.cpp" />
+ <ClCompile Include="..\jit\JITOperationsMSVC64.cpp" />
<ClCompile Include="..\jit\JITPropertyAccess.cpp" />
<ClCompile Include="..\jit\JITPropertyAccess32_64.cpp" />
<ClCompile Include="..\jit\JITStubRoutine.cpp" />
Modified: trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj.filters (160061 => 160062)
--- trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj.filters 2013-12-04 00:51:14 UTC (rev 160061)
+++ trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj.filters 2013-12-04 01:18:19 UTC (rev 160062)
@@ -1233,6 +1233,9 @@
<ClCompile Include="..\jit\JITOperations.cpp">
<Filter>jit</Filter>
</ClCompile>
+ <ClCompile Include="..\jit\JITOperationsMSVC64.cpp">
+ <Filter>jit</Filter>
+ </ClCompile>
<ClCompile Include="..\runtime\TestRunnerUtils.cpp">
<Filter>runtime</Filter>
</ClCompile>
Added: trunk/Source/_javascript_Core/jit/JITOperationsMSVC64.cpp (0 => 160062)
--- trunk/Source/_javascript_Core/jit/JITOperationsMSVC64.cpp (rev 0)
+++ trunk/Source/_javascript_Core/jit/JITOperationsMSVC64.cpp 2013-12-04 01:18:19 UTC (rev 160062)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if !ENABLE(JIT) && COMPILER(MSVC) && CPU(X86_64)
+
+#include "CallFrame.h"
+#include "JSCJSValue.h"
+
+namespace JSC {
+
+// FIXME: The following is a workaround that is only needed because JITStubsMSVC64.asm
+// is built unconditionally even when the JIT is disable, and it references this function.
+// We only need to provide a stub to satisfy the linkage. It will never be called.
+extern "C" EncodedJSValue getHostCallReturnValueWithExecState(ExecState*)
+{
+ return JSValue::encode(JSValue());
+}
+
+} // namespace JSC
+
+#endif // !ENABLE(JIT) && COMPILER(MSVC) && CPU(X86_64)
Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm (160061 => 160062)
--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm 2013-12-04 00:51:14 UTC (rev 160061)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm 2013-12-04 01:18:19 UTC (rev 160062)
@@ -421,12 +421,15 @@
ret
end
+if C_LOOP
+else
# stub to call into _javascript_
# EncodedJSValue callToJavaScript(void* code, Register* topOfStack)
# Note, if this stub or one of it's related macros is changed, make the
# equivalent changes in jit/JITStubsX86.h and/or jit/JITStubsMSVC64.asm
_callToJavaScript:
doCallToJavaScript()
+end
# Indicate the beginning of LLInt.
_llint_begin:
Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter.cpp (160061 => 160062)
--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter.cpp 2013-12-04 00:51:14 UTC (rev 160061)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter.cpp 2013-12-04 01:18:19 UTC (rev 160062)
@@ -309,7 +309,7 @@
// 2. 32 bit result values will be in the low 32-bit of t0.
// 3. 64 bit result values will be in t0.
- CLoopRegister t0, t1, t2, t3, a1;
+ CLoopRegister t0, t1, t2, t3;
#if USE(JSVALUE64)
CLoopRegister rBasePC, tagTypeNumber, tagMask;
#endif