Bug 114968

Summary: [32-bit] JavaScriptCore JIT build is broken for 32-bit arch since r148893
Product: WebKit Reporter: Julien Brianceau <jbriance>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: ggaren, mark.lam, oliver
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
the fix none

Description Julien Brianceau 2013-04-22 10:48:57 PDT
JavaScriptCore JIT build is broken for sh4 arch since r148893

See: http://build.webkit.org/builders/Qt%20Linux%20SH4%20Release/builds/24734

sh4-linux-g++ --sysroot=/opt/STM/STLinux-2.4/devkit/sh4/target -Wl,-O1 -Wl,-rpath,/local/wkit/slavebuildbot_LOCAL/workspace_LOCAL/qt-linux-sh4-release/build/WebKitBuild/Release/lib -Wl,-rpath,/lib -o ../../bin/jsc .obj/release-shared/jsc.o   -Wl,-whole-archive -lJavaScriptCore -Wl,-no-whole-archive -L/local/wkit/slavebuildbot_LOCAL/workspace_LOCAL/qt-linux-sh4-release/build/WebKitBuild/Release/Source/JavaScriptCore/release -Wl,-whole-archive -lWTF -Wl,-no-whole-archive -L/local/wkit/slavebuildbot_LOCAL/workspace_LOCAL/qt-linux-sh4-release/build/WebKitBuild/Release/Source/WTF/release -licui18n -licuuc -licudata -L/local/wkit/build/qt5-5.0.0/qtbase/lib -lQt5Core -lpthread -lpthread 
/local/wkit/slavebuildbot_LOCAL/workspace_LOCAL/qt-linux-sh4-release/build/WebKitBuild/Release/Source/JavaScriptCore/release/libJavaScriptCore.a(JIT.o): In function `JSC::JIT::privateCompileSlowCases()':
JIT.cpp:(.text+0x2100): undefined reference to `JSC::JIT::emitSlow_op_loop_hint(JSC::Instruction*, JSC::SlowCaseEntry*&)'
/local/wkit/slavebuildbot_LOCAL/workspace_LOCAL/qt-linux-sh4-release/build/WebKitBuild/Release/Source/JavaScriptCore/release/libJavaScriptCore.a(JIT.o): In function `JSC::JIT::privateCompileMainPass()':
JIT.cpp:(.text+0x2b74): undefined reference to `JSC::JIT::emit_op_loop_hint(JSC::Instruction*)'
collect2: ld returned 1 exit status
make[3]: *** [../../bin/jsc] Error 1
make[3]: Leaving directory `/local/wkit/slavebuildbot_LOCAL/workspace_LOCAL/qt-linux-sh4-release/build/WebKitBuild/Release/Source/JavaScriptCore'
make[2]: *** [sub-jsc-pro-make_first-ordered] Error 2
Comment 1 Julien Brianceau 2013-04-22 10:59:48 PDT
The JIT::emit_op_loop_hint and JIT::emitSlow_op_loop_hint are implemented inside #if USE(JSVALUE64). Is this really needed ? Can I move them outside ?

Once moved out, there is also one missing implementation in MacroAssemblerSH4.h of branchAdd32:
Jump branchAdd32(ResultCondition cond, TrustedImm32 imm, AbsoluteAddress dest)

I'll submit a patch soon,
Comment 2 Mark Lam 2013-04-22 11:30:54 PDT
From what I can tell, apart from the 32-bit build issue, the SH4 branchAdd32 is not missing an implementation.  However, their asserts for acceptable ResultConditions need to be updated, which I will do with this patch as well.
Comment 3 Mark Lam 2013-04-22 11:37:09 PDT
Created attachment 199054 [details]
the fix
Comment 4 Mark Lam 2013-04-22 11:40:42 PDT
Fix landed in r148899: <http://trac.webkit.org/changeset/148899>.