Ignore:
Timestamp:
Jan 4, 2010, 3:38:56 AM (15 years ago)
Author:
[email protected]
Message:

2010-01-04 Maciej Stachowiak <[email protected]>

Reviewed by Adam Barth.

Reorganize, document and rename CPU() platform macros.
https://bugs.webkit.org/show_bug.cgi?id=33145
ExecutableAllocatorSymbian appears to have buggy ARM version check
https://bugs.webkit.org/show_bug.cgi?id=33138


  • wtf/Platform.h: Rename all macros related to detection of particular CPUs or classes of CPUs to CPU(), reorganize and document them.

All remaining changes are adapting to the renames, plus fixing the
second bug cited above.


  • assembler/ARMAssembler.cpp:
  • assembler/ARMAssembler.h:
  • assembler/ARMv7Assembler.h:
  • assembler/AbstractMacroAssembler.h: (JSC::AbstractMacroAssembler::Imm32::Imm32):
  • assembler/MacroAssembler.h:
  • assembler/MacroAssemblerARM.cpp:
  • assembler/MacroAssemblerARM.h:
  • assembler/MacroAssemblerCodeRef.h: (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
  • assembler/MacroAssemblerX86.h:
  • assembler/MacroAssemblerX86Common.h:
  • assembler/MacroAssemblerX86_64.h:
  • assembler/X86Assembler.h: (JSC::X86Registers::): (JSC::X86Assembler::): (JSC::X86Assembler::movl_mEAX): (JSC::X86Assembler::movl_EAXm): (JSC::X86Assembler::repatchLoadPtrToLEA): (JSC::X86Assembler::X86InstructionFormatter::memoryModRM):
  • jit/ExecutableAllocator.h:
  • jit/ExecutableAllocatorFixedVMPool.cpp:
  • jit/ExecutableAllocatorPosix.cpp:
  • jit/ExecutableAllocatorSymbian.cpp: (JSC::ExecutableAllocator::intializePageSize):
  • jit/JIT.cpp:
  • jit/JIT.h:
  • jit/JITArithmetic.cpp:
  • jit/JITInlineMethods.h: (JSC::JIT::beginUninterruptedSequence): (JSC::JIT::restoreArgumentReferenceForTrampoline): (JSC::JIT::emitCount):
  • jit/JITOpcodes.cpp: (JSC::JIT::privateCompileCTIMachineTrampolines):
  • jit/JITPropertyAccess.cpp: (JSC::JIT::privateCompileGetByIdProto): (JSC::JIT::privateCompileGetByIdProtoList): (JSC::JIT::privateCompileGetByIdChainList): (JSC::JIT::privateCompileGetByIdChain):
  • jit/JITStubs.cpp: (JSC::JITThunks::JITThunks):
  • jit/JITStubs.h:
  • runtime/Collector.cpp: (JSC::currentThreadStackBase): (JSC::getPlatformThreadRegisters): (JSC::otherThreadStackPointer):
  • wrec/WREC.h:
  • wrec/WRECGenerator.cpp: (JSC::WREC::Generator::generateEnter): (JSC::WREC::Generator::generateReturnSuccess): (JSC::WREC::Generator::generateReturnFailure):
  • wrec/WRECGenerator.h:
  • wtf/FastMalloc.cpp:
  • wtf/TCSpinLock.h: (TCMalloc_SpinLock::Lock): (TCMalloc_SpinLock::Unlock): (TCMalloc_SlowLock):
  • wtf/Threading.h:
  • wtf/dtoa.cpp:
  • yarr/RegexJIT.cpp: (JSC::Yarr::RegexGenerator::generateEnter): (JSC::Yarr::RegexGenerator::generateReturn):
  • yarr/RegexJIT.h:

2010-01-04 Maciej Stachowiak <[email protected]>

Reviewed by Adam Barth.

Reorganize, document and rename CPU() platform macros.
https://bugs.webkit.org/show_bug.cgi?id=33145

  • webkit/webkitwebsettings.cpp: (webkit_get_user_agent):

2010-01-04 Maciej Stachowiak <[email protected]>

Reviewed by Adam Barth.

Reorganize, document and rename CPU() platform macros.
https://bugs.webkit.org/show_bug.cgi?id=33145

  • page/NavigatorBase.cpp:
  • platform/text/AtomicString.cpp: (WebCore::equal):
  • platform/text/StringHash.h: (WebCore::StringHash::equal):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/assembler/X86Assembler.h

    r47834 r52729  
    2929#include <wtf/Platform.h>
    3030
    31 #if ENABLE(ASSEMBLER) && (PLATFORM(X86) || PLATFORM(X86_64))
     31#if ENABLE(ASSEMBLER) && (CPU(X86) || CPU(X86_64))
    3232
    3333#include "AssemblerBuffer.h"
     
    5151        edi,
    5252
    53 #if PLATFORM(X86_64)
     53#if CPU(X86_64)
    5454        r8,
    5555        r9,
     
    119119        OP_CMP_EvGv                     = 0x39,
    120120        OP_CMP_GvEv                     = 0x3B,
    121 #if PLATFORM(X86_64)
     121#if CPU(X86_64)
    122122        PRE_REX                         = 0x40,
    123123#endif
    124124        OP_PUSH_EAX                     = 0x50,
    125125        OP_POP_EAX                      = 0x58,
    126 #if PLATFORM(X86_64)
     126#if CPU(X86_64)
    127127        OP_MOVSXD_GvEv                  = 0x63,
    128128#endif
     
    297297    // Arithmetic operations:
    298298
    299 #if !PLATFORM(X86_64)
     299#if !CPU(X86_64)
    300300    void adcl_im(int imm, void* addr)
    301301    {
     
    347347    }
    348348
    349 #if PLATFORM(X86_64)
     349#if CPU(X86_64)
    350350    void addq_rr(RegisterID src, RegisterID dst)
    351351    {
     
    424424    }
    425425
    426 #if PLATFORM(X86_64)
     426#if CPU(X86_64)
    427427    void andq_rr(RegisterID src, RegisterID dst)
    428428    {
     
    510510    }
    511511
    512 #if PLATFORM(X86_64)
     512#if CPU(X86_64)
    513513    void orq_rr(RegisterID src, RegisterID dst)
    514514    {
     
    576576    }
    577577
    578 #if PLATFORM(X86_64)
     578#if CPU(X86_64)
    579579    void subq_rr(RegisterID src, RegisterID dst)
    580580    {
     
    642642    }
    643643
    644 #if PLATFORM(X86_64)
     644#if CPU(X86_64)
    645645    void xorq_rr(RegisterID src, RegisterID dst)
    646646    {
     
    690690    }
    691691
    692 #if PLATFORM(X86_64)
     692#if CPU(X86_64)
    693693    void sarq_CLr(RegisterID dst)
    694694    {
     
    790790    }
    791791
    792 #if PLATFORM(X86_64)
     792#if CPU(X86_64)
    793793    void cmpq_rr(RegisterID src, RegisterID dst)
    794794    {
     
    898898    }
    899899
    900 #if PLATFORM(X86_64)
     900#if CPU(X86_64)
    901901    void testq_rr(RegisterID src, RegisterID dst)
    902902    {
     
    972972    }
    973973
    974 #if PLATFORM(X86_64)
     974#if CPU(X86_64)
    975975    void xchgq_rr(RegisterID src, RegisterID dst)
    976976    {
     
    10021002    {
    10031003        m_formatter.oneByteOp(OP_MOV_EAXOv);
    1004 #if PLATFORM(X86_64)
     1004#if CPU(X86_64)
    10051005        m_formatter.immediate64(reinterpret_cast<int64_t>(addr));
    10061006#else
     
    10391039    {
    10401040        m_formatter.oneByteOp(OP_MOV_OvEAX);
    1041 #if PLATFORM(X86_64)
     1041#if CPU(X86_64)
    10421042        m_formatter.immediate64(reinterpret_cast<int64_t>(addr));
    10431043#else
     
    10461046    }
    10471047
    1048 #if PLATFORM(X86_64)
     1048#if CPU(X86_64)
    10491049    void movq_rr(RegisterID src, RegisterID dst)
    10501050    {
     
    11581158        m_formatter.oneByteOp(OP_LEA, dst, base, offset);
    11591159    }
    1160 #if PLATFORM(X86_64)
     1160#if CPU(X86_64)
    11611161    void leaq_mr(int offset, RegisterID base, RegisterID dst)
    11621162    {
     
    13241324    }
    13251325
    1326 #if !PLATFORM(X86_64)
     1326#if !CPU(X86_64)
    13271327    void cvtsi2sd_mr(void* address, XMMRegisterID dst)
    13281328    {
     
    13441344    }
    13451345
    1346 #if PLATFORM(X86_64)
     1346#if CPU(X86_64)
    13471347    void movq_rr(XMMRegisterID src, RegisterID dst)
    13481348    {
     
    13701370    }
    13711371
    1372 #if !PLATFORM(X86_64)
     1372#if !CPU(X86_64)
    13731373    void movsd_mr(void* address, XMMRegisterID dst)
    13741374    {
     
    15361536    static void repatchLoadPtrToLEA(void* where)
    15371537    {
    1538 #if PLATFORM(X86_64)
     1538#if CPU(X86_64)
    15391539        // On x86-64 pointer memory accesses require a 64-bit operand, and as such a REX prefix.
    15401540        // Skip over the prefix byte.
     
    16801680        }
    16811681
    1682 #if !PLATFORM(X86_64)
     1682#if !CPU(X86_64)
    16831683        void oneByteOp(OneByteOpcodeID opcode, int reg, void* address)
    16841684        {
     
    17231723        }
    17241724
    1725 #if !PLATFORM(X86_64)
     1725#if !CPU(X86_64)
    17261726        void twoByteOp(TwoByteOpcodeID opcode, int reg, void* address)
    17271727        {
     
    17331733#endif
    17341734
    1735 #if PLATFORM(X86_64)
     1735#if CPU(X86_64)
    17361736        // Quad-word-sized operands:
    17371737        //
     
    18921892        static const RegisterID hasSib = X86Registers::esp;
    18931893        static const RegisterID noIndex = X86Registers::esp;
    1894 #if PLATFORM(X86_64)
     1894#if CPU(X86_64)
    18951895        static const RegisterID noBase2 = X86Registers::r13;
    18961896        static const RegisterID hasSib2 = X86Registers::r12;
     
    19681968        {
    19691969            // A base of esp or r12 would be interpreted as a sib, so force a sib with no index & put the base in there.
    1970 #if PLATFORM(X86_64)
     1970#if CPU(X86_64)
    19711971            if ((base == hasSib) || (base == hasSib2)) {
    19721972#else
     
    19831983                }
    19841984            } else {
    1985 #if PLATFORM(X86_64)
     1985#if CPU(X86_64)
    19861986                if (!offset && (base != noBase) && (base != noBase2))
    19871987#else
     
    20022002        {
    20032003            // A base of esp or r12 would be interpreted as a sib, so force a sib with no index & put the base in there.
    2004 #if PLATFORM(X86_64)
     2004#if CPU(X86_64)
    20052005            if ((base == hasSib) || (base == hasSib2)) {
    20062006#else
     
    20192019            ASSERT(index != noIndex);
    20202020
    2021 #if PLATFORM(X86_64)
     2021#if CPU(X86_64)
    20222022            if (!offset && (base != noBase) && (base != noBase2))
    20232023#else
     
    20342034        }
    20352035
    2036 #if !PLATFORM(X86_64)
     2036#if !CPU(X86_64)
    20372037        void memoryModRM(int reg, void* address)
    20382038        {
     
    20492049} // namespace JSC
    20502050
    2051 #endif // ENABLE(ASSEMBLER) && PLATFORM(X86)
     2051#endif // ENABLE(ASSEMBLER) && CPU(X86)
    20522052
    20532053#endif // X86Assembler_h
Note: See TracChangeset for help on using the changeset viewer.