Changeset 249184 in webkit
- Timestamp:
- Aug 27, 2019, 4:48:54 PM (7 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 5 edited
-
ChangeLog (modified) (1 diff)
-
JavaScriptCore.xcodeproj/project.pbxproj (modified) (2 diffs)
-
dfg/DFGSpeculativeJIT.cpp (modified) (2 diffs)
-
ftl/FTLLowerDFGToB3.cpp (modified) (4 diffs)
-
llint/LowLevelInterpreter64.asm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r249175 r249184 1 2019-08-27 Michael Saboff <msaboff@apple.com> 2 3 Update PACCage changes for builds without Gigacage, but with signed pointers 4 https://bugs.webkit.org/show_bug.cgi?id=201202 5 6 Reviewed by Saam Barati. 7 8 Factored out the untagging of pointers and added that to both the Gigacage enabled 9 and disabled code paths. Did this for the LLInt as well as the JITs. 10 11 * JavaScriptCore.xcodeproj/project.pbxproj: Added arm64e.rb to offlineasm file list. 12 * dfg/DFGSpeculativeJIT.cpp: 13 (JSC::DFG::SpeculativeJIT::cageTypedArrayStorage): 14 * ftl/FTLLowerDFGToB3.cpp: 15 (JSC::FTL::DFG::LowerDFGToB3::caged): 16 * llint/LowLevelInterpreter64.asm: 17 1 18 2019-08-27 Mark Lam <mark.lam@apple.com> 2 19 -
trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r249075 r249184 3862 3862 65B8392C1BACA92A0044E824 /* CachedRecovery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedRecovery.h; sourceTree = "<group>"; }; 3863 3863 65B8392D1BACA9D30044E824 /* CachedRecovery.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CachedRecovery.cpp; sourceTree = "<group>"; }; 3864 65B898AD23146E9B00476358 /* arm64e.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = arm64e.rb; sourceTree = "<group>"; }; 3864 3865 65C02FBB0637462A003E7EE6 /* Protect.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = Protect.h; sourceTree = "<group>"; tabWidth = 8; }; 3865 3866 65C6BEDF21128C3B006849C3 /* YarrDisassembler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = YarrDisassembler.cpp; path = yarr/YarrDisassembler.cpp; sourceTree = "<group>"; }; … … 8657 8658 FEF3475520362B1C00B7C0EF /* arm.rb */, 8658 8659 FEF3476220362B2200B7C0EF /* arm64.rb */, 8660 65B898AD23146E9B00476358 /* arm64e.rb */, 8659 8661 FEF3475920362B1D00B7C0EF /* asm.rb */, 8660 8662 FEF3475820362B1D00B7C0EF /* ast.rb */, -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r249175 r249184 6785 6785 void SpeculativeJIT::cageTypedArrayStorage(GPRReg baseReg, GPRReg storageReg) 6786 6786 { 6787 auto untagArrayPtr = [&]() { 6787 6788 #if CPU(ARM64E) 6788 m_jit.untagArrayPtr(MacroAssembler::Address(baseReg, JSArrayBufferView::offsetOfLength()), storageReg);6789 m_jit.untagArrayPtr(MacroAssembler::Address(baseReg, JSArrayBufferView::offsetOfLength()), storageReg); 6789 6790 #else 6790 UNUSED_PARAM(baseReg);6791 UNUSED_PARAM(storageReg);6791 UNUSED_PARAM(baseReg); 6792 UNUSED_PARAM(storageReg); 6792 6793 #endif 6794 }; 6793 6795 6794 6796 #if GIGACAGE_ENABLED 6795 6797 UNUSED_PARAM(baseReg); 6796 if (!Gigacage::shouldBeEnabled()) 6797 return; 6798 if (!Gigacage::shouldBeEnabled()) { 6799 untagArrayPtr(); 6800 return; 6801 } 6798 6802 6799 6803 if (Gigacage::canPrimitiveGigacageBeDisabled()) { … … 6801 6805 if (vm.primitiveGigacageEnabled().isStillValid()) 6802 6806 m_jit.graph().watchpoints().addLazily(vm.primitiveGigacageEnabled()); 6803 else 6807 else { 6808 untagArrayPtr(); 6804 6809 return; 6810 } 6805 6811 } 6806 6812 6807 6813 m_jit.cageWithoutUntagging(Gigacage::Primitive, storageReg); 6808 6814 #endif 6815 untagArrayPtr(); 6809 6816 } 6810 6817 -
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
r249175 r249184 14191 14191 LValue caged(Gigacage::Kind kind, LValue ptr, LValue base) 14192 14192 { 14193 auto doUntagArrayPtr = [&](LValue taggedPtr) { 14194 #if CPU(ARM64E) 14195 if (kind == Gigacage::Primitive) { 14196 LValue size = m_out.load32(base, m_heaps.JSArrayBufferView_length); 14197 return untagArrayPtr(taggedPtr, size); 14198 } 14199 return ptr; 14200 #else 14201 UNUSED_PARAM(taggedPtr); 14202 return ptr; 14203 #endif 14204 }; 14205 14193 14206 #if GIGACAGE_ENABLED 14194 14207 if (!Gigacage::isEnabled(kind)) 14195 return ptr;14208 return doUntagArrayPtr(ptr); 14196 14209 14197 14210 if (kind == Gigacage::Primitive && Gigacage::canPrimitiveGigacageBeDisabled()) { … … 14199 14212 m_graph.watchpoints().addLazily(vm().primitiveGigacageEnabled()); 14200 14213 else 14201 return ptr;14214 return doUntagArrayPtr(ptr); 14202 14215 } 14203 14216 … … 14218 14231 }); 14219 14232 14220 LValue size = m_out.load32(base, m_heaps.JSArrayBufferView_length); 14221 result = untagArrayPtr(merge, size); 14233 result = doUntagArrayPtr(merge); 14222 14234 } 14223 14235 #endif // CPU(ARM64E) … … 14239 14251 UNUSED_PARAM(kind); 14240 14252 UNUSED_PARAM(base); 14241 return ptr;14253 return doUntagArrayPtr(ptr); 14242 14254 } 14243 14255 -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
r248829 r249184 445 445 const numberOfPACBits = constexpr MacroAssembler::numberOfPACBits 446 446 bfiq scratch2, 0, 64 - numberOfPACBits, ptr 447 untagArrayPtr length, ptr448 447 end 448 end 449 if ARM64E 450 untagArrayPtr length, ptr 449 451 end 450 452 end
Note:
See TracChangeset
for help on using the changeset viewer.