Ignore:
Timestamp:
Jul 24, 2013, 9:01:38 PM (12 years ago)
Author:
[email protected]
Message:

fourthTier: Misc JIT probe enhacements.
https://bugs.webkit.org/show_bug.cgi?id=116586.

Reviewed by Michael Saboff.

  1. Added JIT probe support for ARMv7 and traditional ARM. Built and tested on ARMv7. ARM version not tested nor built.
  2. Fix the following bugs in the X86 and X86_64 probes:
    1. Cannot assume that the stack pointer is already aligned when we push args for the probe. Instead, we ensure the stack alignment at runtime when we set up the probe call. This is now done in the ctiMasmProbeTrampoline.
    2. On return, the user probe function may have altered the stack pointer value to be restored. Previously, if the sp restore value points to some of the other register restore values in the ProbeContext record, we will fail to return from the probe having those user specified value as we're expected to do. This is now fixed.
  3. Rearranged the X86/X86_64 registers order to organize them like gdb expects on X86_64.
  4. We also now preserve the condition code registers.
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/ARMAssembler.h:
  • assembler/ARMv7Assembler.h:

(ARMRegisters):

  • assembler/MacroAssemblerARM.cpp:

(JSC::isVFPPresent):
(JSC::MacroAssemblerARM::ProbeContext::dumpCPURegisters):
(JSC::MacroAssemblerARM::ProbeContext::dump):
(JSC::MacroAssemblerARM::probe):

  • assembler/MacroAssemblerARM.h:

(MacroAssemblerARM):
(CPUState):
(ProbeContext):
(JSC::MacroAssemblerARM::trustedImm32FromPtr):

  • assembler/MacroAssemblerARMv7.h:

(MacroAssemblerARMv7):
(CPUState):
(ProbeContext):
(JSC::MacroAssemblerARMv7::trustedImm32FromPtr):

  • assembler/MacroAssemblerX86.h:

(MacroAssemblerX86):
(JSC::MacroAssemblerX86::probe):

  • assembler/MacroAssemblerX86Common.cpp:

(JSC::MacroAssemblerX86Common::ProbeContext::dumpCPURegisters):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::probe):

  • assembler/X86Assembler.h:
  • config.h:
  • jit/JITStubsARM.h:
  • jit/JITStubsARMv7.h:
  • jit/JITStubsX86.h:
  • jit/JITStubsX86Common.h:
  • jit/JITStubsX86_64.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/assembler/ARMAssembler.h

    r149601 r153197  
    5151            r10,
    5252            r11,
    53             r12, S1 = r12,
     53            r12, ip = r12, S1 = r12,
    5454            r13, sp = r13,
    5555            r14, lr = r14,
     
    9292        } FPRegisterID;
    9393
     94#if USE(MASM_PROBE)
     95    #define FOR_EACH_CPU_REGISTER(V) \
     96        FOR_EACH_CPU_GPREGISTER(V) \
     97        FOR_EACH_CPU_SPECIAL_REGISTER(V) \
     98        FOR_EACH_CPU_FPREGISTER(V)
     99
     100    #define FOR_EACH_CPU_GPREGISTER(V) \
     101        V(void*, r0) \
     102        V(void*, r1) \
     103        V(void*, r2) \
     104        V(void*, r3) \
     105        V(void*, r4) \
     106        V(void*, r5) \
     107        V(void*, r6) \
     108        V(void*, r7) \
     109        V(void*, r8) \
     110        V(void*, r9) \
     111        V(void*, r10) \
     112        V(void*, r11) \
     113        V(void*, ip) \
     114        V(void*, sp) \
     115        V(void*, lr) \
     116        V(void*, pc)
     117
     118    #define FOR_EACH_CPU_SPECIAL_REGISTER(V) \
     119        V(void*, apsr) \
     120        V(void*, fpscr) \
     121
     122    #define FOR_EACH_CPU_FPREGISTER(V) \
     123        V(double, d0) \
     124        V(double, d1) \
     125        V(double, d2) \
     126        V(double, d3) \
     127        V(double, d4) \
     128        V(double, d5) \
     129        V(double, d6) \
     130        V(double, d7) \
     131        V(double, d8) \
     132        V(double, d9) \
     133        V(double, d10) \
     134        V(double, d11) \
     135        V(double, d12) \
     136        V(double, d13) \
     137        V(double, d14) \
     138        V(double, d15)
     139#endif // USE(MASM_PROBE)
    94140    } // namespace ARMRegisters
    95141
Note: See TracChangeset for help on using the changeset viewer.