Changeset 279029 in webkit


Ignore:
Timestamp:
Jun 17, 2021 7:06:58 PM (3 years ago)
Author:
mark.lam@apple.com
Message:

Rename numberOfPACBits to maxNumberOfAllowedPACBits.
https://bugs.webkit.org/show_bug.cgi?id=227156

Reviewed by Saam Barati.

Source/JavaScriptCore:

Just renaming the constant to better describe what it represents. There are no
behavior changes.

  • assembler/MacroAssemblerARM64E.h:
  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::cageWithoutUntagging):
(JSC::AssemblyHelpers::cageConditionallyAndUntag):

  • llint/LowLevelInterpreter64.asm:

Source/WTF:

  • wtf/CagedPtr.h:
Location:
trunk/Source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r279028 r279029  
     12021-06-17  Mark Lam  <mark.lam@apple.com>
     2
     3        Rename numberOfPACBits to maxNumberOfAllowedPACBits.
     4        https://bugs.webkit.org/show_bug.cgi?id=227156
     5
     6        Reviewed by Saam Barati.
     7
     8        Just renaming the constant to better describe what it represents.  There are no
     9        behavior changes.
     10
     11        * assembler/MacroAssemblerARM64E.h:
     12        * ftl/FTLLowerDFGToB3.cpp:
     13        (JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
     14        * jit/AssemblyHelpers.cpp:
     15        (JSC::AssemblyHelpers::cageWithoutUntagging):
     16        (JSC::AssemblyHelpers::cageConditionallyAndUntag):
     17        * llint/LowLevelInterpreter64.asm:
     18
    1192021-06-17  Mark Lam  <mark.lam@apple.com>
    220
  • trunk/Source/JavaScriptCore/assembler/MacroAssemblerARM64E.h

    r279028 r279029  
    5151public:
    5252    static constexpr unsigned numberOfPointerBits = sizeof(void*) * CHAR_BIT;
    53     static constexpr unsigned numberOfPACBits = numberOfPointerBits - OS_CONSTANT(EFFECTIVE_ADDRESS_WIDTH);
    54     static constexpr uintptr_t nonPACBitsMask = (1ull << (numberOfPointerBits - numberOfPACBits)) - 1;
     53    static constexpr unsigned maxNumberOfAllowedPACBits = numberOfPointerBits - OS_CONSTANT(EFFECTIVE_ADDRESS_WIDTH);
     54    static constexpr uintptr_t nonPACBitsMask = (1ull << (numberOfPointerBits - maxNumberOfAllowedPACBits)) - 1;
    5555
    5656    ALWAYS_INLINE void tagReturnAddress()
  • trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp

    r278959 r279029  
    1674316743            merge->setGenerator([=] (CCallHelpers& jit, const StackmapGenerationParams& params) {
    1674416744                jit.move(params[2].gpr(), params[0].gpr());
    16745                 jit.bitFieldInsert64(params[1].gpr(), 0, 64 - MacroAssembler::numberOfPACBits, params[0].gpr());
     16745                jit.bitFieldInsert64(params[1].gpr(), 0, 64 - MacroAssembler::maxNumberOfAllowedPACBits, params[0].gpr());
    1674616746            });
    1674716747
  • trunk/Source/JavaScriptCore/jit/AssemblyHelpers.cpp

    r278875 r279029  
    10461046#if CPU(ARM64E)
    10471047    if (kind == Gigacage::Primitive)
    1048         bitFieldInsert64(storage, 0, 64 - numberOfPACBits, tempReg);
     1048        bitFieldInsert64(storage, 0, 64 - maxNumberOfAllowedPACBits, tempReg);
    10491049    if (skip.isSet())
    10501050        skip.link(this);
     
    10831083            andPtr(TrustedImmPtr(Gigacage::mask(kind)), tempReg);
    10841084            addPtr(scratch, tempReg);
    1085             bitFieldInsert64(tempReg, 0, 64 - numberOfPACBits, storage);
     1085            bitFieldInsert64(tempReg, 0, 64 - maxNumberOfAllowedPACBits, storage);
    10861086#else
    10871087            andPtr(TrustedImmPtr(Gigacage::mask(kind)), storage);
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm

    r278591 r279029  
    489489        cagePrimitive(GigacageConfig + Gigacage::Config::basePtrs + GigacagePrimitiveBasePtrOffset, constexpr Gigacage::primitiveGigacageMask, source, scratch)
    490490        if ARM64E
    491             const numberOfPACBits = constexpr MacroAssembler::numberOfPACBits
    492             bfiq scratch2, 0, 64 - numberOfPACBits, ptr
     491            const maxNumberOfAllowedPACBits = constexpr MacroAssembler::maxNumberOfAllowedPACBits
     492            bfiq scratch2, 0, 64 - maxNumberOfAllowedPACBits, ptr
    493493        end
    494494    end
     
    513513        cagePrimitive(GigacageConfig + Gigacage::Config::basePtrs + GigacagePrimitiveBasePtrOffset, constexpr Gigacage::primitiveGigacageMask, source, scratch)
    514514        if ARM64E
    515             const numberOfPACBits = constexpr MacroAssembler::numberOfPACBits
    516             bfiq scratch2, 0, 64 - numberOfPACBits, ptr
     515            const maxNumberOfAllowedPACBits = constexpr MacroAssembler::maxNumberOfAllowedPACBits
     516            bfiq scratch2, 0, 64 - maxNumberOfAllowedPACBits, ptr
    517517        end
    518518    end
  • trunk/Source/WTF/ChangeLog

    r279028 r279029  
     12021-06-17  Mark Lam  <mark.lam@apple.com>
     2
     3        Rename numberOfPACBits to maxNumberOfAllowedPACBits.
     4        https://bugs.webkit.org/show_bug.cgi?id=227156
     5
     6        Reviewed by Saam Barati.
     7
     8        * wtf/CagedPtr.h:
     9
    1102021-06-17  Mark Lam  <mark.lam@apple.com>
    211
  • trunk/Source/WTF/wtf/CagedPtr.h

    r279028 r279029  
    4646    static constexpr Gigacage::Kind kind = passedKind;
    4747    static constexpr unsigned numberOfPointerBits = sizeof(T*) * CHAR_BIT;
    48     static constexpr unsigned numberOfPACBits = numberOfPointerBits - OS_CONSTANT(EFFECTIVE_ADDRESS_WIDTH);
    49     static constexpr uintptr_t nonPACBitsMask = (1ull << (numberOfPointerBits - numberOfPACBits)) - 1;
     48    static constexpr unsigned maxNumberOfAllowedPACBits = numberOfPointerBits - OS_CONSTANT(EFFECTIVE_ADDRESS_WIDTH);
     49    static constexpr uintptr_t nonPACBitsMask = (1ull << (numberOfPointerBits - maxNumberOfAllowedPACBits)) - 1;
    5050
    5151    CagedPtr() : CagedPtr(nullptr) { }
Note: See TracChangeset for help on using the changeset viewer.