Changeset 52729 in webkit


Ignore:
Timestamp:
Jan 4, 2010 3:38:56 AM (14 years ago)
Author:
mjs@apple.com
Message:

2010-01-04 Maciej Stachowiak <mjs@apple.com>

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 <mjs@apple.com>

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 <mjs@apple.com>

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):
Location:
trunk
Files:
42 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r52711 r52729  
     12010-01-04  Maciej Stachowiak  <mjs@apple.com>
     2
     3        Reviewed by Adam Barth.
     4
     5        Reorganize, document and rename CPU() platform macros.
     6        https://bugs.webkit.org/show_bug.cgi?id=33145
     7        ExecutableAllocatorSymbian appears to have buggy ARM version check
     8        https://bugs.webkit.org/show_bug.cgi?id=33138
     9       
     10        * wtf/Platform.h:
     11        Rename all macros related to detection of particular CPUs or
     12        classes of CPUs to CPU(), reorganize and document them.
     13
     14        All remaining changes are adapting to the renames, plus fixing the
     15        second bug cited above.
     16       
     17        * assembler/ARMAssembler.cpp:
     18        * assembler/ARMAssembler.h:
     19        * assembler/ARMv7Assembler.h:
     20        * assembler/AbstractMacroAssembler.h:
     21        (JSC::AbstractMacroAssembler::Imm32::Imm32):
     22        * assembler/MacroAssembler.h:
     23        * assembler/MacroAssemblerARM.cpp:
     24        * assembler/MacroAssemblerARM.h:
     25        * assembler/MacroAssemblerCodeRef.h:
     26        (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
     27        * assembler/MacroAssemblerX86.h:
     28        * assembler/MacroAssemblerX86Common.h:
     29        * assembler/MacroAssemblerX86_64.h:
     30        * assembler/X86Assembler.h:
     31        (JSC::X86Registers::):
     32        (JSC::X86Assembler::):
     33        (JSC::X86Assembler::movl_mEAX):
     34        (JSC::X86Assembler::movl_EAXm):
     35        (JSC::X86Assembler::repatchLoadPtrToLEA):
     36        (JSC::X86Assembler::X86InstructionFormatter::memoryModRM):
     37        * jit/ExecutableAllocator.h:
     38        * jit/ExecutableAllocatorFixedVMPool.cpp:
     39        * jit/ExecutableAllocatorPosix.cpp:
     40        * jit/ExecutableAllocatorSymbian.cpp:
     41        (JSC::ExecutableAllocator::intializePageSize):
     42        * jit/JIT.cpp:
     43        * jit/JIT.h:
     44        * jit/JITArithmetic.cpp:
     45        * jit/JITInlineMethods.h:
     46        (JSC::JIT::beginUninterruptedSequence):
     47        (JSC::JIT::restoreArgumentReferenceForTrampoline):
     48        (JSC::JIT::emitCount):
     49        * jit/JITOpcodes.cpp:
     50        (JSC::JIT::privateCompileCTIMachineTrampolines):
     51        * jit/JITPropertyAccess.cpp:
     52        (JSC::JIT::privateCompileGetByIdProto):
     53        (JSC::JIT::privateCompileGetByIdProtoList):
     54        (JSC::JIT::privateCompileGetByIdChainList):
     55        (JSC::JIT::privateCompileGetByIdChain):
     56        * jit/JITStubs.cpp:
     57        (JSC::JITThunks::JITThunks):
     58        * jit/JITStubs.h:
     59        * runtime/Collector.cpp:
     60        (JSC::currentThreadStackBase):
     61        (JSC::getPlatformThreadRegisters):
     62        (JSC::otherThreadStackPointer):
     63        * wrec/WREC.h:
     64        * wrec/WRECGenerator.cpp:
     65        (JSC::WREC::Generator::generateEnter):
     66        (JSC::WREC::Generator::generateReturnSuccess):
     67        (JSC::WREC::Generator::generateReturnFailure):
     68        * wrec/WRECGenerator.h:
     69        * wtf/FastMalloc.cpp:
     70        * wtf/TCSpinLock.h:
     71        (TCMalloc_SpinLock::Lock):
     72        (TCMalloc_SpinLock::Unlock):
     73        (TCMalloc_SlowLock):
     74        * wtf/Threading.h:
     75        * wtf/dtoa.cpp:
     76        * yarr/RegexJIT.cpp:
     77        (JSC::Yarr::RegexGenerator::generateEnter):
     78        (JSC::Yarr::RegexGenerator::generateReturn):
     79        * yarr/RegexJIT.h:
     80
    1812010-01-04  Maciej Stachowiak  <mjs@apple.com>
    282
  • trunk/JavaScriptCore/assembler/ARMAssembler.cpp

    r50553 r52729  
    2727#include "config.h"
    2828
    29 #if ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL)
     29#if ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL)
    3030
    3131#include "ARMAssembler.h"
     
    403403} // namespace JSC
    404404
    405 #endif // ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL)
     405#endif // ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL)
  • trunk/JavaScriptCore/assembler/ARMAssembler.h

    r51067 r52729  
    3030#include <wtf/Platform.h>
    3131
    32 #if ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL)
     32#if ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL)
    3333
    3434#include "AssemblerBufferWithConstantPool.h"
     
    813813} // namespace JSC
    814814
    815 #endif // ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL)
     815#endif // ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL)
    816816
    817817#endif // ARMAssembler_h
  • trunk/JavaScriptCore/assembler/ARMv7Assembler.h

    r50539 r52729  
    2929#include <wtf/Platform.h>
    3030
    31 #if ENABLE(ASSEMBLER) && PLATFORM(ARM_THUMB2)
     31#if ENABLE(ASSEMBLER) && CPU(ARM_THUMB2)
    3232
    3333#include "AssemblerBuffer.h"
     
    18331833} // namespace JSC
    18341834
    1835 #endif // ENABLE(ASSEMBLER) && PLATFORM(ARM_THUMB2)
     1835#endif // ENABLE(ASSEMBLER) && CPU(ARM_THUMB2)
    18361836
    18371837#endif // ARMAssembler_h
  • trunk/JavaScriptCore/assembler/AbstractMacroAssembler.h

    r47186 r52729  
    174174        explicit Imm32(int32_t value)
    175175            : m_value(value)
    176 #if PLATFORM(ARM)
     176#if CPU(ARM)
    177177            , m_isPointer(false)
    178178#endif
     
    180180        }
    181181
    182 #if !PLATFORM(X86_64)
     182#if !CPU(X86_64)
    183183        explicit Imm32(ImmPtr ptr)
    184184            : m_value(ptr.asIntptr())
    185 #if PLATFORM(ARM)
     185#if CPU(ARM)
    186186            , m_isPointer(true)
    187187#endif
     
    191191
    192192        int32_t m_value;
    193 #if PLATFORM(ARM)
     193#if CPU(ARM)
    194194        // We rely on being able to regenerate code to recover exception handling
    195195        // information.  Since ARMv7 supports 16-bit immediates there is a danger
  • trunk/JavaScriptCore/assembler/MacroAssembler.h

    r50595 r52729  
    3131#if ENABLE(ASSEMBLER)
    3232
    33 #if PLATFORM(ARM_THUMB2)
     33#if CPU(ARM_THUMB2)
    3434#include "MacroAssemblerARMv7.h"
    3535namespace JSC { typedef MacroAssemblerARMv7 MacroAssemblerBase; };
    3636
    37 #elif PLATFORM(ARM_TRADITIONAL)
     37#elif CPU(ARM_TRADITIONAL)
    3838#include "MacroAssemblerARM.h"
    3939namespace JSC { typedef MacroAssemblerARM MacroAssemblerBase; };
    4040
    41 #elif PLATFORM(X86)
     41#elif CPU(X86)
    4242#include "MacroAssemblerX86.h"
    4343namespace JSC { typedef MacroAssemblerX86 MacroAssemblerBase; };
    4444
    45 #elif PLATFORM(X86_64)
     45#elif CPU(X86_64)
    4646#include "MacroAssemblerX86_64.h"
    4747namespace JSC { typedef MacroAssemblerX86_64 MacroAssemblerBase; };
     
    6161    using MacroAssemblerBase::branch32;
    6262    using MacroAssemblerBase::branch16;
    63 #if PLATFORM(X86_64)
     63#if CPU(X86_64)
    6464    using MacroAssemblerBase::branchPtr;
    6565    using MacroAssemblerBase::branchTestPtr;
     
    134134    // Ptr methods
    135135    // On 32-bit platforms (i.e. x86), these methods directly map onto their 32-bit equivalents.
    136 #if !PLATFORM(X86_64)
     136    // FIXME: should this use a test for 32-bitness instead of this specific exception?
     137#if !CPU(X86_64)
    137138    void addPtr(RegisterID src, RegisterID dest)
    138139    {
  • trunk/JavaScriptCore/assembler/MacroAssemblerARM.cpp

    r48782 r52729  
    2727#include "config.h"
    2828
    29 #if ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL)
     29#if ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL)
    3030
    3131#include "MacroAssemblerARM.h"
     
    6363const bool MacroAssemblerARM::s_isVFPPresent = isVFPPresent();
    6464
    65 #if defined(ARM_REQUIRE_NATURAL_ALIGNMENT) && ARM_REQUIRE_NATURAL_ALIGNMENT
     65#if CPU(ARMV5_OR_LOWER)
     66/* On ARMv5 and below, natural alignment is required. */
    6667void MacroAssemblerARM::load32WithUnalignedHalfWords(BaseIndex address, RegisterID dest)
    6768{
     
    9293}
    9394
    94 #endif // ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL)
     95#endif // ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL)
  • trunk/JavaScriptCore/assembler/MacroAssemblerARM.h

    r51067 r52729  
    3131#include <wtf/Platform.h>
    3232
    33 #if ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL)
     33#if ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL)
    3434
    3535#include "ARMAssembler.h"
     
    225225    }
    226226
    227 #if defined(ARM_REQUIRE_NATURAL_ALIGNMENT) && ARM_REQUIRE_NATURAL_ALIGNMENT
     227#if CPU(ARMV5_OR_LOWER)
    228228    void load32WithUnalignedHalfWords(BaseIndex address, RegisterID dest);
    229229#else
     
    929929}
    930930
    931 #endif // ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL)
     931#endif // ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL)
    932932
    933933#endif // MacroAssemblerARM_h
  • trunk/JavaScriptCore/assembler/MacroAssemblerCodeRef.h

    r49509 r52729  
    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_THUMB2)
     40#if CPU(ARM_THUMB2)
    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
     
    131131
    132132    explicit MacroAssemblerCodePtr(void* value)
    133 #if PLATFORM(ARM_THUMB2)
     133#if CPU(ARM_THUMB2)
    134134        // Decorate the pointer as a thumb code pointer.
    135135        : m_value(reinterpret_cast<char*>(value) + 1)
     
    148148
    149149    void* executableAddress() const { return m_value; }
    150 #if PLATFORM(ARM_THUMB2)
     150#if CPU(ARM_THUMB2)
    151151    // To use this pointer as a data address remove the decoration.
    152152    void* dataLocation() const { ASSERT_VALID_CODE_POINTER(m_value); return reinterpret_cast<char*>(m_value) - 1; }
  • trunk/JavaScriptCore/assembler/MacroAssemblerX86.h

    r46598 r52729  
    2929#include <wtf/Platform.h>
    3030
    31 #if ENABLE(ASSEMBLER) && PLATFORM(X86)
     31#if ENABLE(ASSEMBLER) && CPU(X86)
    3232
    3333#include "MacroAssemblerX86Common.h"
  • trunk/JavaScriptCore/assembler/MacroAssemblerX86Common.h

    r50595 r52729  
    543543    }
    544544
    545 #if PLATFORM(X86_64)
     545#if CPU(X86_64)
    546546    void move(RegisterID src, RegisterID dest)
    547547    {
     
    945945    friend class MacroAssemblerX86;
    946946
    947 #if PLATFORM(X86)
     947#if CPU(X86)
    948948#if PLATFORM(MAC)
    949949
     
    998998
    999999#endif // PLATFORM(MAC)
    1000 #elif !defined(NDEBUG) // PLATFORM(X86)
     1000#elif !defined(NDEBUG) // CPU(X86)
    10011001
    10021002    // On x86-64 we should never be checking for SSE2 in a non-debug build,
  • trunk/JavaScriptCore/assembler/MacroAssemblerX86_64.h

    r50595 r52729  
    2929#include <wtf/Platform.h>
    3030
    31 #if ENABLE(ASSEMBLER) && PLATFORM(X86_64)
     31#if ENABLE(ASSEMBLER) && CPU(X86_64)
    3232
    3333#include "MacroAssemblerX86Common.h"
  • 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
  • trunk/JavaScriptCore/jit/ExecutableAllocator.h

    r52538 r52729  
    181181
    182182
    183 #if PLATFORM(X86) || PLATFORM(X86_64)
     183#if CPU(X86) || CPU(X86_64)
    184184    static void cacheFlush(void*, size_t)
    185185    {
    186186    }
    187 #elif PLATFORM(ARM_THUMB2) && PLATFORM(IPHONE)
     187#elif CPU(ARM_THUMB2) && PLATFORM(IPHONE)
    188188    static void cacheFlush(void* code, size_t size)
    189189    {
     
    191191        sys_icache_invalidate(code, size);
    192192    }
    193 #elif PLATFORM(ARM_THUMB2) && PLATFORM(LINUX)
     193#elif CPU(ARM_THUMB2) && PLATFORM(LINUX)
    194194    static void cacheFlush(void* code, size_t size)
    195195    {
     
    212212        User::IMB_Range(code, static_cast<char*>(code) + size);
    213213    }
    214 #elif PLATFORM(ARM_TRADITIONAL) && PLATFORM(LINUX)
     214#elif CPU(ARM_TRADITIONAL) && PLATFORM(LINUX)
    215215    static void cacheFlush(void* code, size_t size)
    216216    {
  • trunk/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp

    r44341 r52729  
    3030#include <errno.h>
    3131
    32 #if ENABLE(ASSEMBLER) && PLATFORM(MAC) && PLATFORM(X86_64)
     32#if ENABLE(ASSEMBLER) && PLATFORM(MAC) && CPU(X86_64)
    3333
    3434#include "TCSpinLock.h"
  • trunk/JavaScriptCore/jit/ExecutableAllocatorPosix.cpp

    r52355 r52729  
    3636namespace JSC {
    3737
    38 #if !(PLATFORM(MAC) && PLATFORM(X86_64))
     38#if !(PLATFORM(MAC) && CPU(X86_64))
    3939
    4040void ExecutableAllocator::intializePageSize()
     
    5858}
    5959
    60 #endif // !(PLATFORM(MAC) && PLATFORM(X86_64))
     60#endif // !(PLATFORM(MAC) && CPU(X86_64))
    6161
    6262#if ENABLE(ASSEMBLER_WX_EXCLUSIVE)
  • trunk/JavaScriptCore/jit/ExecutableAllocatorSymbian.cpp

    r49679 r52729  
    3535void ExecutableAllocator::intializePageSize()
    3636{
    37 #if PLATFORM_ARM_ARCH(5)
     37#if CPU(ARMV5_OR_LOWER)
    3838    // The moving memory model (as used in ARMv5 and earlier platforms)
    3939    // on Symbian OS limits the number of chunks for each process to 16.
  • trunk/JavaScriptCore/jit/JIT.cpp

    r51735 r52729  
    2828
    2929// This probably does not belong here; adding here for now as a quick Windows build fix.
    30 #if ENABLE(ASSEMBLER) && PLATFORM(X86) && !PLATFORM(MAC)
     30#if ENABLE(ASSEMBLER) && CPU(X86) && !PLATFORM(MAC)
    3131#include "MacroAssembler.h"
    3232JSC::MacroAssemblerX86Common::SSE2CheckState JSC::MacroAssemblerX86Common::s_sse2CheckState = NotCheckedSSE2;
  • trunk/JavaScriptCore/jit/JIT.h

    r52051 r52729  
    193193        // MacroAssembler will need to plant register swaps if it is not -
    194194        // however the code will still function correctly.
    195 #if PLATFORM(X86_64)
     195#if CPU(X86_64)
    196196        static const RegisterID returnValueRegister = X86Registers::eax;
    197197        static const RegisterID cachedResultRegister = X86Registers::eax;
     
    211211        static const FPRegisterID fpRegT1 = X86Registers::xmm1;
    212212        static const FPRegisterID fpRegT2 = X86Registers::xmm2;
    213 #elif PLATFORM(X86)
     213#elif CPU(X86)
    214214        static const RegisterID returnValueRegister = X86Registers::eax;
    215215        static const RegisterID cachedResultRegister = X86Registers::eax;
     
    229229        static const FPRegisterID fpRegT1 = X86Registers::xmm1;
    230230        static const FPRegisterID fpRegT2 = X86Registers::xmm2;
    231 #elif PLATFORM(ARM_THUMB2)
     231#elif CPU(ARM_THUMB2)
    232232        static const RegisterID returnValueRegister = ARMRegisters::r0;
    233233        static const RegisterID cachedResultRegister = ARMRegisters::r0;
     
    245245        static const FPRegisterID fpRegT1 = ARMRegisters::d1;
    246246        static const FPRegisterID fpRegT2 = ARMRegisters::d2;
    247 #elif PLATFORM(ARM_TRADITIONAL)
     247#elif CPU(ARM_TRADITIONAL)
    248248        static const RegisterID returnValueRegister = ARMRegisters::r0;
    249249        static const RegisterID cachedResultRegister = ARMRegisters::r0;
     
    437437        void emitBinaryDoubleOp(OpcodeID, unsigned dst, unsigned op1, unsigned op2, OperandTypes, JumpList& notInt32Op1, JumpList& notInt32Op2, bool op1IsInRegisters = true, bool op2IsInRegisters = true);
    438438
    439 #if PLATFORM(X86)
     439#if CPU(X86)
    440440        // These architecture specific value are used to enable patching - see comment on op_put_by_id.
    441441        static const int patchOffsetPutByIdStructure = 7;
     
    466466        static const int patchOffsetMethodCheckProtoStruct = 18;
    467467        static const int patchOffsetMethodCheckPutFunction = 29;
    468 #elif PLATFORM(ARM_TRADITIONAL)
     468#elif CPU(ARM_TRADITIONAL)
    469469        // These architecture specific value are used to enable patching - see comment on op_put_by_id.
    470470        static const int patchOffsetPutByIdStructure = 4;
     
    575575        void compilePutDirectOffset(RegisterID base, RegisterID value, Structure* structure, size_t cachedOffset);
    576576
    577 #if PLATFORM(X86_64)
     577#if CPU(X86_64)
    578578        // These architecture specific value are used to enable patching - see comment on op_put_by_id.
    579579        static const int patchOffsetPutByIdStructure = 10;
     
    598598        static const int patchOffsetMethodCheckProtoStruct = 30;
    599599        static const int patchOffsetMethodCheckPutFunction = 50;
    600 #elif PLATFORM(X86)
     600#elif CPU(X86)
    601601        // These architecture specific value are used to enable patching - see comment on op_put_by_id.
    602602        static const int patchOffsetPutByIdStructure = 7;
     
    625625        static const int patchOffsetMethodCheckProtoStruct = 18;
    626626        static const int patchOffsetMethodCheckPutFunction = 29;
    627 #elif PLATFORM(ARM_THUMB2)
     627#elif CPU(ARM_THUMB2)
    628628        // These architecture specific value are used to enable patching - see comment on op_put_by_id.
    629629        static const int patchOffsetPutByIdStructure = 10;
     
    648648        static const int patchOffsetMethodCheckProtoStruct = 34;
    649649        static const int patchOffsetMethodCheckPutFunction = 58;
    650 #elif PLATFORM(ARM_TRADITIONAL)
     650#elif CPU(ARM_TRADITIONAL)
    651651        // These architecture specific value are used to enable patching - see comment on op_put_by_id.
    652652        static const int patchOffsetPutByIdStructure = 4;
  • trunk/JavaScriptCore/jit/JITArithmetic.cpp

    r51939 r52729  
    11171117/* ------------------------------ BEGIN: OP_MOD ------------------------------ */
    11181118
    1119 #if PLATFORM(X86) || PLATFORM(X86_64)
     1119#if CPU(X86) || CPU(X86_64)
    11201120
    11211121void JIT::emit_op_mod(Instruction* currentInstruction)
     
    11791179}
    11801180
    1181 #else // PLATFORM(X86) || PLATFORM(X86_64)
     1181#else // CPU(X86) || CPU(X86_64)
    11821182
    11831183void JIT::emit_op_mod(Instruction* currentInstruction)
     
    11971197}
    11981198
    1199 #endif // PLATFORM(X86) || PLATFORM(X86_64)
     1199#endif // CPU(X86) || CPU(X86_64)
    12001200
    12011201/* ------------------------------ END: OP_MOD ------------------------------ */
     
    20822082/* ------------------------------ BEGIN: OP_MOD ------------------------------ */
    20832083
    2084 #if PLATFORM(X86) || PLATFORM(X86_64)
     2084#if CPU(X86) || CPU(X86_64)
    20852085
    20862086void JIT::emit_op_mod(Instruction* currentInstruction)
     
    21312131}
    21322132
    2133 #else // PLATFORM(X86) || PLATFORM(X86_64)
     2133#else // CPU(X86) || CPU(X86_64)
    21342134
    21352135void JIT::emit_op_mod(Instruction* currentInstruction)
     
    21502150}
    21512151
    2152 #endif // PLATFORM(X86) || PLATFORM(X86_64)
     2152#endif // CPU(X86) || CPU(X86_64)
    21532153
    21542154/* ------------------------------ END: OP_MOD ------------------------------ */
  • trunk/JavaScriptCore/jit/JITInlineMethods.h

    r50599 r52729  
    116116ALWAYS_INLINE void JIT::beginUninterruptedSequence(int insnSpace, int constSpace)
    117117{
    118 #if PLATFORM(ARM_TRADITIONAL)
     118#if CPU(ARM_TRADITIONAL)
    119119#ifndef NDEBUG
    120120    // Ensure the label after the sequence can also fit
     
    145145#endif
    146146
    147 #if PLATFORM(ARM)
     147#if CPU(ARM)
    148148
    149149ALWAYS_INLINE void JIT::preserveReturnAddressAfterCall(RegisterID reg)
     
    162162}
    163163
    164 #else // PLATFORM(X86) || PLATFORM(X86_64)
     164#else // CPU(X86) || CPU(X86_64)
    165165
    166166ALWAYS_INLINE void JIT::preserveReturnAddressAfterCall(RegisterID reg)
     
    195195ALWAYS_INLINE void JIT::restoreArgumentReferenceForTrampoline()
    196196{
    197 #if PLATFORM(X86)
     197#if CPU(X86)
    198198    // Within a trampoline the return address will be on the stack at this point.
    199199    addPtr(Imm32(sizeof(void*)), stackPointerRegister, firstArgumentRegister);
    200 #elif PLATFORM(ARM)
     200#elif CPU(ARM)
    201201    move(stackPointerRegister, firstArgumentRegister);
    202202#endif
     
    266266ALWAYS_INLINE void JIT::emitCount(AbstractSamplingCounter& counter, uint32_t count)
    267267{
    268 #if PLATFORM(X86_64) // Or any other 64-bit plattform.
     268#if CPU(X86_64) // Or any other 64-bit plattform.
    269269    addPtr(Imm32(count), AbsoluteAddress(&counter.m_counter));
    270 #elif PLATFORM(X86) // Or any other little-endian 32-bit plattform.
     270#elif CPU(X86) // Or any other little-endian 32-bit plattform.
    271271    intptr_t hiWord = reinterpret_cast<intptr_t>(&counter.m_counter) + sizeof(int32_t);
    272272    add32(Imm32(count), AbsoluteAddress(&counter.m_counter));
     
    279279
    280280#if ENABLE(OPCODE_SAMPLING)
    281 #if PLATFORM(X86_64)
     281#if CPU(X86_64)
    282282ALWAYS_INLINE void JIT::sampleInstruction(Instruction* instruction, bool inHostFunction)
    283283{
     
    294294
    295295#if ENABLE(CODEBLOCK_SAMPLING)
    296 #if PLATFORM(X86_64)
     296#if CPU(X86_64)
    297297ALWAYS_INLINE void JIT::sampleCodeBlock(CodeBlock* codeBlock)
    298298{
  • trunk/JavaScriptCore/jit/JITOpcodes.cpp

    r52051 r52729  
    138138    jump(regT0);
    139139
    140 #if PLATFORM(X86) || PLATFORM(ARM_TRADITIONAL)
     140#if CPU(X86) || CPU(ARM_TRADITIONAL)
    141141    Label nativeCallThunk = align();
    142142    preserveReturnAddressAfterCall(regT0);
     
    149149    emitPutToCallFrameHeader(regT1, RegisterFile::ScopeChain);
    150150   
    151 #if PLATFORM(X86)
     151#if CPU(X86)
    152152    emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT0);
    153153
     
    249249    addPtr(Imm32(NativeCallFrameSize - sizeof(NativeFunctionCalleeSignature)), stackPointerRegister);
    250250
    251 #elif PLATFORM(ARM_TRADITIONAL)
     251#elif CPU(ARM_TRADITIONAL)
    252252    emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT0);
    253253
     
    16021602   
    16031603
    1604 #if PLATFORM(X86_64)
     1604#if CPU(X86_64)
    16051605    emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, X86Registers::ecx);
    16061606
     
    16381638   
    16391639    addPtr(Imm32(sizeof(ArgList)), stackPointerRegister);
    1640 #elif PLATFORM(X86)
     1640#elif CPU(X86)
    16411641    emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT0);
    16421642
     
    17301730    addPtr(Imm32(NativeCallFrameSize - sizeof(NativeFunctionCalleeSignature)), stackPointerRegister);
    17311731
    1732 #elif PLATFORM(ARM)
     1732#elif CPU(ARM)
    17331733    emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT0);
    17341734
  • trunk/JavaScriptCore/jit/JITPropertyAccess.cpp

    r50982 r52729  
    731731    // Check the prototype object's Structure had not changed.
    732732    Structure** prototypeStructureAddress = &(protoObject->m_structure);
    733 #if PLATFORM(X86_64)
     733#if CPU(X86_64)
    734734    move(ImmPtr(prototypeStructure), regT3);
    735735    Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3);
     
    811811    // Check the prototype object's Structure had not changed.
    812812    Structure** prototypeStructureAddress = &(protoObject->m_structure);
    813 #if PLATFORM(X86_64)
     813#if CPU(X86_64)
    814814    move(ImmPtr(prototypeStructure), regT3);
    815815    Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3);
     
    864864        // Check the prototype object's Structure had not changed.
    865865        Structure** prototypeStructureAddress = &(protoObject->m_structure);
    866 #if PLATFORM(X86_64)
     866#if CPU(X86_64)
    867867        move(ImmPtr(currStructure), regT3);
    868868        bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3));
     
    919919        // Check the prototype object's Structure had not changed.
    920920        Structure** prototypeStructureAddress = &(protoObject->m_structure);
    921 #if PLATFORM(X86_64)
     921#if CPU(X86_64)
    922922        move(ImmPtr(currStructure), regT3);
    923923        bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3));
     
    16771677    // Check the prototype object's Structure had not changed.
    16781678    Structure** prototypeStructureAddress = &(protoObject->m_structure);
    1679 #if PLATFORM(X86_64)
     1679#if CPU(X86_64)
    16801680    move(ImmPtr(prototypeStructure), regT3);
    16811681    Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3);
     
    17521752    // Check the prototype object's Structure had not changed.
    17531753    Structure** prototypeStructureAddress = &(protoObject->m_structure);
    1754 #if PLATFORM(X86_64)
     1754#if CPU(X86_64)
    17551755    move(ImmPtr(prototypeStructure), regT3);
    17561756    Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3);
     
    18051805        // Check the prototype object's Structure had not changed.
    18061806        Structure** prototypeStructureAddress = &(protoObject->m_structure);
    1807 #if PLATFORM(X86_64)
     1807#if CPU(X86_64)
    18081808        move(ImmPtr(currStructure), regT3);
    18091809        bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3));
     
    18581858        // Check the prototype object's Structure had not changed.
    18591859        Structure** prototypeStructureAddress = &(protoObject->m_structure);
    1860 #if PLATFORM(X86_64)
     1860#if CPU(X86_64)
    18611861        move(ImmPtr(currStructure), regT3);
    18621862        bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3));
  • trunk/JavaScriptCore/jit/JITStubs.cpp

    r52026 r52729  
    7777#endif
    7878
    79 #if PLATFORM(LINUX) && PLATFORM(X86_64)
     79#if PLATFORM(LINUX) && CPU(X86_64)
    8080#define SYMBOL_STRING_RELOCATION(name) #name "@plt"
    8181#else
     
    8989    // IBM's own file format
    9090#define HIDE_SYMBOL(name) ".lglobl " #name
    91 #elif PLATFORM(LINUX) || PLATFORM(FREEBSD) || PLATFORM(OPENBSD) || PLATFORM(SOLARIS) || (PLATFORM(HPUX) && PLATFORM(IA64)) || PLATFORM(SYMBIAN) || PLATFORM(NETBSD)
     91#elif PLATFORM(LINUX) || PLATFORM(FREEBSD) || PLATFORM(OPENBSD) || PLATFORM(SOLARIS) || (PLATFORM(HPUX) && CPU(IA64)) || PLATFORM(SYMBIAN) || PLATFORM(NETBSD)
    9292    // ELF platform
    9393#define HIDE_SYMBOL(name) ".hidden " #name
     
    9898#if USE(JSVALUE32_64)
    9999
    100 #if COMPILER(GCC) && PLATFORM(X86)
     100#if COMPILER(GCC) && CPU(X86)
    101101
    102102// These ASSERTs remind you that, if you change the layout of JITStackFrame, you
     
    157157);
    158158   
    159 #elif COMPILER(GCC) && PLATFORM(X86_64)
     159#elif COMPILER(GCC) && CPU(X86_64)
    160160
    161161#if USE(JIT_STUB_ARGUMENT_VA_LIST)
     
    227227);
    228228
    229 #elif COMPILER(GCC) && PLATFORM(ARM_THUMB2)
     229#elif COMPILER(GCC) && CPU(ARM_THUMB2)
    230230
    231231#if USE(JIT_STUB_ARGUMENT_VA_LIST)
     
    293293);
    294294
    295 #elif COMPILER(GCC) && PLATFORM(ARM_TRADITIONAL)
     295#elif COMPILER(GCC) && CPU(ARM_TRADITIONAL)
    296296
    297297asm volatile (
     
    391391}
    392392
    393 #endif // COMPILER(GCC) && PLATFORM(X86)
     393#endif // COMPILER(GCC) && CPU(X86)
    394394
    395395#else // USE(JSVALUE32_64)
    396396
    397 #if COMPILER(GCC) && PLATFORM(X86)
     397#if COMPILER(GCC) && CPU(X86)
    398398
    399399// These ASSERTs remind you that, if you change the layout of JITStackFrame, you
     
    453453);
    454454   
    455 #elif COMPILER(GCC) && PLATFORM(X86_64)
     455#elif COMPILER(GCC) && CPU(X86_64)
    456456
    457457#if USE(JIT_STUB_ARGUMENT_VA_LIST)
     
    530530);
    531531
    532 #elif COMPILER(GCC) && PLATFORM(ARM_THUMB2)
     532#elif COMPILER(GCC) && CPU(ARM_THUMB2)
    533533
    534534#if USE(JIT_STUB_ARGUMENT_VA_LIST)
     
    597597);
    598598
    599 #elif COMPILER(GCC) && PLATFORM(ARM_TRADITIONAL)
     599#elif COMPILER(GCC) && CPU(ARM_TRADITIONAL)
    600600
    601601asm volatile (
     
    697697}
    698698
    699 #endif // COMPILER(GCC) && PLATFORM(X86)
     699#endif // COMPILER(GCC) && CPU(X86)
    700700
    701701#endif // USE(JSVALUE32_64)
     
    711711    JIT::compileCTIMachineTrampolines(globalData, &m_executablePool, &m_ctiStringLengthTrampoline, &m_ctiVirtualCallLink, &m_ctiVirtualCall, &m_ctiNativeCallThunk);
    712712
    713 #if PLATFORM(ARM_THUMB2)
     713#if CPU(ARM_THUMB2)
    714714    // Unfortunate the arm compiler does not like the use of offsetof on JITStackFrame (since it contains non POD types),
    715715    // and the OBJECT_OFFSETOF macro does not appear constantish enough for it to be happy with its use in COMPILE_ASSERT
     
    958958    } while (0)
    959959
    960 #if PLATFORM(ARM_THUMB2)
     960#if CPU(ARM_THUMB2)
    961961
    962962#define DEFINE_STUB_FUNCTION(rtype, op) \
     
    979979    rtype JITStubThunked_##op(STUB_ARGS_DECLARATION) \
    980980
    981 #elif PLATFORM(ARM_TRADITIONAL) && COMPILER(GCC)
     981#elif CPU(ARM_TRADITIONAL) && COMPILER(GCC)
    982982
    983983#if USE(JSVALUE32_64)
  • trunk/JavaScriptCore/jit/JITStubs.h

    r51735 r52729  
    7676    };
    7777
    78 #if PLATFORM(X86_64)
     78#if CPU(X86_64)
    7979    struct JITStackFrame {
    8080        void* reserved; // Unused
     
    100100        ReturnAddressPtr* returnAddressSlot() { return reinterpret_cast<ReturnAddressPtr*>(this) - 1; }
    101101    };
    102 #elif PLATFORM(X86)
     102#elif CPU(X86)
    103103#if COMPILER(MSVC)
    104104#pragma pack(push)
     
    131131#pragma pack(pop)
    132132#endif // COMPILER(MSVC)
    133 #elif PLATFORM(ARM_THUMB2)
     133#elif CPU(ARM_THUMB2)
    134134    struct JITStackFrame {
    135135        void* reserved; // Unused
     
    159159        ReturnAddressPtr* returnAddressSlot() { return &thunkReturnAddress; }
    160160    };
    161 #elif PLATFORM(ARM_TRADITIONAL)
     161#elif CPU(ARM_TRADITIONAL)
    162162    struct JITStackFrame {
    163163        JITStubArg padding; // Unused
     
    203203    #define STUB_ARGS (args)
    204204
    205     #if PLATFORM(X86) && COMPILER(MSVC)
     205    #if CPU(X86) && COMPILER(MSVC)
    206206    #define JIT_STUB __fastcall
    207     #elif PLATFORM(X86) && COMPILER(GCC)
     207    #elif CPU(X86) && COMPILER(GCC)
    208208    #define JIT_STUB  __attribute__ ((fastcall))
    209209    #else
     
    212212#endif
    213213
    214 #if PLATFORM(X86_64)
     214#if CPU(X86_64)
    215215    struct VoidPtrPair {
    216216        void* first;
  • trunk/JavaScriptCore/runtime/Collector.cpp

    r52176 r52729  
    540540    pthread_t thread = pthread_self();
    541541    return pthread_get_stackaddr_np(thread);
    542 #elif PLATFORM(WIN_OS) && PLATFORM(X86) && COMPILER(MSVC)
     542#elif PLATFORM(WIN_OS) && CPU(X86) && COMPILER(MSVC)
    543543    // offset 0x18 from the FS segment register gives a pointer to
    544544    // the thread information block for the current thread
     
    549549    }
    550550    return static_cast<void*>(pTib->StackBase);
    551 #elif PLATFORM(WIN_OS) && PLATFORM(X86_64) && COMPILER(MSVC)
     551#elif PLATFORM(WIN_OS) && CPU(X86_64) && COMPILER(MSVC)
    552552    PNT_TIB64 pTib = reinterpret_cast<PNT_TIB64>(NtCurrentTeb());
    553553    return reinterpret_cast<void*>(pTib->StackBase);
    554 #elif PLATFORM(WIN_OS) && PLATFORM(X86) && COMPILER(GCC)
     554#elif PLATFORM(WIN_OS) && CPU(X86) && COMPILER(GCC)
    555555    // offset 0x18 from the FS segment register gives a pointer to
    556556    // the thread information block for the current thread
     
    824824#if PLATFORM(DARWIN)
    825825
    826 #if PLATFORM(X86)
     826#if CPU(X86)
    827827typedef i386_thread_state_t PlatformThreadRegisters;
    828 #elif PLATFORM(X86_64)
     828#elif CPU(X86_64)
    829829typedef x86_thread_state64_t PlatformThreadRegisters;
    830 #elif PLATFORM(PPC)
     830#elif CPU(PPC)
    831831typedef ppc_thread_state_t PlatformThreadRegisters;
    832 #elif PLATFORM(PPC64)
     832#elif CPU(PPC64)
    833833typedef ppc_thread_state64_t PlatformThreadRegisters;
    834 #elif PLATFORM(ARM)
     834#elif CPU(ARM)
    835835typedef arm_thread_state_t PlatformThreadRegisters;
    836836#else
     
    838838#endif
    839839
    840 #elif PLATFORM(WIN_OS)&& PLATFORM(X86)
     840#elif PLATFORM(WIN_OS)&& CPU(X86)
    841841typedef CONTEXT PlatformThreadRegisters;
    842842#else
     
    848848#if PLATFORM(DARWIN)
    849849
    850 #if PLATFORM(X86)
     850#if CPU(X86)
    851851    unsigned user_count = sizeof(regs)/sizeof(int);
    852852    thread_state_flavor_t flavor = i386_THREAD_STATE;
    853 #elif PLATFORM(X86_64)
     853#elif CPU(X86_64)
    854854    unsigned user_count = x86_THREAD_STATE64_COUNT;
    855855    thread_state_flavor_t flavor = x86_THREAD_STATE64;
    856 #elif PLATFORM(PPC)
     856#elif CPU(PPC)
    857857    unsigned user_count = PPC_THREAD_STATE_COUNT;
    858858    thread_state_flavor_t flavor = PPC_THREAD_STATE;
    859 #elif PLATFORM(PPC64)
     859#elif CPU(PPC64)
    860860    unsigned user_count = PPC_THREAD_STATE64_COUNT;
    861861    thread_state_flavor_t flavor = PPC_THREAD_STATE64;
    862 #elif PLATFORM(ARM)
     862#elif CPU(ARM)
    863863    unsigned user_count = ARM_THREAD_STATE_COUNT;
    864864    thread_state_flavor_t flavor = ARM_THREAD_STATE;
     
    876876// end PLATFORM(DARWIN)
    877877
    878 #elif PLATFORM(WIN_OS) && PLATFORM(X86)
     878#elif PLATFORM(WIN_OS) && CPU(X86)
    879879    regs.ContextFlags = CONTEXT_INTEGER | CONTEXT_CONTROL | CONTEXT_SEGMENTS;
    880880    GetThreadContext(platformThread, &regs);
     
    891891#if __DARWIN_UNIX03
    892892
    893 #if PLATFORM(X86)
     893#if CPU(X86)
    894894    return reinterpret_cast<void*>(regs.__esp);
    895 #elif PLATFORM(X86_64)
     895#elif CPU(X86_64)
    896896    return reinterpret_cast<void*>(regs.__rsp);
    897 #elif PLATFORM(PPC) || PLATFORM(PPC64)
     897#elif CPU(PPC) || CPU(PPC64)
    898898    return reinterpret_cast<void*>(regs.__r1);
    899 #elif PLATFORM(ARM)
     899#elif CPU(ARM)
    900900    return reinterpret_cast<void*>(regs.__sp);
    901901#else
     
    905905#else // !__DARWIN_UNIX03
    906906
    907 #if PLATFORM(X86)
     907#if CPU(X86)
    908908    return reinterpret_cast<void*>(regs.esp);
    909 #elif PLATFORM(X86_64)
     909#elif CPU(X86_64)
    910910    return reinterpret_cast<void*>(regs.rsp);
    911 #elif (PLATFORM(PPC) || PLATFORM(PPC64))
     911#elif CPU(PPC) || CPU(PPC64)
    912912    return reinterpret_cast<void*>(regs.r1);
    913913#else
     
    918918
    919919// end PLATFORM(DARWIN)
    920 #elif PLATFORM(X86) && PLATFORM(WIN_OS)
     920#elif CPU(X86) && PLATFORM(WIN_OS)
    921921    return reinterpret_cast<void*>((uintptr_t) regs.Esp);
    922922#else
  • trunk/JavaScriptCore/wrec/WREC.h

    r38857 r52729  
    3333#include <wtf/unicode/Unicode.h>
    3434
    35 #if COMPILER(GCC) && PLATFORM(X86)
     35#if COMPILER(GCC) && CPU(X86)
    3636#define WREC_CALL __attribute__ ((regparm (3)))
    3737#else
  • trunk/JavaScriptCore/wrec/WRECGenerator.cpp

    r47530 r52729  
    4141void Generator::generateEnter()
    4242{
    43 #if PLATFORM(X86)
     43#if CPU(X86)
    4444    // On x86 edi & esi are callee preserved registers.
    4545    push(X86Registers::edi);
     
    7272   
    7373    // Restore callee save registers.
    74 #if PLATFORM(X86)
     74#if CPU(X86)
    7575    pop(X86Registers::esi);
    7676    pop(X86Registers::edi);
     
    111111    move(Imm32(-1), returnRegister);
    112112
    113 #if PLATFORM(X86)
     113#if CPU(X86)
    114114    pop(X86Registers::esi);
    115115    pop(X86Registers::edi);
  • trunk/JavaScriptCore/wrec/WRECGenerator.h

    r47530 r52729  
    6363        }
    6464
    65 #if PLATFORM(X86)
     65#if CPU(X86)
    6666        static const RegisterID input = X86Registers::eax;
    6767        static const RegisterID index = X86Registers::edx;
     
    7474        static const RegisterID returnRegister = X86Registers::eax;
    7575#endif
    76 #if PLATFORM(X86_64)
     76#if CPU(X86_64)
    7777        static const RegisterID input = X86Registers::edi;
    7878        static const RegisterID index = X86Registers::esi;
  • trunk/JavaScriptCore/wtf/FastMalloc.cpp

    r49022 r52729  
    11731173
    11741174#if defined(WTF_CHANGES)
    1175 #if PLATFORM(X86_64)
     1175#if CPU(X86_64)
    11761176// On all known X86-64 platforms, the upper 16 bits are always unused and therefore
    11771177// can be excluded from the PageMap key.
  • trunk/JavaScriptCore/wtf/Platform.h

    r52711 r52729  
    9090
    9191
     92
     93/* ==== CPU() - the target CPU architecture ==== */
     94
     95/* This also defines CPU(BIG_ENDIAN) or CPU(MIDDLE_ENDIAN) or neither, as appropriate. */
     96
     97
     98/* CPU(ALPHA) - DEC Alpha */
     99#if defined(__alpha__)
     100#define WTF_CPU_ALPHA 1
     101#endif
     102
     103/* CPU(IA64) - Itanium / IA-64 */
     104#if defined(__ia64__)
     105#define WTF_CPU_IA64 1
     106#endif
     107
     108/* CPU(PPC) - PowerPC 32-bit */
     109#if   defined(__ppc__)     \
     110   || defined(__PPC__)     \
     111   || defined(__powerpc__) \
     112   || defined(__powerpc)   \
     113   || defined(__POWERPC__) \
     114   || defined(_M_PPC)      \
     115   || defined(__PPC)
     116#define WTF_CPU_PPC 1
     117#define WTF_CPU_BIG_ENDIAN 1
     118#endif
     119
     120/* CPU(PPC64) - PowerPC 64-bit */
     121#if   defined(__ppc64__) \
     122   || defined(__PPC64__)
     123#define WTF_CPU_PPC64 1
     124#define WTF_CPU_BIG_ENDIAN 1
     125#endif
     126
     127/* CPU(SH4) - SuperH SH-4 */
     128#if defined(__SH4__)
     129#define WTF_CPU_SH4 1
     130#endif
     131
     132/* CPU(SPARC32) - SPARC 32-bit */
     133#if defined(__sparc) && !defined(__arch64__) || defined(__sparcv8)
     134#define WTF_CPU_SPARC32 1
     135#define WTF_CPU_BIG_ENDIAN 1
     136#endif
     137
     138/* CPU(SPARC64) - SPARC 64-bit */
     139#if defined(__sparc__) && defined(__arch64__) || defined (__sparcv9)
     140#define WTF_CPU_SPARC64 1
     141#define WTF_CPU_BIG_ENDIAN 1
     142#endif
     143
     144/* CPU(SPARC) - any SPARC, true for CPU(SPARC32) and CPU(SPARC64) */
     145#if CPU(SPARC32) || CPU(SPARC64)
     146#define WTF_CPU_SPARC
     147#endif
     148
     149/* CPU(X86) - i386 / x86 32-bit */
     150#if   defined(__i386__) \
     151   || defined(i386)     \
     152   || defined(_M_IX86)  \
     153   || defined(_X86_)    \
     154   || defined(__THW_INTEL)
     155#define WTF_CPU_X86 1
     156#endif
     157
     158/* CPU(X86_64) - AMD64 / Intel64 / x86_64 64-bit */
     159#if   defined(__x86_64__) \
     160   || defined(_M_X64)
     161#define WTF_CPU_X86_64 1
     162#endif
     163
     164/* CPU(ARM) - ARM, any version*/
     165#if   defined(arm) \
     166   || defined(__arm__)
     167#define WTF_CPU_ARM 1
     168
     169#if defined(__ARMEB__)
     170#define WTF_CPU_BIG_ENDIAN 1
     171
     172#elif !defined(__ARM_EABI__) \
     173   && !defined(__EABI__) \
     174   && !defined(__VFP_FP__) \
     175   && !defined(ANDROID)
     176#define WTF_CPU_MIDDLE_ENDIAN 1
     177
     178#endif
     179
     180#define WTF_ARM_ARCH_AT_LEAST(N) (CPU(ARM) && WTF_ARM_ARCH_VERSION >= N)
     181
     182/* Set WTF_ARM_ARCH_VERSION */
     183#if   defined(__ARM_ARCH_4__) \
     184   || defined(__ARM_ARCH_4T__) \
     185   || defined(__MARM_ARMV4__) \
     186   || defined(_ARMV4I_)
     187#define WTF_ARM_ARCH_VERSION 4
     188
     189#elif defined(__ARM_ARCH_5__) \
     190   || defined(__ARM_ARCH_5T__) \
     191   || defined(__ARM_ARCH_5E__) \
     192   || defined(__ARM_ARCH_5TE__) \
     193   || defined(__ARM_ARCH_5TEJ__) \
     194   || defined(__MARM_ARMV5__)
     195#define WTF_ARM_ARCH_VERSION 5
     196
     197#elif defined(__ARM_ARCH_6__) \
     198   || defined(__ARM_ARCH_6J__) \
     199   || defined(__ARM_ARCH_6K__) \
     200   || defined(__ARM_ARCH_6Z__) \
     201   || defined(__ARM_ARCH_6ZK__) \
     202   || defined(__ARM_ARCH_6T2__) \
     203   || defined(__ARMV6__)
     204#define WTF_ARM_ARCH_VERSION 6
     205
     206#elif defined(__ARM_ARCH_7A__) \
     207   || defined(__ARM_ARCH_7R__)
     208#define WTF_ARM_ARCH_VERSION 7
     209
     210/* RVCT sets _TARGET_ARCH_ARM */
     211#elif defined(__TARGET_ARCH_ARM)
     212#define WTF_ARM_ARCH_VERSION __TARGET_ARCH_ARM
     213
     214#else
     215#define WTF_ARM_ARCH_VERSION 0
     216
     217#endif
     218
     219/* Set WTF_THUMB_ARCH_VERSION */
     220#if   defined(__ARM_ARCH_4T__)
     221#define WTF_THUMB_ARCH_VERSION 1
     222
     223#elif defined(__ARM_ARCH_5T__) \
     224   || defined(__ARM_ARCH_5TE__) \
     225   || defined(__ARM_ARCH_5TEJ__)
     226#define WTF_THUMB_ARCH_VERSION 2
     227
     228#elif defined(__ARM_ARCH_6J__) \
     229   || defined(__ARM_ARCH_6K__) \
     230   || defined(__ARM_ARCH_6Z__) \
     231   || defined(__ARM_ARCH_6ZK__) \
     232   || defined(__ARM_ARCH_6M__)
     233#define WTF_THUMB_ARCH_VERSION 3
     234
     235#elif defined(__ARM_ARCH_6T2__) \
     236   || defined(__ARM_ARCH_7__) \
     237   || defined(__ARM_ARCH_7A__) \
     238   || defined(__ARM_ARCH_7R__) \
     239   || defined(__ARM_ARCH_7M__)
     240#define WTF_THUMB_ARCH_VERSION 4
     241
     242/* RVCT sets __TARGET_ARCH_THUMB */
     243#elif defined(__TARGET_ARCH_THUMB)
     244#define WTF_THUMB_ARCH_VERSION __TARGET_ARCH_THUMB
     245
     246#else
     247#define WTF_THUMB_ARCH_VERSION 0
     248#endif
     249
     250
     251/* CPU(ARMV5_OR_LOWER) - ARM instruction set v5 or earlier */
     252/* On ARMv5 and below the natural alignment is required.
     253   And there are some other differences for v5 or earlier. */
     254#if !defined(ARMV5_OR_LOWER) && !CPU_ARM_ARCH_AT_LEAST(6)
     255#define WTF_CPU_ARMV5_OR_LOWER 1
     256#endif
     257
     258
     259/* CPU(ARM_TRADITIONAL) - Thumb2 is not available, only traditional ARM (v4 or greater) */
     260/* CPU(ARM_THUMB2) - Thumb2 instruction set is available */
     261/* Only one of these will be defined. */
     262#if !defined(WTF_CPU_ARM_TRADITIONAL) && !defined(WTF_CPU_ARM_THUMB2)
     263#  if defined(thumb2) || defined(__thumb2__) \
     264  || ((defined(__thumb) || defined(__thumb__)) && WTF_THUMB_ARCH_VERSION == 4)
     265#    define WTF_CPU_ARM_TRADITIONAL 0
     266#    define WTF_CPU_ARM_THUMB2 1
     267#  elif WTF_ARM_ARCH_AT_LEAST(4)
     268#    define WTF_CPU_ARM_TRADITIONAL 1
     269#    define WTF_CPU_ARM_THUMB2 0
     270#  else
     271#    error "Not supported ARM architecture"
     272#  endif
     273#elif CPU(ARM_TRADITIONAL) && CPU(ARM_THUMB2) /* Sanity Check */
     274#  error "Cannot use both of WTF_CPU_ARM_TRADITIONAL and WTF_CPU_ARM_THUMB2 platforms"
     275#endif // !defined(WTF_CPU_ARM_TRADITIONAL) && !defined(WTF_CPU_ARM_THUMB2)
     276
     277#endif /* ARM */
     278
     279
     280
    92281/* Operating systems - low-level dependencies */
    93282
     
    270459#endif
    271460
    272 /* CPU */
    273 
    274 /* PLATFORM(PPC) */
    275 #if   defined(__ppc__)     \
    276    || defined(__PPC__)     \
    277    || defined(__powerpc__) \
    278    || defined(__powerpc)   \
    279    || defined(__POWERPC__) \
    280    || defined(_M_PPC)      \
    281    || defined(__PPC)
    282 #define WTF_PLATFORM_PPC 1
    283 #define WTF_PLATFORM_BIG_ENDIAN 1
    284 #endif
    285 
    286 /* PLATFORM(SPARC32) */
    287 #if defined(__sparc) && !defined(__arch64__) || defined(__sparcv8)
    288 #define WTF_PLATFORM_SPARC32 1
    289 #define WTF_PLATFORM_BIG_ENDIAN 1
    290 #endif
    291 
    292 #if PLATFORM(SPARC32) || PLATFORM(SPARC64)
    293 #define WTF_PLATFORM_SPARC
    294 #endif
    295 
    296 /* PLATFORM(PPC64) */
    297 #if   defined(__ppc64__) \
    298    || defined(__PPC64__)
    299 #define WTF_PLATFORM_PPC64 1
    300 #define WTF_PLATFORM_BIG_ENDIAN 1
    301 #endif
    302 
    303 /* PLATFORM(ARM) */
    304 #define PLATFORM_ARM_ARCH(N) (PLATFORM(ARM) && ARM_ARCH_VERSION >= N)
    305 
    306 #if   defined(arm) \
    307    || defined(__arm__)
    308 #define WTF_PLATFORM_ARM 1
    309 
    310 #if defined(__ARMEB__)
    311 #define WTF_PLATFORM_BIG_ENDIAN 1
    312 
    313 #elif !defined(__ARM_EABI__) \
    314    && !defined(__EABI__) \
    315    && !defined(__VFP_FP__) \
    316    && !defined(ANDROID)
    317 #define WTF_PLATFORM_MIDDLE_ENDIAN 1
    318 
    319 #endif
    320 
    321 /* Set ARM_ARCH_VERSION */
    322 #if   defined(__ARM_ARCH_4__) \
    323    || defined(__ARM_ARCH_4T__) \
    324    || defined(__MARM_ARMV4__) \
    325    || defined(_ARMV4I_)
    326 #define ARM_ARCH_VERSION 4
    327 
    328 #elif defined(__ARM_ARCH_5__) \
    329    || defined(__ARM_ARCH_5T__) \
    330    || defined(__ARM_ARCH_5E__) \
    331    || defined(__ARM_ARCH_5TE__) \
    332    || defined(__ARM_ARCH_5TEJ__) \
    333    || defined(__MARM_ARMV5__)
    334 #define ARM_ARCH_VERSION 5
    335 
    336 #elif defined(__ARM_ARCH_6__) \
    337    || defined(__ARM_ARCH_6J__) \
    338    || defined(__ARM_ARCH_6K__) \
    339    || defined(__ARM_ARCH_6Z__) \
    340    || defined(__ARM_ARCH_6ZK__) \
    341    || defined(__ARM_ARCH_6T2__) \
    342    || defined(__ARMV6__)
    343 #define ARM_ARCH_VERSION 6
    344 
    345 #elif defined(__ARM_ARCH_7A__) \
    346    || defined(__ARM_ARCH_7R__)
    347 #define ARM_ARCH_VERSION 7
    348 
    349 /* RVCT sets _TARGET_ARCH_ARM */
    350 #elif defined(__TARGET_ARCH_ARM)
    351 #define ARM_ARCH_VERSION __TARGET_ARCH_ARM
    352 
    353 #else
    354 #define ARM_ARCH_VERSION 0
    355 
    356 #endif
    357 
    358 /* Set THUMB_ARM_VERSION */
    359 #if   defined(__ARM_ARCH_4T__)
    360 #define THUMB_ARCH_VERSION 1
    361 
    362 #elif defined(__ARM_ARCH_5T__) \
    363    || defined(__ARM_ARCH_5TE__) \
    364    || defined(__ARM_ARCH_5TEJ__)
    365 #define THUMB_ARCH_VERSION 2
    366 
    367 #elif defined(__ARM_ARCH_6J__) \
    368    || defined(__ARM_ARCH_6K__) \
    369    || defined(__ARM_ARCH_6Z__) \
    370    || defined(__ARM_ARCH_6ZK__) \
    371    || defined(__ARM_ARCH_6M__)
    372 #define THUMB_ARCH_VERSION 3
    373 
    374 #elif defined(__ARM_ARCH_6T2__) \
    375    || defined(__ARM_ARCH_7__) \
    376    || defined(__ARM_ARCH_7A__) \
    377    || defined(__ARM_ARCH_7R__) \
    378    || defined(__ARM_ARCH_7M__)
    379 #define THUMB_ARCH_VERSION 4
    380 
    381 /* RVCT sets __TARGET_ARCH_THUMB */
    382 #elif defined(__TARGET_ARCH_THUMB)
    383 #define THUMB_ARCH_VERSION __TARGET_ARCH_THUMB
    384 
    385 #else
    386 #define THUMB_ARCH_VERSION 0
    387 #endif
    388 
    389 /* On ARMv5 and below the natural alignment is required. */
    390 #if !defined(ARM_REQUIRE_NATURAL_ALIGNMENT) && ARM_ARCH_VERSION <= 5
    391 #define ARM_REQUIRE_NATURAL_ALIGNMENT 1
    392 #endif
    393 
    394 /* Defines two pseudo-platforms for ARM and Thumb-2 instruction set. */
    395 #if !defined(WTF_PLATFORM_ARM_TRADITIONAL) && !defined(WTF_PLATFORM_ARM_THUMB2)
    396 #  if defined(thumb2) || defined(__thumb2__) \
    397   || ((defined(__thumb) || defined(__thumb__)) && THUMB_ARCH_VERSION == 4)
    398 #    define WTF_PLATFORM_ARM_TRADITIONAL 0
    399 #    define WTF_PLATFORM_ARM_THUMB2 1
    400 #  elif PLATFORM_ARM_ARCH(4)
    401 #    define WTF_PLATFORM_ARM_TRADITIONAL 1
    402 #    define WTF_PLATFORM_ARM_THUMB2 0
    403 #  else
    404 #    error "Not supported ARM architecture"
    405 #  endif
    406 #elif PLATFORM(ARM_TRADITIONAL) && PLATFORM(ARM_THUMB2) /* Sanity Check */
    407 #  error "Cannot use both of WTF_PLATFORM_ARM_TRADITIONAL and WTF_PLATFORM_ARM_THUMB2 platforms"
    408 #endif // !defined(ARM_TRADITIONAL) && !defined(ARM_THUMB2)
    409 #endif /* ARM */
    410 
    411 /* PLATFORM(X86) */
    412 #if   defined(__i386__) \
    413    || defined(i386)     \
    414    || defined(_M_IX86)  \
    415    || defined(_X86_)    \
    416    || defined(__THW_INTEL)
    417 #define WTF_PLATFORM_X86 1
    418 #endif
    419 
    420 /* PLATFORM(X86_64) */
    421 #if   defined(__x86_64__) \
    422    || defined(_M_X64)
    423 #define WTF_PLATFORM_X86_64 1
    424 #endif
    425 
    426 /* PLATFORM(IA64) */
    427 #if defined(__ia64__)
    428 #define WTF_PLATFORM_IA64 1
    429 #endif
    430 
    431 /* PLATFORM(ALPHA) */
    432 #if defined(__alpha__)
    433 #define WTF_PLATFORM_ALPHA 1
    434 #endif
    435 
    436 /* PLATFORM(SH4) */
    437 #if defined(__SH4__)
    438 #define WTF_PLATFORM_SH4 1
    439 #endif
    440 
    441 /* PLATFORM(SPARC64) */
    442 #if defined(__sparc__) && defined(__arch64__) || defined (__sparcv9)
    443 #define WTF_PLATFORM_SPARC64 1
    444 #define WTF_PLATFORM_BIG_ENDIAN 1
    445 #endif
    446461
    447462/* PLATFORM(WINCE) && PLATFORM(QT)
     
    511526#define WTF_USE_PTHREADS 1
    512527#define HAVE_PTHREAD_RWLOCK 1
    513 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_TIGER) && defined(__x86_64__)
     528#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_TIGER) && CPU(X86_64)
    514529#define WTF_USE_PLUGIN_HOST_PROCESS 1
    515530#endif
     
    776791
    777792#if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32) && !defined(WTF_USE_JSVALUE32_64)
    778 #if (PLATFORM(X86_64) && (PLATFORM(UNIX) || PLATFORM(WIN_OS))) || PLATFORM(IA64) || PLATFORM(ALPHA)
     793#if (CPU(X86_64) && (PLATFORM(UNIX) || PLATFORM(WIN_OS))) || CPU(IA64) || CPU(ALPHA)
    779794#define WTF_USE_JSVALUE64 1
    780 #elif PLATFORM(ARM) || PLATFORM(PPC64)
     795#elif CPU(ARM) || CPU(PPC64)
    781796#define WTF_USE_JSVALUE32 1
    782797#elif PLATFORM(WIN_OS) && COMPILER(MINGW)
     
    796811
    797812/* The JIT is tested & working on x86_64 Mac */
    798 #if PLATFORM(X86_64) && PLATFORM(MAC)
     813#if CPU(X86_64) && PLATFORM(MAC)
    799814    #define ENABLE_JIT 1
    800815/* The JIT is tested & working on x86 Mac */
    801 #elif PLATFORM(X86) && PLATFORM(MAC)
     816#elif CPU(X86) && PLATFORM(MAC)
    802817    #define ENABLE_JIT 1
    803818    #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
    804 #elif PLATFORM(ARM_THUMB2) && PLATFORM(IPHONE)
     819#elif CPU(ARM_THUMB2) && PLATFORM(IPHONE)
    805820    #define ENABLE_JIT 1
    806821/* The JIT is tested & working on x86 Windows */
    807 #elif PLATFORM(X86) && PLATFORM(WIN)
     822#elif CPU(X86) && PLATFORM(WIN)
    808823    #define ENABLE_JIT 1
    809824#endif
    810825
    811826#if PLATFORM(QT)
    812 #if PLATFORM(X86_64) && PLATFORM(DARWIN)
     827#if CPU(X86_64) && PLATFORM(DARWIN)
    813828    #define ENABLE_JIT 1
    814 #elif PLATFORM(X86) && PLATFORM(DARWIN)
     829#elif CPU(X86) && PLATFORM(DARWIN)
    815830    #define ENABLE_JIT 1
    816831    #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
    817 #elif PLATFORM(X86) && PLATFORM(WIN_OS) && COMPILER(MINGW) && GCC_VERSION >= 40100
     832#elif CPU(X86) && PLATFORM(WIN_OS) && COMPILER(MINGW) && GCC_VERSION >= 40100
    818833    #define ENABLE_JIT 1
    819834    #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
    820 #elif PLATFORM(X86) && PLATFORM(WIN_OS) && COMPILER(MSVC)
     835#elif CPU(X86) && PLATFORM(WIN_OS) && COMPILER(MSVC)
    821836    #define ENABLE_JIT 1
    822837    #define WTF_USE_JIT_STUB_ARGUMENT_REGISTER 1
    823 #elif PLATFORM(X86) && PLATFORM(LINUX) && GCC_VERSION >= 40100
     838#elif CPU(X86) && PLATFORM(LINUX) && GCC_VERSION >= 40100
    824839    #define ENABLE_JIT 1
    825840    #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
    826 #elif PLATFORM(ARM_TRADITIONAL) && PLATFORM(LINUX)
     841#elif CPU(ARM_TRADITIONAL) && PLATFORM(LINUX)
    827842    #define ENABLE_JIT 1
    828843#endif
     
    846861#endif
    847862
    848 #if PLATFORM(X86) && COMPILER(MSVC)
     863#if CPU(X86) && COMPILER(MSVC)
    849864#define JSC_HOST_CALL __fastcall
    850 #elif PLATFORM(X86) && COMPILER(GCC)
     865#elif CPU(X86) && COMPILER(GCC)
    851866#define JSC_HOST_CALL __attribute__ ((fastcall))
    852867#else
     
    868883
    869884/* YARR supports x86 & x86-64, and has been tested on Mac and Windows. */
    870 #if (PLATFORM(X86) && PLATFORM(MAC)) \
    871  || (PLATFORM(X86_64) && PLATFORM(MAC)) \
    872  || (PLATFORM(ARM_THUMB2) && PLATFORM(IPHONE)) \
    873  || (PLATFORM(X86) && PLATFORM(WIN))
     885#if (CPU(X86) && PLATFORM(MAC)) \
     886 || (CPU(X86_64) && PLATFORM(MAC)) \
     887 || (CPU(ARM_THUMB2) && PLATFORM(IPHONE)) \
     888 || (CPU(X86) && PLATFORM(WIN))
    874889#define ENABLE_YARR 1
    875890#define ENABLE_YARR_JIT 1
     
    877892
    878893#if PLATFORM(QT)
    879 #if (PLATFORM(X86) && PLATFORM(WIN_OS) && COMPILER(MINGW) && GCC_VERSION >= 40100) \
    880  || (PLATFORM(X86) && PLATFORM(WIN_OS) && COMPILER(MSVC)) \
    881  || (PLATFORM(X86) && PLATFORM(LINUX) && GCC_VERSION >= 40100) \
    882  || (PLATFORM(ARM_TRADITIONAL) && PLATFORM(LINUX))
     894#if (CPU(X86) && PLATFORM(WIN_OS) && COMPILER(MINGW) && GCC_VERSION >= 40100) \
     895 || (CPU(X86) && PLATFORM(WIN_OS) && COMPILER(MSVC)) \
     896 || (CPU(X86) && PLATFORM(LINUX) && GCC_VERSION >= 40100) \
     897 || (CPU(ARM_TRADITIONAL) && PLATFORM(LINUX))
    883898#define ENABLE_YARR 1
    884899#define ENABLE_YARR_JIT 1
  • trunk/JavaScriptCore/wtf/TCSpinLock.h

    r48731 r52729  
    3434#define TCMALLOC_INTERNAL_SPINLOCK_H__
    3535
    36 #if (PLATFORM(X86) || PLATFORM(PPC)) && (COMPILER(GCC) || COMPILER(MSVC))
     36#if (CPU(X86) || CPU(PPC)) && (COMPILER(GCC) || COMPILER(MSVC))
    3737
    3838#include <time.h>       /* For nanosleep() */
     
    6363    int r;
    6464#if COMPILER(GCC)
    65 #if PLATFORM(X86)
     65#if CPU(X86)
    6666    __asm__ __volatile__
    6767      ("xchgl %0, %1"
     
    9393  inline void Unlock() {
    9494#if COMPILER(GCC)
    95 #if PLATFORM(X86)
     95#if CPU(X86)
    9696    __asm__ __volatile__
    9797      ("movl $0, %0"
     
    104104       "eieio\n\t"
    105105       "stw %1, %0"
    106 #if PLATFORM(DARWIN) || PLATFORM(PPC)
     106#if PLATFORM(DARWIN) || CPU(PPC)
    107107       : "=o" (lockword_)
    108108#else
     
    139139    int r;
    140140#if COMPILER(GCC)
    141 #if PLATFORM(X86)
     141#if CPU(X86)
    142142    __asm__ __volatile__
    143143      ("xchgl %0, %1"
  • trunk/JavaScriptCore/wtf/Threading.h

    r51423 r52729  
    240240inline int atomicDecrement(int volatile* addend) { return android_atomic_dec(addend); }
    241241
    242 #elif COMPILER(GCC) && !PLATFORM(SPARC64) // sizeof(_Atomic_word) != sizeof(int) on sparc64 gcc
     242#elif COMPILER(GCC) && !CPU(SPARC64) // sizeof(_Atomic_word) != sizeof(int) on sparc64 gcc
    243243#define WTF_USE_LOCKFREE_THREADSAFESHARED 1
    244244
  • trunk/JavaScriptCore/wtf/dtoa.cpp

    r52162 r52729  
    160160#endif
    161161
    162 #if PLATFORM(BIG_ENDIAN)
     162#if CPU(BIG_ENDIAN)
    163163#define IEEE_MC68k
    164 #elif PLATFORM(MIDDLE_ENDIAN)
     164#elif CPU(MIDDLE_ENDIAN)
    165165#define IEEE_ARM
    166166#else
     
    263263#endif
    264264
    265 #if PLATFORM(PPC64) || PLATFORM(X86_64)
     265#if CPU(PPC64) || CPU(X86_64)
     266// FIXME: should we enable this on all 64-bit CPUs?
    266267// 64-bit emulation provided by the compiler is likely to be slower than dtoa own code on 32-bit hardware.
    267268#define USE_LONG_LONG
  • trunk/JavaScriptCore/yarr/RegexJIT.cpp

    r50143 r52729  
    4545    friend void jitCompileRegex(JSGlobalData* globalData, RegexCodeBlock& jitObject, const UString& pattern, unsigned& numSubpatterns, const char*& error, bool ignoreCase, bool multiline);
    4646
    47 #if PLATFORM(ARM)
     47#if CPU(ARM)
    4848    static const RegisterID input = ARMRegisters::r0;
    4949    static const RegisterID index = ARMRegisters::r1;
     
    5555
    5656    static const RegisterID returnRegister = ARMRegisters::r0;
    57 #elif PLATFORM(X86)
     57#elif CPU(X86)
    5858    static const RegisterID input = X86Registers::eax;
    5959    static const RegisterID index = X86Registers::edx;
     
    6565
    6666    static const RegisterID returnRegister = X86Registers::eax;
    67 #elif PLATFORM(X86_64)
     67#elif CPU(X86_64)
    6868    static const RegisterID input = X86Registers::edi;
    6969    static const RegisterID index = X86Registers::esi;
     
    12891289    void generateEnter()
    12901290    {
    1291 #if PLATFORM(X86_64)
     1291#if CPU(X86_64)
    12921292        push(X86Registers::ebp);
    12931293        move(stackPointerRegister, X86Registers::ebp);
    12941294        push(X86Registers::ebx);
    1295 #elif PLATFORM(X86)
     1295#elif CPU(X86)
    12961296        push(X86Registers::ebp);
    12971297        move(stackPointerRegister, X86Registers::ebp);
     
    13091309        loadPtr(Address(X86Registers::ebp, 2 * sizeof(void*)), output);
    13101310    #endif
    1311 #elif PLATFORM(ARM)
     1311#elif CPU(ARM)
    13121312        push(ARMRegisters::r4);
    13131313        push(ARMRegisters::r5);
     
    13191319    void generateReturn()
    13201320    {
    1321 #if PLATFORM(X86_64)
     1321#if CPU(X86_64)
    13221322        pop(X86Registers::ebx);
    13231323        pop(X86Registers::ebp);
    1324 #elif PLATFORM(X86)
     1324#elif CPU(X86)
    13251325        pop(X86Registers::esi);
    13261326        pop(X86Registers::edi);
    13271327        pop(X86Registers::ebx);
    13281328        pop(X86Registers::ebp);
    1329 #elif PLATFORM(ARM)
     1329#elif CPU(ARM)
    13301330        pop(ARMRegisters::r6);
    13311331        pop(ARMRegisters::r5);
  • trunk/JavaScriptCore/yarr/RegexJIT.h

    r49365 r52729  
    3838struct JSRegExp; // temporary, remove when fallback is removed.
    3939
    40 #if PLATFORM(X86) && !COMPILER(MSVC)
     40#if CPU(X86) && !COMPILER(MSVC)
    4141#define YARR_CALL __attribute__ ((regparm (3)))
    4242#else
  • trunk/WebCore/ChangeLog

    r52727 r52729  
     12010-01-04  Maciej Stachowiak  <mjs@apple.com>
     2
     3        Reviewed by Adam Barth.
     4
     5        Reorganize, document and rename CPU() platform macros.
     6        https://bugs.webkit.org/show_bug.cgi?id=33145
     7
     8        * page/NavigatorBase.cpp:
     9        * platform/text/AtomicString.cpp:
     10        (WebCore::equal):
     11        * platform/text/StringHash.h:
     12        (WebCore::StringHash::equal):
     13
    1142009-12-22  Philippe Normand  <pnormand@igalia.com>
    215
  • trunk/WebCore/page/NavigatorBase.cpp

    r46078 r52729  
    3636
    3737#ifndef WEBCORE_NAVIGATOR_PLATFORM
    38 #if PLATFORM(MAC) && (PLATFORM(PPC) || PLATFORM(PPC64))
     38#if PLATFORM(MAC) && (CPU(PPC) || CPU(PPC64))
    3939#define WEBCORE_NAVIGATOR_PLATFORM "MacPPC"
    40 #elif PLATFORM(MAC) && (PLATFORM(X86) || PLATFORM(X86_64))
     40#elif PLATFORM(MAC) && (CPU(X86) || CPU(X86_64))
    4141#define WEBCORE_NAVIGATOR_PLATFORM "MacIntel"
    4242#elif PLATFORM(WIN_OS)
  • trunk/WebCore/platform/text/AtomicString.cpp

    r49798 r52729  
    104104        return false;
    105105
    106 #if PLATFORM(ARM) || PLATFORM(SH4)
     106    // FIXME: perhaps we should have a more abstract macro that indicates when
     107    // going 4 bytes at a time is unsafe
     108#if CPU(ARM) || CPU(SH4)
    107109    const UChar* stringCharacters = string->characters();
    108110    for (unsigned i = 0; i != length; ++i) {
  • trunk/WebCore/platform/text/StringHash.h

    r51006 r52729  
    5353                return false;
    5454
    55 #if PLATFORM(ARM) || PLATFORM(SH4)
     55            // FIXME: perhaps we should have a more abstract macro that indicates when
     56            // going 4 bytes at a time is unsafe
     57#if CPU(ARM) || CPU(SH4)
    5658            const UChar* aChars = a->characters();
    5759            const UChar* bChars = b->characters();
  • trunk/WebKit/gtk/ChangeLog

    r52428 r52729  
     12010-01-04  Maciej Stachowiak  <mjs@apple.com>
     2
     3        Reviewed by Adam Barth.
     4
     5        Reorganize, document and rename CPU() platform macros.
     6        https://bugs.webkit.org/show_bug.cgi?id=33145
     7
     8        * webkit/webkitwebsettings.cpp:
     9        (webkit_get_user_agent):
     10
    1112009-12-20  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
    212
  • trunk/WebKit/gtk/webkit/webkitwebsettings.cpp

    r52424 r52729  
    174174#if PLATFORM(DARWIN)
    175175
    176 #if PLATFORM(X86)
     176#if CPU(X86)
    177177    osVersion = g_strdup("Intel Mac OS X");
    178178#else
Note: See TracChangeset for help on using the changeset viewer.