Changeset 37570 in webkit for trunk/JavaScriptCore/masm


Ignore:
Timestamp:
Oct 13, 2008, 5:20:49 PM (17 years ago)
Author:
[email protected]
Message:

2008-10-13 Cameron Zwarich <[email protected]>

Reviewed by Geoff Garen.

Bug 21541: Move RegisterFile growth check to callee
<https://bugs.webkit.org/show_bug.cgi?id=21541>

Move the RegisterFile growth check to the callee in the common case,
where some of the information is known statically at JIT time. There is
still a check in the caller in the case where the caller provides too
few arguments.

This is a 2.1% speedup on the V8 benchmark, including a 5.1% speedup on
the Richards benchmark, a 4.1% speedup on the DeltaBlue benchmark, and a
1.4% speedup on the Earley-Boyer benchmark. It is also a 0.5% speedup on
SunSpider.

  • VM/CTI.cpp: (JSC::CTI::privateCompile):
  • VM/Machine.cpp: (JSC::Machine::cti_register_file_check): (JSC::Machine::cti_op_call_JSFunction): (JSC::Machine::cti_op_construct_JSConstruct):
  • VM/Machine.h:
  • VM/RegisterFile.h:
  • masm/X86Assembler.h: (JSC::X86Assembler::): (JSC::X86Assembler::cmpl_mr): (JSC::X86Assembler::emitUnlinkedJg):
File:
1 edited

Legend:

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

    r37457 r37570  
    192192        OP_XOR_EvGv                     = 0x31,
    193193        OP_CMP_EvGv                     = 0x39,
     194        OP_CMP_GvEv                     = 0x3B,
    194195        OP_PUSH_EAX                     = 0x50,
    195196        OP_POP_EAX                      = 0x58,
     
    241242        OP2_JGE_rel32       = 0x8D,
    242243        OP2_JLE_rel32       = 0x8E,
     244        OP2_JG_rel32       = 0x8F,
    243245        OP2_IMUL_GvEv       = 0xAF,
    244246        OP2_MOVZX_GvEb      = 0xB6,
     
    372374        m_buffer->putByte(OP_CMP_EvGv);
    373375        emitModRm_rm(src, base, offset);
     376    }
     377
     378    void cmpl_mr(int offset, RegisterID base, RegisterID dst)
     379    {
     380        m_buffer->putByte(OP_CMP_GvEv);
     381        emitModRm_rm(dst, base, offset);
    374382    }
    375383
     
    946954        return JmpSrc(m_buffer->getOffset());
    947955    }
    948    
     956
     957    JmpSrc emitUnlinkedJg()
     958    {
     959        m_buffer->putByte(OP_2BYTE_ESCAPE);
     960        m_buffer->putByte(OP2_JG_rel32);
     961        m_buffer->putInt(0);
     962        return JmpSrc(m_buffer->getOffset());
     963    }
     964
    949965    JmpSrc emitUnlinkedJa()
    950966    {
Note: See TracChangeset for help on using the changeset viewer.