Changeset 237803 in webkit
- Timestamp:
- Nov 5, 2018 8:07:40 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r237791 r237803 1 2018-11-05 Dominik Infuehr <dinfuehr@igalia.com> 2 3 Enable LLInt on ARMv7/Linux 4 https://bugs.webkit.org/show_bug.cgi?id=191190 5 6 Reviewed by Yusuke Suzuki. 7 8 After enabling the new bytecode format in r237547, C_LOOP was 9 forced on all 32-bit platforms. Now enable LLInt again on 10 ARMv7-Thumb2/Linux by default. 11 12 * Source/cmake/WebKitFeatures.cmake: 13 1 14 2018-11-05 Michael Catanzaro <mcatanzaro@igalia.com> 2 15 -
trunk/Source/JavaScriptCore/ChangeLog
r237793 r237803 1 2018-11-05 Dominik Infuehr <dinfuehr@igalia.com> 2 3 Enable LLInt on ARMv7/Linux 4 https://bugs.webkit.org/show_bug.cgi?id=191190 5 6 Reviewed by Yusuke Suzuki. 7 8 After enabling the new bytecode format in r237547, C_LOOP was 9 forced on all 32-bit platforms. Now enable LLInt again on 10 ARMv7-Thumb2/Linux. 11 12 This adds a callee-saved register in ARMv7/Linux for the metadataTable and 13 stores/restores it on LLInt function calls. It also introduces the globaladdr- 14 instruction for the ARM-offlineasm to access the opcode-table. 15 16 * jit/GPRInfo.h: 17 * jit/RegisterSet.cpp: 18 (JSC::RegisterSet::llintBaselineCalleeSaveRegisters): 19 * llint/LowLevelInterpreter.asm: 20 * llint/LowLevelInterpreter32_64.asm: 21 * offlineasm/arm.rb: 22 * offlineasm/asm.rb: 23 * offlineasm/instructions.rb: 24 1 25 2018-11-05 Fujii Hironori <Hironori.Fujii@sony.com> 2 26 -
trunk/Source/JavaScriptCore/jit/GPRInfo.h
r236381 r237803 551 551 #endif 552 552 static const GPRReg regT8 = ARMRegisters::r4; 553 static const GPRReg regCS0 = ARMRegisters::r11; 553 554 // These registers match the baseline JIT. 554 555 static const GPRReg callFrameRegister = ARMRegisters::fp; -
trunk/Source/JavaScriptCore/jit/RegisterSet.cpp
r237547 r237803 237 237 #endif 238 238 #elif CPU(ARM_THUMB2) 239 result.set(GPRInfo::regCS0); 239 240 #elif CPU(ARM_TRADITIONAL) 240 241 #elif CPU(ARM64) -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
r237547 r237803 230 230 const CalleeSaveSpaceAsVirtualRegisters = 4 231 231 elsif C_LOOP 232 const CalleeSaveSpaceAsVirtualRegisters = 1 233 elsif ARMv7 232 234 const CalleeSaveSpaceAsVirtualRegisters = 1 233 235 else … … 295 297 if C_LOOP 296 298 const metadataTable = csr3 299 elsif ARMv7 300 const metadataTable = csr0 301 else 302 error 297 303 end 298 304 end … … 713 719 elsif ARM or ARMv7_TRADITIONAL 714 720 elsif ARMv7 721 storep metadataTable, -4[cfr] 715 722 elsif ARM64 or ARM64E 716 723 emit "stp x27, x28, [x29, #-16]" … … 737 744 elsif ARM or ARMv7_TRADITIONAL 738 745 elsif ARMv7 746 loadp -4[cfr], metadataTable 739 747 elsif ARM64 or ARM64E 740 748 emit "ldp x25, x26, [x29, #-32]" … … 1187 1195 end 1188 1196 1189 if JSVALUE64 or C_LOOP 1190 # FIXME: cleanup double load 1191 # https://bugs.webkit.org/show_bug.cgi?id=190933 1192 loadp CodeBlock::m_metadata[t1], metadataTable 1193 loadp MetadataTable::m_buffer[metadataTable], metadataTable 1194 end 1197 # FIXME: cleanup double load 1198 # https://bugs.webkit.org/show_bug.cgi?id=190933 1199 loadp CodeBlock::m_metadata[t1], metadataTable 1200 loadp MetadataTable::m_buffer[metadataTable], metadataTable 1201 1195 1202 if JSVALUE64 1196 1203 move TagTypeNumber, tagTypeNumber -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
r237627 r237803 344 344 end 345 345 346 _handleUncaughtException: 346 op(handleUncaughtException, macro() 347 347 loadp Callee + PayloadOffset[cfr], t3 348 348 andp MarkedBlockMask, t3 … … 375 375 functionEpilogue() 376 376 ret 377 end) 377 378 378 379 macro doReturnFromHostFunction(extraStackSpace) … … 1939 1940 1940 1941 1941 commonOp( op_catch, macro() end, macro (size)1942 commonOp(llint_op_catch, macro() end, macro (size) 1942 1943 # This is where we end up from the JIT's throw trampoline (because the 1943 1944 # machine code return address will be set to _llint_op_catch), and from … … 1953 1954 restoreStackPointerAfterCall() 1954 1955 1955 if C_LOOP 1956 # restore metadataTable since we don't restore callee saves for CLoop during unwinding 1957 loadp CodeBlock[cfr], t1 1958 # FIXME: cleanup double load 1959 # https://bugs.webkit.org/show_bug.cgi?id=190933 1960 loadp CodeBlock::m_metadata[t1], metadataTable 1961 loadp MetadataTable::m_buffer[metadataTable], metadataTable 1962 end 1956 # restore metadataTable since we don't restore callee saves for CLoop during unwinding 1957 loadp CodeBlock[cfr], t1 1958 # FIXME: cleanup double load 1959 # https://bugs.webkit.org/show_bug.cgi?id=190933 1960 loadp CodeBlock::m_metadata[t1], metadataTable 1961 loadp MetadataTable::m_buffer[metadataTable], metadataTable 1963 1962 1964 1963 loadi VM::targetInterpreterPCForThrow[t3], PC -
trunk/Source/JavaScriptCore/offlineasm/arm.rb
r229356 r237803 39 39 # x9 => t5 (callee-save) 40 40 # x10 => (callee-save scratch) 41 # x11 => cfr (ARM and ARMv7 traditional)41 # x11 => cfr, csr0 (callee-save, metadataTable) 42 42 # x12 => (callee-save scratch) 43 43 # lr => lr … … 134 134 when "cfr" 135 135 isARMv7 ? "r7" : "r11" 136 when "csr0" 137 "r11" 136 138 when "lr" 137 139 "lr" … … 274 276 end 275 277 278 def armLowerLabelReferences(list) 279 newList = [] 280 list.each { 281 | node | 282 if node.is_a? Instruction 283 case node.opcode 284 when "leai", "leap", "leaq" 285 labelRef = node.operands[0] 286 if labelRef.is_a? LabelReference 287 raise unless labelRef.offset == 0 288 tmp = Tmp.new(node.codeOrigin, :gpr) 289 newList << Instruction.new(codeOrigin, "globaladdr", [LabelReference.new(node.codeOrigin, labelRef.label), node.operands[1], tmp]) 290 else 291 newList << node 292 end 293 else 294 newList << node 295 end 296 else 297 newList << node 298 end 299 } 300 newList 301 end 302 276 303 class Sequence 277 304 def getModifiedListARM … … 295 322 result = riscLowerHardBranchOps(result) 296 323 result = riscLowerShiftOps(result) 324 result = armLowerLabelReferences(result) 297 325 result = riscLowerMalformedAddresses(result) { 298 326 | node, address | … … 461 489 when "loadb" 462 490 $asm.puts "ldrb #{armFlippedOperands(operands)}" 463 when "loadbs" 491 when "loadbs", "loadbsp" 464 492 $asm.puts "ldrsb.w #{armFlippedOperands(operands)}" 465 493 when "storeb" … … 683 711 when "clrbp" 684 712 $asm.puts "bic #{operands[2].armOperand}, #{operands[0].armOperand}, #{operands[1].armOperand}" 713 when "globaladdr" 714 labelRef = operands[0] 715 dest = operands[1] 716 temp = operands[2] 717 718 uid = $asm.newUID 719 gotLabel = "L_offlineasm_arm_got_#{uid}" 720 offsetLabel = "L_offlineasm_arm_got_offset_#{uid}" 721 722 $asm.puts "ldr #{dest.armOperand}, #{gotLabel}" 723 $asm.puts "ldr #{temp.armOperand}, #{gotLabel}+4" 724 $asm.puts "#{offsetLabel}:" 725 $asm.puts "add #{dest.armOperand}, pc, #{dest.armOperand}" 726 $asm.puts "ldr #{dest.armOperand}, [#{dest.armOperand}, #{temp.armOperand}]" 727 728 offset = $activeBackend == "ARMv7" ? 4 : 8 729 730 $asm.deferNextLabelAction { 731 $asm.puts "#{gotLabel}:" 732 $asm.puts ".word _GLOBAL_OFFSET_TABLE_-(#{offsetLabel}+#{offset})" 733 $asm.puts ".word #{labelRef.asmLabel}(GOT)" 734 } 685 735 else 686 736 lowerDefault -
trunk/Source/JavaScriptCore/offlineasm/asm.rb
r237547 r237803 52 52 @numGlobalLabels = 0 53 53 @deferredActions = [] 54 @deferredNextLabelActions = [] 54 55 @count = 0 55 56 … … 80 81 end 81 82 putsLastComment 82 @deferredActions.each {83 (@deferredNextLabelActions + @deferredActions).each { 83 84 | action | 84 85 action.call() … … 90 91 def deferAction(&proc) 91 92 @deferredActions << proc 93 end 94 95 def deferNextLabelAction(&proc) 96 @deferredNextLabelActions << proc 92 97 end 93 98 … … 210 215 def putsLabel(labelName, isGlobal) 211 216 raise unless @state == :asm 217 @deferredNextLabelActions.each { 218 | action | 219 action.call() 220 } 221 @deferredNextLabelActions = [] 212 222 @numGlobalLabels += 1 213 223 putsProcEndIfNeeded if $emitWinAsm and isGlobal -
trunk/Source/JavaScriptCore/offlineasm/instructions.rb
r237627 r237803 266 266 [ 267 267 "clrbp", 268 "mvlbl" 268 "mvlbl", 269 "globaladdr" 269 270 ] 270 271 -
trunk/Source/WTF/ChangeLog
r237789 r237803 1 2018-11-05 Dominik Infuehr <dinfuehr@igalia.com> 2 3 Enable LLInt on ARMv7/Linux 4 https://bugs.webkit.org/show_bug.cgi?id=191190 5 6 Reviewed by Yusuke Suzuki. 7 8 After enabling the new bytecode format in r237547, C_LOOP was 9 forced on all 32-bit platforms. Now enable LLInt again on 10 ARMv7-Thumb2/Linux by default. 11 12 * wtf/Platform.h: 13 1 14 2018-11-04 Fujii Hironori <Hironori.Fujii@sony.com> 2 15 -
trunk/Source/WTF/wtf/Platform.h
r237723 r237803 760 760 #endif 761 761 762 /* Force C_LOOPfor 32-bit builds. */762 /* Disable JIT for 32-bit builds. */ 763 763 #if USE(JSVALUE32_64) 764 764 #undef ENABLE_JIT 765 765 #define ENABLE_JIT 0 766 /* Force C_LOOP on all architectures but ARMv7-Thumb2/Linux. */ 767 #if !(CPU(ARM_THUMB2) && OS(LINUX)) 766 768 #undef ENABLE_C_LOOP 767 769 #define ENABLE_C_LOOP 1 770 #endif 768 771 #endif 769 772 -
trunk/Source/cmake/WebKitFeatures.cmake
r237547 r237803 69 69 set(ENABLE_C_LOOP_DEFAULT OFF) 70 70 set(ENABLE_SAMPLING_PROFILER_DEFAULT ON) 71 elseif (WTF_CPU_ARM AND WTF_OS_UNIX) 72 set(ENABLE_JIT_DEFAULT OFF) 73 set(ENABLE_FTL_DEFAULT OFF) 74 set(USE_SYSTEM_MALLOC_DEFAULT OFF) 75 set(ENABLE_C_LOOP_DEFAULT OFF) 76 set(ENABLE_SAMPLING_PROFILER_DEFAULT OFF) 71 77 else () 72 78 set(ENABLE_JIT_DEFAULT OFF)
Note: See TracChangeset
for help on using the changeset viewer.