Ignore:
Timestamp:
Dec 13, 2008, 3:58:58 PM (16 years ago)
Author:
[email protected]
Message:

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

Reviewed by Cameron Zwarich.

Port the remainder of the JIT, bar calling convention related code, and code
implementing optimizations which can be disabled, to use the MacroAssembler.

  • assembler/MacroAssembler.h: (JSC::MacroAssembler::DataLabelPtr::DataLabelPtr): (JSC::MacroAssembler::RepatchBuffer::RepatchBuffer): (JSC::MacroAssembler::RepatchBuffer::link): (JSC::MacroAssembler::RepatchBuffer::addressOf): (JSC::MacroAssembler::RepatchBuffer::setPtr): (JSC::MacroAssembler::addPtr): (JSC::MacroAssembler::lshift32): (JSC::MacroAssembler::mod32): (JSC::MacroAssembler::rshift32): (JSC::MacroAssembler::storePtrWithRepatch): (JSC::MacroAssembler::jnzPtr): (JSC::MacroAssembler::jzPtr): (JSC::MacroAssembler::jump): (JSC::MacroAssembler::label):
  • assembler/X86Assembler.h: (JSC::X86Assembler::): (JSC::X86Assembler::xchgl_rr): (JSC::X86Assembler::jmp_m): (JSC::X86Assembler::repatchAddress): (JSC::X86Assembler::getRelocatedAddress):
  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::CodeBlock):
  • bytecode/CodeBlock.h: (JSC::JITCodeRef::JITCodeRef): (JSC::CodeBlock::setJITCode): (JSC::CodeBlock::jitCode): (JSC::CodeBlock::executablePool):
  • jit/JIT.cpp: (JSC::JIT::privateCompileMainPass): (JSC::JIT::privateCompileLinkPass): (JSC::JIT::privateCompile): (JSC::JIT::privateCompileCTIMachineTrampolines):
  • jit/JIT.h: (JSC::CallRecord::CallRecord): (JSC::JumpTable::JumpTable): (JSC::JIT::emitCTICall): (JSC::JIT::JSRInfo::JSRInfo):
  • jit/JITArithmetic.cpp:
  • jit/JITCall.cpp:
  • jit/JITInlineMethods.h: (JSC::JIT::emitNakedCall): (JSC::JIT::emitCTICall_internal): (JSC::JIT::checkStructure): (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero): (JSC::JIT::addSlowCase): (JSC::JIT::addJump): (JSC::JIT::emitJumpSlowToHot):
  • jit/JITPropertyAccess.cpp: (JSC::JIT::privateCompileGetByIdChainList): (JSC::JIT::privateCompileGetByIdChain):
File:
1 edited

Legend:

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

    r39121 r39284  
    9898        OP_GROUP1_EvIb                  = 0x83,
    9999        OP_TEST_EvGv                    = 0x85,
     100        OP_XCHG_EvGv                    = 0x87,
    100101        OP_MOV_EvGv                     = 0x89,
    101102        OP_MOV_GvEv                     = 0x8B,
     
    658659    }
    659660
     661    void xchgl_rr(RegisterID src, RegisterID dst)
     662    {
     663        m_buffer.putByte(OP_XCHG_EvGv);
     664        modRm_rr(src, dst);
     665    }
     666
    660667    void imull_rr(RegisterID src, RegisterID dst)
    661668    {
     
    858865    }
    859866   
     867    void jmp_m(RegisterID base)
     868    {
     869        m_buffer.putByte(OP_GROUP5_Ev);
     870        modRm_opm(GROUP5_OP_JMPN, base);
     871    }
     872   
    860873    void jmp_m(int offset, RegisterID base)
    861874    {
     
    11261139    }
    11271140   
    1128     static void linkAbsoluteAddress(void* code, JmpDst useOffset, JmpDst address)
    1129     {
    1130         ASSERT(useOffset.m_offset != -1);
    1131         ASSERT(address.m_offset != -1);
     1141    static void repatchAddress(void* code, JmpDst position, void* value)
     1142    {
     1143        ASSERT(position.m_offset != -1);
    11321144       
    1133         reinterpret_cast<int*>(reinterpret_cast<ptrdiff_t>(code) + useOffset.m_offset)[-1] = reinterpret_cast<ptrdiff_t>(code) + address.m_offset;
     1145        reinterpret_cast<void**>(reinterpret_cast<ptrdiff_t>(code) + position.m_offset)[-1] = value;
    11341146    }
    11351147   
     
    11461158    }
    11471159   
    1148     static void* getRelocatedAddress(void* code, JmpDst jump)
    1149     {
    1150         return reinterpret_cast<void*>(reinterpret_cast<ptrdiff_t>(code) + jump.m_offset);
     1160    static void* getRelocatedAddress(void* code, JmpDst destination)
     1161    {
     1162        ASSERT(destination.m_offset != -1);
     1163
     1164        return reinterpret_cast<void*>(reinterpret_cast<ptrdiff_t>(code) + destination.m_offset);
    11511165    }
    11521166   
Note: See TracChangeset for help on using the changeset viewer.