Changeset 223239 in webkit for trunk/Source/JavaScriptCore
- Timestamp:
- Oct 12, 2017, 9:02:45 AM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r223238 r223239 1 2017-09-29 Filip Pizlo <[email protected]> 2 3 Enable gigacage on iOS 4 https://bugs.webkit.org/show_bug.cgi?id=177586 5 6 Reviewed by JF Bastien. 7 8 The hardest part of enabling Gigacage on iOS is that it requires loading global variables while 9 executing JS, so the LLInt needs to know how to load from global variables on all platforms that 10 have Gigacage. So, this teaches ARM64 how to load from global variables. 11 12 Also, this makes the code handle disabling the gigacage a bit better. 13 14 * ftl/FTLLowerDFGToB3.cpp: 15 (JSC::FTL::DFG::LowerDFGToB3::caged): 16 * jit/AssemblyHelpers.h: 17 (JSC::AssemblyHelpers::cage): 18 (JSC::AssemblyHelpers::cageConditionally): 19 * offlineasm/arm64.rb: 20 * offlineasm/asm.rb: 21 * offlineasm/instructions.rb: 22 1 23 2017-10-11 Sam Weinig <[email protected]> 2 24 -
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
r223202 r223239 11995 11995 LValue caged(Gigacage::Kind kind, LValue ptr) 11996 11996 { 11997 if (!Gigacage:: shouldBeEnabled())11997 if (!Gigacage::isEnabled(kind)) 11998 11998 return ptr; 11999 11999 -
trunk/Source/JavaScriptCore/jit/AssemblyHelpers.h
r223202 r223239 1315 1315 { 1316 1316 #if GIGACAGE_ENABLED 1317 if (!Gigacage:: shouldBeEnabled())1317 if (!Gigacage::isEnabled(kind)) 1318 1318 return; 1319 1319 … … 1329 1329 { 1330 1330 #if GIGACAGE_ENABLED 1331 if (!Gigacage:: shouldBeEnabled())1331 if (!Gigacage::isEnabled(kind)) 1332 1332 return; 1333 1333 -
trunk/Source/JavaScriptCore/offlineasm/arm64.rb
r223202 r223239 261 261 end 262 262 263 def arm64LowerLabelReferences(list) 264 newList = [] 265 list.each { 266 | node | 267 if node.is_a? Instruction 268 case node.opcode 269 when "loadi", "loadis", "loadp", "loadq", "loadb", "loadbs", "loadh", "loadhs" 270 labelRef = node.operands[0] 271 if labelRef.is_a? LabelReference 272 tmp = Tmp.new(node.codeOrigin, :gpr) 273 newList << Instruction.new(codeOrigin, "globaladdr", [LabelReference.new(node.codeOrigin, labelRef.label), tmp]) 274 newList << Instruction.new(codeOrigin, node.opcode, [Address.new(node.codeOrigin, tmp, Immediate.new(node.codeOrigin, labelRef.offset)), node.operands[1]]) 275 else 276 newList << node 277 end 278 else 279 newList << node 280 end 281 else 282 newList << node 283 end 284 } 285 newList 286 end 287 263 288 # Workaround for Cortex-A53 erratum (835769) 264 289 def arm64CortexA53Fix835769(list) … … 297 322 result = riscLowerShiftOps(result) 298 323 result = arm64LowerMalformedLoadStoreAddresses(result) 324 result = arm64LowerLabelReferences(result) 299 325 result = riscLowerMalformedAddresses(result) { 300 326 | node, address | … … 905 931 $asm.puts "nop" 906 932 $asm.putStr("#endif") 933 when "globaladdr" 934 uid = $asm.newUID 935 $asm.puts "L_offlineasm_loh_adrp_#{uid}:" 936 $asm.puts "adrp #{operands[1].arm64Operand(:ptr)}, #{operands[0].asmLabel}@GOTPAGE" 937 $asm.puts "L_offlineasm_loh_ldr_#{uid}:" 938 $asm.puts "ldr #{operands[1].arm64Operand(:ptr)}, [#{operands[1].arm64Operand(:ptr)}, #{operands[0].asmLabel}@GOTPAGEOFF]" 939 $asm.deferAction { 940 $asm.puts ".loh AdrpLdrGot L_offlineasm_loh_adrp_#{uid}, L_offlineasm_loh_ldr_#{uid}" 941 } 907 942 else 908 943 lowerDefault -
trunk/Source/JavaScriptCore/offlineasm/asm.rb
r223202 r223239 47 47 @numLocalLabels = 0 48 48 @numGlobalLabels = 0 49 @deferredActions = [] 50 @count = 0 49 51 50 52 @newlineSpacerState = :none … … 74 76 end 75 77 putsLastComment 78 @deferredActions.each { 79 | action | 80 action.call() 81 } 76 82 @outp.puts "OFFLINE_ASM_END" if !$emitWinAsm 77 83 @state = :cpp 84 end 85 86 def deferAction(&proc) 87 @deferredActions << proc 88 end 89 90 def newUID 91 @count += 1 92 @count 78 93 end 79 94 -
trunk/Source/JavaScriptCore/offlineasm/instructions.rb
r223202 r223239 268 268 [ 269 269 "pcrtoaddr", # Address from PC relative offset - adr instruction 270 "nopFixCortexA53Err835769" # nop on Cortex-A53 (nothing otherwise) 270 "nopFixCortexA53Err835769", # nop on Cortex-A53 (nothing otherwise) 271 "globaladdr" 271 272 ] 272 273
Note:
See TracChangeset
for help on using the changeset viewer.