Changeset 44886 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Jun 19, 2009, 6:07:06 PM (16 years ago)
Author:
[email protected]
Message:

2009-06-19 Gabor Loki <[email protected]>

Reviewed by Gavin Barraclough.

Reorganize ARM architecture specific macros.
Use PLATFORM_ARM_ARCH(7) instead of PLATFORM(ARM_V7).

Bug 24986: ARM JIT port
<https://bugs.webkit.org/show_bug.cgi?id=24986>

  • assembler/ARMv7Assembler.h:
  • assembler/AbstractMacroAssembler.h: (JSC::AbstractMacroAssembler::Imm32::Imm32):
  • assembler/MacroAssembler.h:
  • assembler/MacroAssemblerCodeRef.h: (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
  • jit/ExecutableAllocator.h: (JSC::ExecutableAllocator::cacheFlush):
  • jit/JIT.h:
  • jit/JITInlineMethods.h: (JSC::JIT::restoreArgumentReferenceForTrampoline):
  • jit/JITStubs.cpp:
  • jit/JITStubs.h:
  • wtf/Platform.h:
  • yarr/RegexJIT.cpp: (JSC::Yarr::RegexGenerator::generateEnter): (JSC::Yarr::RegexGenerator::generateReturn):
Location:
trunk/JavaScriptCore
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r44884 r44886  
     12009-06-19  Gabor Loki  <[email protected]>
     2
     3        Reviewed by Gavin Barraclough.
     4
     5        Reorganize ARM architecture specific macros.
     6        Use PLATFORM_ARM_ARCH(7) instead of PLATFORM(ARM_V7).
     7
     8        Bug 24986: ARM JIT port
     9        <https://bugs.webkit.org/show_bug.cgi?id=24986>
     10
     11        * assembler/ARMv7Assembler.h:
     12        * assembler/AbstractMacroAssembler.h:
     13        (JSC::AbstractMacroAssembler::Imm32::Imm32):
     14        * assembler/MacroAssembler.h:
     15        * assembler/MacroAssemblerCodeRef.h:
     16        (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
     17        * jit/ExecutableAllocator.h:
     18        (JSC::ExecutableAllocator::cacheFlush):
     19        * jit/JIT.h:
     20        * jit/JITInlineMethods.h:
     21        (JSC::JIT::restoreArgumentReferenceForTrampoline):
     22        * jit/JITStubs.cpp:
     23        * jit/JITStubs.h:
     24        * wtf/Platform.h:
     25        * yarr/RegexJIT.cpp:
     26        (JSC::Yarr::RegexGenerator::generateEnter):
     27        (JSC::Yarr::RegexGenerator::generateReturn):
     28
    1292009-06-19  Gavin Barraclough  <[email protected]>
    230
  • trunk/JavaScriptCore/assembler/ARMv7Assembler.h

    r44713 r44886  
    2929#include <wtf/Platform.h>
    3030
    31 #if ENABLE(ASSEMBLER) && PLATFORM(ARM_V7)
     31#if ENABLE(ASSEMBLER) && PLATFORM_ARM_ARCH(7)
    3232
    3333#include "AssemblerBuffer.h"
     
    17541754} // namespace JSC
    17551755
    1756 #endif // ENABLE(ASSEMBLER) && PLATFORM(ARM_V7)
     1756#endif // ENABLE(ASSEMBLER) && PLATFORM_ARM_ARCH(7)
    17571757
    17581758#endif // ARMAssembler_h
  • trunk/JavaScriptCore/assembler/AbstractMacroAssembler.h

    r44713 r44886  
    176176        explicit Imm32(int32_t value)
    177177            : m_value(value)
    178 #if PLATFORM(ARM_V7)
     178#if PLATFORM_ARM_ARCH(7)
    179179            , m_isPointer(false)
    180180#endif
     
    185185        explicit Imm32(ImmPtr ptr)
    186186            : m_value(ptr.asIntptr())
    187 #if PLATFORM(ARM_V7)
     187#if PLATFORM_ARM_ARCH(7)
    188188            , m_isPointer(true)
    189189#endif
     
    193193
    194194        int32_t m_value;
    195 #if PLATFORM(ARM_V7)
     195#if PLATFORM_ARM_ARCH(7)
    196196        // We rely on being able to regenerate code to recover exception handling
    197197        // information.  Since ARMv7 supports 16-bit immediates there is a danger
  • trunk/JavaScriptCore/assembler/MacroAssembler.h

    r44514 r44886  
    3131#if ENABLE(ASSEMBLER)
    3232
    33 #if PLATFORM(ARM_V7)
     33#if PLATFORM_ARM_ARCH(7)
    3434#include "MacroAssemblerARMv7.h"
    3535namespace JSC { typedef MacroAssemblerARMv7 MacroAssemblerBase; };
  • trunk/JavaScriptCore/assembler/MacroAssemblerCodeRef.h

    r44711 r44886  
    3838// ASSERT_VALID_CODE_POINTER checks that ptr is a non-null pointer, and that it is a valid
    3939// instruction address on the platform (for example, check any alignment requirements).
    40 #if PLATFORM(ARM_V7)
     40#if PLATFORM_ARM_ARCH(7)
    4141// ARM/thumb instructions must be 16-bit aligned, but all code pointers to be loaded
    4242// into the processor are decorated with the bottom bit set, indicating that this is
     
    125125
    126126    explicit MacroAssemblerCodePtr(void* value)
    127 #if PLATFORM(ARM_V7)
     127#if PLATFORM_ARM_ARCH(7)
    128128        // Decorate the pointer as a thumb code pointer.
    129129        : m_value(reinterpret_cast<char*>(value) + 1)
     
    142142
    143143    void* executableAddress() const { return m_value; }
    144 #if PLATFORM(ARM_V7)
     144#if PLATFORM_ARM_ARCH(7)
    145145    // To use this pointer as a data address remove the decoration.
    146146    void* dataLocation() const { ASSERT_VALID_CODE_POINTER(m_value); return reinterpret_cast<char*>(m_value) - 1; }
  • trunk/JavaScriptCore/jit/ExecutableAllocator.h

    r44517 r44886  
    211211        UNUSED_PARAM(code);
    212212        UNUSED_PARAM(size);
    213 #elif PLATFORM(ARM_V7) && PLATFORM(IPHONE)
     213#elif PLATFORM_ARM_ARCH(7) && PLATFORM(IPHONE)
    214214        sys_dcache_flush(code, size);
    215215        sys_icache_invalidate(code, size);
  • trunk/JavaScriptCore/jit/JIT.h

    r44884 r44886  
    233233        static const FPRegisterID fpRegT1 = X86::xmm1;
    234234        static const FPRegisterID fpRegT2 = X86::xmm2;
    235 #elif PLATFORM(ARM_V7)
     235#elif PLATFORM_ARM_ARCH(7)
    236236        static const RegisterID returnValueRegister = ARM::r0;
    237237        static const RegisterID cachedResultRegister = ARM::r0;
     
    308308        static const int patchOffsetMethodCheckProtoStruct = 18;
    309309        static const int patchOffsetMethodCheckPutFunction = 29;
    310 #elif PLATFORM(ARM_V7)
     310#elif PLATFORM_ARM_ARCH(7)
    311311        // These architecture specific value are used to enable patching - see comment on op_put_by_id.
    312312        static const int patchOffsetPutByIdStructure = 10;
  • trunk/JavaScriptCore/jit/JITInlineMethods.h

    r44884 r44886  
    199199}
    200200
    201 #elif PLATFORM(ARM_V7)
     201#elif PLATFORM_ARM_ARCH(7)
    202202
    203203ALWAYS_INLINE void JIT::preverveReturnAddressAfterCall(RegisterID reg)
     
    235235    // Within a trampoline the return address will be on the stack at this point.
    236236    addPtr(Imm32(sizeof(void*)), stackPointerRegister, firstArgumentRegister);
    237 #elif PLATFORM(ARM_V7)
     237#elif PLATFORM_ARM_ARCH(7)
    238238    move(stackPointerRegister, firstArgumentRegister);
    239239#endif
  • trunk/JavaScriptCore/jit/JITStubs.cpp

    r44884 r44886  
    190190);
    191191
    192 #elif COMPILER(GCC) && PLATFORM(ARM_V7)
     192#elif COMPILER(GCC) && PLATFORM_ARM_ARCH(7)
    193193
    194194#if USE(JIT_STUB_ARGUMENT_VA_LIST)
     
    329329    JIT::compileCTIMachineTrampolines(globalData, &m_executablePool, &m_ctiArrayLengthTrampoline, &m_ctiStringLengthTrampoline, &m_ctiVirtualCallPreLink, &m_ctiVirtualCallLink, &m_ctiVirtualCall, &m_ctiNativeCallThunk);
    330330
    331 #if PLATFORM(ARM_V7)
     331#if PLATFORM_ARM_ARCH(7)
    332332    // Unfortunate the arm compiler does not like the use of offsetof on JITStackFrame (since it contains non POD types),
    333333    // and the FIELD_OFFSET macro does not appear constantish enough for it to be happy with its use in COMPILE_ASSERT
     
    570570namespace JITStubs {
    571571
    572 #if PLATFORM(ARM_V7)
     572#if PLATFORM_ARM_ARCH(7)
    573573
    574574#define DEFINE_STUB_FUNCTION(rtype, op) \
  • trunk/JavaScriptCore/jit/JITStubs.h

    r44838 r44886  
    116116        ReturnAddressPtr* returnAddressSlot() { return reinterpret_cast<ReturnAddressPtr*>(this) - 1; }
    117117    };
    118 #elif PLATFORM(ARM_V7)
     118#elif PLATFORM_ARM_ARCH(7)
    119119    struct JITStackFrame {
    120120        JITStubArg padding; // Unused
  • trunk/JavaScriptCore/wtf/Platform.h

    r44765 r44886  
    228228#define WTF_PLATFORM_FORCE_PACK 1
    229229#endif
     230#define ARM_ARCH_VERSION 3
     231#if defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__)
     232#undef ARM_ARCH_VERSION
     233#define ARM_ARCH_VERSION 4
     234#endif
     235#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) \
     236        || defined(__ARM_ARCH_5E__) || defined(__ARM_ARCH_5TE__) \
     237        || defined(__ARM_ARCH_5TEJ__)
     238#undef ARM_ARCH_VERSION
     239#define ARM_ARCH_VERSION 5
     240#endif
     241#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \
     242     || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) \
     243     || defined(__ARM_ARCH_6ZK__)
     244#undef ARM_ARCH_VERSION
     245#define ARM_ARCH_VERSION 6
    230246#endif
    231247#if defined(__ARM_ARCH_7A__)
    232 #define WTF_PLATFORM_ARM_V7 1
    233 #endif
     248#undef ARM_ARCH_VERSION
     249#define ARM_ARCH_VERSION 7
     250#endif
     251#endif /* ARM */
     252#define PLATFORM_ARM_ARCH(N) (PLATFORM(ARM) && ARM_ARCH_VERSION >= N)
    234253
    235254/* PLATFORM(X86) */
     
    520539    #define ENABLE_JIT 1
    521540    #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
    522 #elif PLATFORM(ARM_V7) && PLATFORM(IPHONE)
     541#elif PLATFORM_ARM_ARCH(7) && PLATFORM(IPHONE)
    523542    /* Under development, temporarily disabled until 16Mb link range limit in assembler is fixed. */
    524543    #define ENABLE_JIT 0
     
    569588 || (!defined(ENABLE_YARR_JIT) && PLATFORM(X86_64) && PLATFORM(MAC)) \
    570589 /* Under development, temporarily disabled until 16Mb link range limit in assembler is fixed. */ \
    571  || (!defined(ENABLE_YARR_JIT) && PLATFORM(ARM_V7) && PLATFORM(IPHONE) && 0) \
     590 || (!defined(ENABLE_YARR_JIT) && PLATFORM_ARM_ARCH(7) && PLATFORM(IPHONE) && 0) \
    572591 || (!defined(ENABLE_YARR_JIT) && PLATFORM(X86) && PLATFORM(WIN))
    573592#define ENABLE_YARR 1
     
    584603/* Setting this flag prevents the assembler from using RWX memory; this may improve
    585604   security but currectly comes at a significant performance cost. */
    586 #if PLATFORM(ARM_V7) && PLATFORM(IPHONE)
     605#if PLATFORM_ARM_ARCH(7) && PLATFORM(IPHONE)
    587606#define ENABLE_ASSEMBLER_WX_EXCLUSIVE 1
    588607#else
  • trunk/JavaScriptCore/yarr/RegexJIT.cpp

    r44713 r44886  
    4444    friend void jitCompileRegex(JSGlobalData* globalData, RegexCodeBlock& jitObject, const UString& pattern, unsigned& numSubpatterns, const char*& error, bool ignoreCase, bool multiline);
    4545
    46 #if PLATFORM(ARM_V7)
     46#if PLATFORM_ARM_ARCH(7)
    4747    static const RegisterID input = ARM::r0;
    4848    static const RegisterID index = ARM::r1;
     
    13091309        loadPtr(Address(X86::ebp, 2 * sizeof(void*)), output);
    13101310    #endif
    1311 #elif PLATFORM(ARM_V7)
     1311#elif PLATFORM_ARM_ARCH(7)
    13121312        push(ARM::r4);
    13131313        push(ARM::r5);
     
    13261326        pop(X86::ebx);
    13271327        pop(X86::ebp);
    1328 #elif PLATFORM(ARM_V7)
     1328#elif PLATFORM_ARM_ARCH(7)
    13291329        pop(ARM::r6);
    13301330        pop(ARM::r5);
Note: See TracChangeset for help on using the changeset viewer.