Ignore:
Timestamp:
Oct 15, 2015, 12:54:02 PM (10 years ago)
Author:
[email protected]
Message:

Add MASM_PROBE support for ARM64.
https://bugs.webkit.org/show_bug.cgi?id=150128

Reviewed by Michael Saboff.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/ARM64Assembler.h:
  • Convert the ARM64 registers enum list into a macro list so that we can use it elsewhere e.g. to declare fields in the probe CPUState. Also de-tabbed the contents of the ARM64Registers namespace since the enum list change touches almost all of it anyway. This reduces the amount of complaints from the style checker.
  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::CPUState::registerName):
(JSC::AbstractMacroAssembler::CPUState::registerValue):

  • Change CPUState methods to allow for registers ID that do not map to one of its fields. This is needed because ARM64's registers include aliases for some register names. The CPUState will not allocate separate storage for the aliases.
  • assembler/MacroAssemblerARM64.cpp: Added.

(JSC::arm64ProbeTrampoline):

  • Unlike the probe mechanism for other CPUs, the ARM64 implementation does not allow the probe function to modify the sp and pc registers. We insert this wrapper function between ctiMasmProbeTrampoline() and the user's probe function so that we can check if the user tried to modify sp and pc. If so, we will print an error message so that we can alert the user that we don't support that on ARM64.

See the comment in ctiMasmProbeTrampoline() in JITStubsARM64.h for details
on why we cannot support sp and pc modifications by the probe function.

(JSC::MacroAssemblerARM64::probe):

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::repatchCall):
(JSC::MacroAssemblerARM64::makeBranch):

  • jit/JITStubs.cpp:
  • jit/JITStubsARM64.h: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r191125 r191130  
     12015-10-15  Mark Lam  <[email protected]>
     2
     3        Add MASM_PROBE support for ARM64.
     4        https://bugs.webkit.org/show_bug.cgi?id=150128
     5
     6        Reviewed by Michael Saboff.
     7
     8        * JavaScriptCore.xcodeproj/project.pbxproj:
     9        * assembler/ARM64Assembler.h:
     10        - Convert the ARM64 registers enum list into a macro list so that we can use
     11          it elsewhere e.g. to declare fields in the probe CPUState.
     12          Also de-tabbed the contents of the ARM64Registers namespace since the enum
     13          list change touches almost all of it anyway. This reduces the amount of
     14          complaints from the style checker.
     15
     16        * assembler/AbstractMacroAssembler.h:
     17        (JSC::AbstractMacroAssembler::CPUState::registerName):
     18        (JSC::AbstractMacroAssembler::CPUState::registerValue):
     19        - Change CPUState methods to allow for registers ID that do not map to one of
     20          its fields. This is needed because ARM64's registers include aliases for some
     21          register names. The CPUState will not allocate separate storage for the
     22          aliases.
     23
     24        * assembler/MacroAssemblerARM64.cpp: Added.
     25        (JSC::arm64ProbeTrampoline):
     26        - Unlike the probe mechanism for other CPUs, the ARM64 implementation does not
     27          allow the probe function to modify the sp and pc registers.  We insert this
     28          wrapper function between ctiMasmProbeTrampoline() and the user's probe function
     29          so that we can check if the user tried to modify sp and pc.  If so, we will
     30          print an error message so that we can alert the user that we don't support
     31          that on ARM64.
     32
     33          See the comment in ctiMasmProbeTrampoline() in JITStubsARM64.h for details
     34          on why we cannot support sp and pc modifications by the probe function.
     35
     36        (JSC::MacroAssemblerARM64::probe):
     37
     38        * assembler/MacroAssemblerARM64.h:
     39        (JSC::MacroAssemblerARM64::repatchCall):
     40        (JSC::MacroAssemblerARM64::makeBranch):
     41        * jit/JITStubs.cpp:
     42        * jit/JITStubsARM64.h: Added.
     43
    1442015-10-15  Mark Lam  <[email protected]>
    245
Note: See TracChangeset for help on using the changeset viewer.