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/X86Assembler.h

    r153162 r153197  
    8080    #define FOR_EACH_CPU_REGISTER(V) \
    8181        FOR_EACH_CPU_GPREGISTER(V) \
     82        FOR_EACH_CPU_SPECIAL_REGISTER(V) \
    8283        FOR_EACH_CPU_FPREGISTER(V)
    8384
    8485    #define FOR_EACH_CPU_GPREGISTER(V) \
    8586        V(void*, eax) \
     87        V(void*, ebx) \
    8688        V(void*, ecx) \
    8789        V(void*, edx) \
    88         V(void*, ebx) \
    89         V(void*, esp) \
    90         V(void*, ebp) \
    9190        V(void*, esi) \
    9291        V(void*, edi) \
    93         FOR_EACH_X86_64_CPU_GPREGISTER(V) \
    94         V(void*, eip)
     92        V(void*, ebp) \
     93        V(void*, esp) \
     94        FOR_EACH_X86_64_CPU_GPREGISTER(V)
     95
     96    #define FOR_EACH_CPU_SPECIAL_REGISTER(V) \
     97        V(void*, eip) \
     98        V(void*, eflags) \
    9599
    96100    #define FOR_EACH_CPU_FPREGISTER(V) \
Note: See TracChangeset for help on using the changeset viewer.