Commit f60b15bd authored by mark.lam@apple.com's avatar mark.lam@apple.com

Fix LLINT_C_LOOP build for Win64.

https://bugs.webkit.org/show_bug.cgi?id=125186.

Reviewed by Michael Saboff.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.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). 



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e6074e79
2013-12-03 Mark Lam <mark.lam@apple.com>
Fix LLINT_C_LOOP build for Win64.
https://bugs.webkit.org/show_bug.cgi?id=125186.
Reviewed by Michael Saboff.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.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 <msaboff@apple.com>
ARM64: Crash in JIT code due to improper reuse of cached memory temp register
......
......@@ -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" />
......
......@@ -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>
......
/*
* 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)
......@@ -421,12 +421,15 @@ macro doReturn()
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:
......
......@@ -309,7 +309,7 @@ JSValue CLoop::execute(CallFrame* callFrame, OpcodeID bootstrapOpcodeId,
// 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment