Ignore:
Timestamp:
Dec 16, 2008, 4:03:34 PM (16 years ago)
Author:
[email protected]
Message:

2008-12-16 Gavin Barraclough <[email protected]>

Reviewed by Cameron Zwarich.

Make the JIT compile on x86-64.
This largely involves populting the missing calls in MacroAssembler.h.
In addition some reinterpret_casts need removing from the JIT, and the
repatching property access code will need to be fully compiled out for
now. The changes in interpret.cpp are to reorder the functions so that
the _generic forms come before all other property access methods, and
then to place all property access methods other than the generic forms
under control of the ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS macro.

No performance impact.

  • assembler/AssemblerBuffer.h: (JSC::AssemblerBuffer::putInt64Unchecked):
  • assembler/MacroAssembler.h: (JSC::MacroAssembler::loadPtr): (JSC::MacroAssembler::load32): (JSC::MacroAssembler::storePtr): (JSC::MacroAssembler::storePtrWithRepatch): (JSC::MacroAssembler::store32): (JSC::MacroAssembler::poke): (JSC::MacroAssembler::move): (JSC::MacroAssembler::testImm64): (JSC::MacroAssembler::jePtr): (JSC::MacroAssembler::jnePtr): (JSC::MacroAssembler::jnzPtr): (JSC::MacroAssembler::jzPtr):
  • assembler/X86Assembler.h: (JSC::X86Assembler::): (JSC::X86Assembler::cmpq_rr): (JSC::X86Assembler::cmpq_rm): (JSC::X86Assembler::cmpq_im): (JSC::X86Assembler::testq_i32m): (JSC::X86Assembler::movl_mEAX): (JSC::X86Assembler::movl_i32r): (JSC::X86Assembler::movl_EAXm): (JSC::X86Assembler::movq_rm): (JSC::X86Assembler::movq_mEAX): (JSC::X86Assembler::movq_mr): (JSC::X86Assembler::movq_i64r): (JSC::X86Assembler::movl_mr): (JSC::X86Assembler::X86InstructionFormatter::oneByteOp64): (JSC::X86Assembler::X86InstructionFormatter::immediate64):
  • interpreter/Interpreter.cpp: (JSC::Interpreter::cti_op_put_by_id_generic): (JSC::Interpreter::cti_op_get_by_id_generic): (JSC::Interpreter::cti_op_put_by_id): (JSC::Interpreter::cti_op_put_by_id_second):
  • jit/JIT.cpp: (JSC::JIT::privateCompileMainPass): (JSC::JIT::privateCompile): (JSC::JIT::privateCompileCTIMachineTrampolines):
  • jit/JITCall.cpp: (JSC::JIT::compileOpCallSetupArgs): (JSC::JIT::compileOpCall):
  • jit/JITPropertyAccess.cpp: (JSC::JIT::compileGetByIdHotPath): (JSC::JIT::compilePutByIdHotPath):
  • runtime/JSImmediate.h: (JSC::JSImmediate::makeInt):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/JSImmediate.h

    r38473 r39342  
    8989        friend class JIT;
    9090   
    91         static const uintptr_t TagMask           = 0x3u; // primary tag is 2 bits long
    92         static const uintptr_t TagBitTypeInteger = 0x1u; // bottom bit set indicates integer, this dominates the following bit
    93         static const uintptr_t TagBitTypeOther   = 0x2u; // second bit set indicates immediate other than an integer
    94 
    95         static const uintptr_t ExtendedTagMask         = 0xCu; // extended tag holds a further two bits
    96         static const uintptr_t ExtendedTagBitBool      = 0x4u;
    97         static const uintptr_t ExtendedTagBitUndefined = 0x8u;
    98 
    99         static const uintptr_t FullTagTypeMask      = TagMask | ExtendedTagMask;
    100         static const uintptr_t FullTagTypeBool      = TagBitTypeOther | ExtendedTagBitBool;
    101         static const uintptr_t FullTagTypeUndefined = TagBitTypeOther | ExtendedTagBitUndefined;
    102         static const uintptr_t FullTagTypeNull      = TagBitTypeOther;
     91        static const uint32_t TagMask           = 0x3u; // primary tag is 2 bits long
     92        static const uint32_t TagBitTypeInteger = 0x1u; // bottom bit set indicates integer, this dominates the following bit
     93        static const uint32_t TagBitTypeOther   = 0x2u; // second bit set indicates immediate other than an integer
     94
     95        static const uint32_t ExtendedTagMask         = 0xCu; // extended tag holds a further two bits
     96        static const uint32_t ExtendedTagBitBool      = 0x4u;
     97        static const uint32_t ExtendedTagBitUndefined = 0x8u;
     98
     99        static const uint32_t FullTagTypeMask      = TagMask | ExtendedTagMask;
     100        static const uint32_t FullTagTypeBool      = TagBitTypeOther | ExtendedTagBitBool;
     101        static const uint32_t FullTagTypeUndefined = TagBitTypeOther | ExtendedTagBitUndefined;
     102        static const uint32_t FullTagTypeNull      = TagBitTypeOther;
    103103
    104104        static const uint32_t IntegerPayloadShift  = 1u;
    105105        static const uint32_t ExtendedPayloadShift = 4u;
    106106
    107         static const uintptr_t ExtendedPayloadBitBoolValue = 1 << ExtendedPayloadShift;
     107        static const uint32_t ExtendedPayloadBitBoolValue = 1 << ExtendedPayloadShift;
    108108 
    109109    public:
     
    267267        static ALWAYS_INLINE JSValue* makeInt(int32_t value)
    268268        {
    269             return makeValue((value << IntegerPayloadShift) | TagBitTypeInteger);
     269            // FIXME: Why does the result of this need be a 64-bit value?
     270            // Integer immediates are still only 31-bit on x86-64.
     271            return makeValue((value << IntegerPayloadShift) | static_cast<uintptr_t>(TagBitTypeInteger));
    270272        }
    271273       
Note: See TracChangeset for help on using the changeset viewer.