Ignore:
Timestamp:
Aug 12, 2009, 10:58:36 PM (16 years ago)
Author:
[email protected]
Message:

Add optimize call and property access support for ARM JIT.
https://bugs.webkit.org/show_bug.cgi?id=24986

Patch by Gabor Loki <[email protected]> on 2009-08-12
Reviewed by Gavin Barraclough.

For tightly coupled sequences the BEGIN_UNINTERRUPTED_SEQUENCE and
END_UNINTERRUPTED_SEQUENCE macros have been introduced which ensure
space for instructions and constants of the named sequence. This
method is vital for those architecture which are using constant pool.

The 'latePatch' method - which was linked to JmpSrc - is replaced with
a port specific solution (each calls are marked to place their address
on the constant pool).

  • assembler/ARMAssembler.cpp:

(JSC::ARMAssembler::linkBranch):
(JSC::ARMAssembler::executableCopy): Add extra align for constant pool.

  • assembler/ARMAssembler.h:

(JSC::ARMAssembler::JmpSrc::JmpSrc):
(JSC::ARMAssembler::sizeOfConstantPool):
(JSC::ARMAssembler::jmp):
(JSC::ARMAssembler::linkCall):

  • assembler/ARMv7Assembler.h:
  • assembler/AbstractMacroAssembler.h:
  • assembler/AssemblerBufferWithConstantPool.h:

(JSC::AssemblerBufferWithConstantPool::flushIfNoSpaceFor): Fix the
computation of the remaining space.

  • assembler/MacroAssemblerARM.h:

(JSC::MacroAssemblerARM::branch32):
(JSC::MacroAssemblerARM::nearCall):
(JSC::MacroAssemblerARM::call):
(JSC::MacroAssemblerARM::branchPtrWithPatch):
(JSC::MacroAssemblerARM::ensureSpace):
(JSC::MacroAssemblerARM::sizeOfConstantPool):
(JSC::MacroAssemblerARM::prepareCall):

  • assembler/X86Assembler.h:
  • jit/JIT.h:
  • jit/JITCall.cpp:

(JSC::JIT::compileOpCall):

  • jit/JITInlineMethods.h:

(JSC::JIT::beginUninterruptedSequence):
(JSC::JIT::endUninterruptedSequence):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_method_check):
(JSC::JIT::compileGetByIdHotPath):
(JSC::JIT::compileGetByIdSlowCase):
(JSC::JIT::emit_op_put_by_id):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/jit/JITInlineMethods.h

    r46831 r47186  
    103103}
    104104
     105#if defined(ASSEMBLER_HAS_CONSTANT_POOL) && ASSEMBLER_HAS_CONSTANT_POOL
     106
     107ALWAYS_INLINE void JIT::beginUninterruptedSequence(int insnSpace, int constSpace)
     108{
     109#if PLATFORM(ARM) && !PLATFORM_ARM_ARCH(7)
     110#ifndef NDEBUG
     111    // Ensure the label after the sequence can also fit
     112    insnSpace += sizeof(ARMWord);
     113    constSpace += sizeof(uint64_t);
     114#endif
     115
     116    ensureSpace(insnSpace, constSpace);
     117
     118#endif
     119
     120#if defined(ASSEMBLER_HAS_CONSTANT_POOL) && ASSEMBLER_HAS_CONSTANT_POOL
     121#ifndef NDEBUG
     122    m_uninterruptedInstructionSequenceBegin = label();
     123    m_uninterruptedConstantSequenceBegin = sizeOfConstantPool();
     124#endif
     125#endif
     126}
     127
     128ALWAYS_INLINE void JIT::endUninterruptedSequence(int insnSpace, int constSpace)
     129{
     130#if defined(ASSEMBLER_HAS_CONSTANT_POOL) && ASSEMBLER_HAS_CONSTANT_POOL
     131    ASSERT(differenceBetween(m_uninterruptedInstructionSequenceBegin, label()) == insnSpace);
     132    ASSERT(sizeOfConstantPool() - m_uninterruptedConstantSequenceBegin == constSpace);
     133#endif
     134}
     135
     136#endif
     137
    105138#if PLATFORM(X86) || PLATFORM(X86_64) || (PLATFORM(ARM) && !PLATFORM_ARM_ARCH(7))
    106139
Note: See TracChangeset for help on using the changeset viewer.