發表文章

目前顯示的是 8月, 2014的文章

build JSC with FTL on Linux

goal: the FTL only supported on Darwin, but we want it workable on linux for study FTL implementation Platform: X86_64 LLVM version: c84ba8 WebKit version:  5d442a LLVM: LLVM should has stackmap implementation in ELF, grep .llvm_stackmaps in $llvm/ lib/MC/MCObjectFileInfo.cpp patch for walkaround eh_frame relocation error jsc : $ llvm /lib/ ExecutionEngine / RuntimeDyld /RuntimeDyldELF.cpp:308: void llvm :: RuntimeDyldELF :: resolveX86_64Relocation (const llvm :: SectionEntry &, uint64_t, uint64_t, uint32_t, int64_t, uint64_t): Assertion ` RealOffset <= (2147483647) && RealOffset >= (-2147483647-1)' failed. Aborted index a592c09..9231cbe 100644 --- a/lib/MC/MCDwarf.cpp +++ b/lib/MC/MCDwarf.cpp @@ -999,7 +999,7 @@ static void emitFDESymbol(MCObjectStreamer &streamer, const MCSym    if (asmInfo->doDwarfFDESymbolsUseAbsDiff() && isEH)      emitAbsValue(streamer, v, size);    else ...

千萬不要自己寫build script去試open source

我做了非常愚蠢的事情 大型open source有buildscript的話 能的話要先從buildscript當做進入點 千萬不要想我傻傻的自己寫build script去試 腦殘

clang's atomic operation trick

clang will generate libCall or LLVM atomic IR with built-in atomic operaion. 1. when data size of atomic operation is less than getTarget().getMaxAtomicInlineWidth() && alignent, it will generate LLVM atomic IR, otherwise generate libCall 2. in ARM target, give fail triple name also generates libCall 3. MaxAtomicInlineWidth is defined in lib/Basic/Targets.cpp