Changeset 158915 in webkit


Ignore:
Timestamp:
Nov 8, 2013 3:22:04 AM (10 years ago)
Author:
Csaba Osztrogonác
Message:

[arm] Use specific PatchableJump implementation for CPU(ARM_TRADITIONAL).
https://bugs.webkit.org/show_bug.cgi?id=123891

Patch by Julien Brianceau <jbriance@cisco.com> on 2013-11-08
Reviewed by Michael Saboff.

Although patchableBranch32 is implemented in MacroAssemblerARM.h, the used implementation
is the generic one in MacroAssembler.h. This patch fixes it and also implements the
patchableJump() function for CPU(ARM_TRADITIONAL). These specific implementations are
needed for this architecture backend to ensure that these jumps can be relinked.

  • assembler/MacroAssembler.h:
  • assembler/MacroAssemblerARM.h:

(JSC::MacroAssemblerARM::patchableJump):

  • jit/GPRInfo.h: Remove static_cast that are generating warnings in debug builds.

(JSC::GPRInfo::toIndex):
(JSC::GPRInfo::debugName):

Location:
trunk/Source/JavaScriptCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r158901 r158915  
     12013-11-08  Julien Brianceau  <jbriance@cisco.com>
     2
     3        [arm] Use specific PatchableJump implementation for CPU(ARM_TRADITIONAL).
     4        https://bugs.webkit.org/show_bug.cgi?id=123891
     5
     6        Reviewed by Michael Saboff.
     7
     8        Although patchableBranch32 is implemented in MacroAssemblerARM.h, the used implementation
     9        is the generic one in MacroAssembler.h. This patch fixes it and also implements the
     10        patchableJump() function for CPU(ARM_TRADITIONAL). These specific implementations are
     11        needed for this architecture backend to ensure that these jumps can be relinked.
     12
     13        * assembler/MacroAssembler.h:
     14        * assembler/MacroAssemblerARM.h:
     15        (JSC::MacroAssemblerARM::patchableJump):
     16        * jit/GPRInfo.h: Remove static_cast that are generating warnings in debug builds.
     17        (JSC::GPRInfo::toIndex):
     18        (JSC::GPRInfo::debugName):
     19
    1202013-11-07  Mark Lam  <mark.lam@apple.com>
    221
  • trunk/Source/JavaScriptCore/assembler/MacroAssembler.h

    r157707 r158915  
    360360    }
    361361
     362#if !CPU(ARM_TRADITIONAL)
    362363    PatchableJump patchableJump()
    363364    {
     
    374375        return PatchableJump(branch32(cond, reg, imm));
    375376    }
     377#endif
    376378#endif
    377379
  • trunk/Source/JavaScriptCore/assembler/MacroAssemblerARM.h

    r157784 r158915  
    822822    }
    823823
     824    PatchableJump patchableJump()
     825    {
     826        return PatchableJump(m_assembler.jmp(ARMAssembler::AL, 1));
     827    }
     828
    824829    PatchableJump patchableBranch32(RelationalCondition cond, RegisterID reg, TrustedImm32 imm)
    825830    {
  • trunk/Source/JavaScriptCore/jit/GPRInfo.h

    r158901 r158915  
    497497    static unsigned toIndex(GPRReg reg)
    498498    {
    499         ASSERT(static_cast<unsigned>(reg) != InvalidGPRReg);
    500         ASSERT(static_cast<unsigned>(reg) < 16);
     499        ASSERT(reg != InvalidGPRReg);
     500        ASSERT(reg < 16);
    501501        static const unsigned indexForRegister[16] = { 0, 1, 2, 8, 3, 9, InvalidIndex, InvalidIndex, 4, 5, 6, 7, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex };
    502502        unsigned result = indexForRegister[reg];
     
    507507    static const char* debugName(GPRReg reg)
    508508    {
    509         ASSERT(static_cast<unsigned>(reg) != InvalidGPRReg);
    510         ASSERT(static_cast<unsigned>(reg) < 16);
     509        ASSERT(reg != InvalidGPRReg);
     510        ASSERT(reg < 16);
    511511        static const char* nameForRegister[16] = {
    512512            "r0", "r1", "r2", "r3",
Note: See TracChangeset for help on using the changeset viewer.