From 4be94de79a3d5d56297b49e5f5d0f10e05b6fb1a Mon Sep 17 00:00:00 2001 From: "fpizlo@apple.com" Date: Tue, 21 Feb 2012 09:09:22 +0000 Subject: [PATCH] Attempted build fix for ELF platforms. * dfg/DFGOperations.cpp: (JSC): (JSC::getHostCallReturnValueWithExecState): * jit/HostCallReturnValue.cpp: (JSC): * jit/HostCallReturnValue.h: (JSC::initializeHostCallReturnValue): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108323 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/JavaScriptCore/ChangeLog | 12 ++++++ Source/JavaScriptCore/dfg/DFGOperations.cpp | 48 ++++++++++++++++++++++- Source/JavaScriptCore/jit/HostCallReturnValue.cpp | 44 +-------------------- Source/JavaScriptCore/jit/HostCallReturnValue.h | 1 + 4 files changed, 61 insertions(+), 44 deletions(-) diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog index b640a87..102e62c 100644 --- a/Source/JavaScriptCore/ChangeLog +++ b/Source/JavaScriptCore/ChangeLog @@ -1,3 +1,15 @@ +2012-02-21 Filip Pizlo + + Attempted build fix for ELF platforms. + + * dfg/DFGOperations.cpp: + (JSC): + (JSC::getHostCallReturnValueWithExecState): + * jit/HostCallReturnValue.cpp: + (JSC): + * jit/HostCallReturnValue.h: + (JSC::initializeHostCallReturnValue): + 2012-02-20 Filip Pizlo JSC should be a triple-tier VM diff --git a/Source/JavaScriptCore/dfg/DFGOperations.cpp b/Source/JavaScriptCore/dfg/DFGOperations.cpp index c8106eb..5009652 100644 --- a/Source/JavaScriptCore/dfg/DFGOperations.cpp +++ b/Source/JavaScriptCore/dfg/DFGOperations.cpp @@ -1048,6 +1048,52 @@ void DFG_OPERATION debugOperationPrintSpeculationFailure(ExecState* exec, void* #endif } // extern "C" -} } // namespace JSC::DFG +} // namespace DFG + +#if COMPILER(GCC) + +#if CPU(X86_64) +asm ( +".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" +HIDE_SYMBOL(getHostCallReturnValue) "\n" +SYMBOL_STRING(getHostCallReturnValue) ":" "\n" + "mov -40(%r13), %r13\n" + "mov %r13, %rdi\n" + "jmp " SYMBOL_STRING_RELOCATION(getHostCallReturnValueWithExecState) "\n" +); +#elif CPU(X86) +asm ( +".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" +HIDE_SYMBOL(getHostCallReturnValue) "\n" +SYMBOL_STRING(getHostCallReturnValue) ":" "\n" + "mov -40(%edi), %edi\n" + "mov %edi, 4(%esp)\n" + "jmp " SYMBOL_STRING_RELOCATION(getHostCallReturnValueWithExecState) "\n" +); +#elif CPU(ARM_THUMB2) +asm ( +".text" "\n" +".align 2" "\n" +".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" +HIDE_SYMBOL(getHostCallReturnValue) "\n" +".thumb" "\n" +".thumb_func " THUMB_FUNC_PARAM(getHostCallReturnValue) "\n" +SYMBOL_STRING(getHostCallReturnValue) ":" "\n" + "ldr r5, [r5, #-40]" "\n" + "cpy r0, r5" "\n" + "b " SYMBOL_STRING_RELOCATION(getHostCallReturnValueWithExecState) "\n" +); +#endif + +extern "C" EncodedJSValue HOST_CALL_RETURN_VALUE_OPTION getHostCallReturnValueWithExecState(ExecState* exec) +{ + if (!exec) + return JSValue::encode(JSValue()); + return JSValue::encode(exec->globalData().hostCallReturnValue); +} + +#endif // COMPILER(GCC) + +} // namespace JSC #endif diff --git a/Source/JavaScriptCore/jit/HostCallReturnValue.cpp b/Source/JavaScriptCore/jit/HostCallReturnValue.cpp index ff627c8..924bc76 100644 --- a/Source/JavaScriptCore/jit/HostCallReturnValue.cpp +++ b/Source/JavaScriptCore/jit/HostCallReturnValue.cpp @@ -34,49 +34,7 @@ namespace JSC { -#if COMPILER(GCC) - -#if CPU(X86_64) -asm ( -".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" -HIDE_SYMBOL(getHostCallReturnValue) "\n" -SYMBOL_STRING(getHostCallReturnValue) ":" "\n" - "mov -40(%r13), %r13\n" - "mov %r13, %rdi\n" - "jmp " SYMBOL_STRING_RELOCATION(getHostCallReturnValueWithExecState) "\n" -); -#elif CPU(X86) -asm ( -".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" -HIDE_SYMBOL(getHostCallReturnValue) "\n" -SYMBOL_STRING(getHostCallReturnValue) ":" "\n" - "mov -40(%edi), %edi\n" - "mov %edi, 4(%esp)\n" - "jmp " SYMBOL_STRING_RELOCATION(getHostCallReturnValueWithExecState) "\n" -); -#elif CPU(ARM_THUMB2) -asm ( -".text" "\n" -".align 2" "\n" -".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" -HIDE_SYMBOL(getHostCallReturnValue) "\n" -".thumb" "\n" -".thumb_func " THUMB_FUNC_PARAM(getHostCallReturnValue) "\n" -SYMBOL_STRING(getHostCallReturnValue) ":" "\n" - "ldr r5, [r5, #-40]" "\n" - "cpy r0, r5" "\n" - "b " SYMBOL_STRING_RELOCATION(getHostCallReturnValueWithExecState) "\n" -); -#endif - -extern "C" EncodedJSValue HOST_CALL_RETURN_VALUE_OPTION getHostCallReturnValueWithExecState(ExecState* exec) -{ - if (!exec) - return JSValue::encode(JSValue()); - return JSValue::encode(exec->globalData().hostCallReturnValue); -} - -#endif // COMPILER(GCC) +// Nothing to see here. } // namespace JSC diff --git a/Source/JavaScriptCore/jit/HostCallReturnValue.h b/Source/JavaScriptCore/jit/HostCallReturnValue.h index 12fe10b..0fc5359 100644 --- a/Source/JavaScriptCore/jit/HostCallReturnValue.h +++ b/Source/JavaScriptCore/jit/HostCallReturnValue.h @@ -50,6 +50,7 @@ extern "C" EncodedJSValue HOST_CALL_RETURN_VALUE_OPTION getHostCallReturnValueWi inline void initializeHostCallReturnValue() { + getHostCallReturnValue(); getHostCallReturnValueWithExecState(0); } -- 2.7.4