⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 227897 in webkit


Ignore:
Timestamp:
Jan 31, 2018, 2:04:57 AM (9 years ago)
Author:
sbarati@apple.com
Message:

clean up pushToSaveImmediateWithoutTouchingRegisters a bit
​https://bugs.webkit.org/show_bug.cgi?id=181774

Reviewed by JF Bastien.

This function on ARM64 was considering what to do with the scratch
register. And conditionally invalidated what was in it. This is not
relevant though, since the function always recovers what was in that
register. This patch just switches it to using dataTempRegister
directly and updates the comment to describe why it can do so safely.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::pushToSaveImmediateWithoutTouchingRegisters):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r227874 r227897  
     12018-01-31  Saam Barati  <sbarati@apple.com>
     2
     3        clean up pushToSaveImmediateWithoutTouchingRegisters a bit
     4        https://bugs.webkit.org/show_bug.cgi?id=181774
     5
     6        Reviewed by JF Bastien.
     7
     8        This function on ARM64 was considering what to do with the scratch
     9        register. And conditionally invalidated what was in it. This is not
     10        relevant though, since the function always recovers what was in that
     11        register. This patch just switches it to using dataTempRegister
     12        directly and updates the comment to describe why it can do so safely.
     13
     14        * assembler/MacroAssemblerARM64.h:
     15        (JSC::MacroAssemblerARM64::pushToSaveImmediateWithoutTouchingRegisters):
     16
    1172018-01-30  Mark Lam  <mark.lam@apple.com>
    218
  • trunk/Source/JavaScriptCore/assembler/MacroAssemblerARM64.h

    r226840 r227897  
    22042204    void pushToSaveImmediateWithoutTouchingRegisters(TrustedImm32 imm)
    22052205    {
    2206         // We invalidate any cached values in dataTempRegister if temp register caching is enabled.
    2207         RegisterID reg = m_allowScratchRegister ? getCachedDataTempRegisterIDAndInvalidate() : dataTempRegister;
     2206        // We can use any non-hardware reserved register here since we restore its value.
     2207        // We pick dataTempRegister arbitrarily. We don't need to invalidate it here since
     2208        // we restore its original value.
     2209        RegisterID reg = dataTempRegister;
     2210
    22082211        pushPair(reg, reg);
    22092212        move(imm, reg);
Note: See TracChangeset for help on using the changeset viewer.