Changeset 48527 in webkit for trunk/JavaScriptCore/jit


Ignore:
Timestamp:
Sep 18, 2009, 1:35:30 PM (16 years ago)
Author:
[email protected]
Message:

2009-09-18 Gabor Loki <[email protected]>

Reviewed by Gavin Barraclough.

Build fix to enable ARM_THUMB2 on Linux
https://bugs.webkit.org/show_bug.cgi?id=

  • jit/ExecutableAllocator.h: (JSC::ExecutableAllocator::cacheFlush):
  • jit/JITStubs.cpp:
  • wtf/Platform.h:
Location:
trunk/JavaScriptCore/jit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/jit/ExecutableAllocator.h

    r48525 r48527  
    192192        User::IMB_Range(code, static_cast<char*>(code) + size);
    193193    }
    194 #elif PLATFORM(ARM_TRADITIONAL)
    195     static void cacheFlush(void* code, size_t size)
    196     {
    197     #if COMPILER(GCC) && (GCC_VERSION >= 30406)
     194#elif PLATFORM(ARM) && COMPILER(GCC) && (GCC_VERSION >= 30406)
     195    static void cacheFlush(void* code, size_t size)
     196    {
    198197        __clear_cache(reinterpret_cast<char*>(code), reinterpret_cast<char*>(code) + size);
    199     #else
    200         const int syscall = 0xf0002;
    201         __asm __volatile (
    202                "mov     r0, %0\n"
    203                "mov     r1, %1\n"
    204                "mov     r7, %2\n"
    205                "mov     r2, #0x0\n"
    206                "swi     0x00000000\n"
    207            :
    208            :   "r" (code), "r" (reinterpret_cast<char*>(code) + size), "r" (syscall)
    209            :   "r0", "r1", "r7");
    210     #endif // COMPILER(GCC) && (GCC_VERSION >= 30406)
    211     }
     198    }
     199#elif PLATFORM(ARM_TRADITIONAL) && PLATFORM(LINUX)
     200    static void cacheFlush(void* code, size_t size)
     201    {
     202        asm volatile (
     203            "push    {r7}\n"
     204            "mov     r0, %0\n"
     205            "mov     r1, %1\n"
     206            "mov     r7, 0xf0002\n"
     207            "mov     r2, #0x0\n"
     208            "svc     0x0\n"
     209            "pop     {r7}\n"
     210            :
     211            : "r" (code), "r" (reinterpret_cast<char*>(code) + size)
     212            : "r0", "r1");
     213    }
     214#else
     215    #error "The cacheFlush support is missing on this platform."
    212216#endif
    213217
  • trunk/JavaScriptCore/jit/JITStubs.cpp

    r48525 r48527  
    7070#endif
    7171
     72#if PLATFORM(IPHONE)
     73#define THUMB_FUNC_PARAM(name) SYMBOL_STRING(name)
     74#else
     75#define THUMB_FUNC_PARAM(name)
     76#endif
     77
    7278#if USE(JSVALUE32_64)
    7379
     
    205211".globl " SYMBOL_STRING(ctiTrampoline) "\n"
    206212".thumb" "\n"
    207 ".thumb_func " SYMBOL_STRING(ctiTrampoline) "\n"
     213".thumb_func " THUMB_FUNC_PARAM(ctiTrampoline) "\n"
    208214SYMBOL_STRING(ctiTrampoline) ":" "\n"
    209215    "sub sp, sp, #0x3c" "\n"
     
    231237".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
    232238".thumb" "\n"
    233 ".thumb_func " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
     239".thumb_func " THUMB_FUNC_PARAM(ctiVMThrowTrampoline) "\n"
    234240SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
    235241    "cpy r0, sp" "\n"
     
    248254".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n"
    249255".thumb" "\n"
    250 ".thumb_func " SYMBOL_STRING(ctiOpThrowNotCaught) "\n"
     256".thumb_func " THUMB_FUNC_PARAM(ctiOpThrowNotCaught) "\n"
    251257SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
    252258    "ldr r6, [sp, #0x2c]" "\n"
     
    464470".globl " SYMBOL_STRING(ctiTrampoline) "\n"
    465471".thumb" "\n"
    466 ".thumb_func " SYMBOL_STRING(ctiTrampoline) "\n"
     472".thumb_func " THUMB_FUNC_PARAM(ctiTrampoline) "\n"
    467473SYMBOL_STRING(ctiTrampoline) ":" "\n"
    468474    "sub sp, sp, #0x3c" "\n"
     
    490496".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
    491497".thumb" "\n"
    492 ".thumb_func " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
     498".thumb_func " THUMB_FUNC_PARAM(ctiVMThrowTrampoline) "\n"
    493499SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
    494500    "cpy r0, sp" "\n"
     
    507513".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n"
    508514".thumb" "\n"
    509 ".thumb_func " SYMBOL_STRING(ctiOpThrowNotCaught) "\n"
     515".thumb_func " THUMB_FUNC_PARAM(ctiOpThrowNotCaught) "\n"
    510516SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
    511517    "ldr r6, [sp, #0x2c]" "\n"
     
    888894        ".globl " SYMBOL_STRING(cti_##op) "\n" \
    889895        ".thumb" "\n" \
    890         ".thumb_func " SYMBOL_STRING(cti_##op) "\n" \
     896        ".thumb_func " THUMB_FUNC_PARAM(cti_##op) "\n" \
    891897        SYMBOL_STRING(cti_##op) ":" "\n" \
    892898        "str lr, [sp, #0x1c]" "\n" \
Note: See TracChangeset for help on using the changeset viewer.