Ignore:
Timestamp:
Apr 24, 2020, 4:35:02 PM (5 years ago)
Author:
[email protected]
Message:

[GTK][WPE][JSCOnly] compile error when -DWTF_CPU_ARM64_CORTEXA53=ON set for arm64
https://bugs.webkit.org/show_bug.cgi?id=197192

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-04-24
Reviewed by Yusuke Suzuki.

.:

  • Source/cmake/OptionsCommon.cmake:

Source/JavaScriptCore:

This workaround is supposed to fix WebKit on old Cortex A53 CPUs, but it has been broken
since 2018, and people would like to use WebKit on modern Cortex A53. If anyone using WebKit
on the original hardware wants to fix and reimplement the workaround, feel free.

  • assembler/ARM64Assembler.h:

(JSC::ARM64Assembler::adrp):
(JSC::ARM64Assembler::madd):
(JSC::ARM64Assembler::msub):
(JSC::ARM64Assembler::smaddl):
(JSC::ARM64Assembler::smsubl):
(JSC::ARM64Assembler::umaddl):
(JSC::ARM64Assembler::umsubl):
(JSC::ARM64Assembler::nopCortexA53Fix835769): Deleted.
(JSC::ARM64Assembler::nopCortexA53Fix843419): Deleted.

  • offlineasm/arm64.rb:
  • offlineasm/instructions.rb:
Location:
trunk/Source/JavaScriptCore/offlineasm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/offlineasm/arm64.rb

    r252422 r260680  
    352352end
    353353
    354 # Workaround for Cortex-A53 erratum (835769)
    355 def arm64CortexA53Fix835769(list)
    356     newList = []
    357     lastOpcodeUnsafe = false
    358 
    359     list.each {
    360         | node |
    361         if node.is_a? Instruction
    362             case node.opcode
    363             when /^store/, /^load/
    364                 # List all macro instructions that can be lowered to a load, store or prefetch ARM64 assembly instruction
    365                 lastOpcodeUnsafe = true
    366             when  "muli", "mulp", "mulq", "smulli"
    367                 # List all macro instructions that can be lowered to a 64-bit multiply-accumulate ARM64 assembly instruction
    368                 # (defined as one of MADD, MSUB, SMADDL, SMSUBL, UMADDL or UMSUBL).
    369                 if lastOpcodeUnsafe
    370                     newList << Instruction.new(node.codeOrigin, "nopCortexA53Fix835769", [])
    371                 end
    372                 lastOpcodeUnsafe = false
    373             else
    374                 lastOpcodeUnsafe = false
    375             end
    376         end
    377         newList << node
    378     }
    379     newList
    380 end
    381 
    382354class Sequence
    383355    def getModifiedListARM64(result = @list)
     
    471443        result = assignRegistersToTemporaries(result, :gpr, ARM64_EXTRA_GPRS)
    472444        result = assignRegistersToTemporaries(result, :fpr, ARM64_EXTRA_FPRS)
    473         result = arm64CortexA53Fix835769(result)
    474445        return result
    475446    end
     
    11161087        when "pcrtoaddr"
    11171088            $asm.puts "adr #{operands[1].arm64Operand(:quad)}, #{operands[0].value}"
    1118         when "nopCortexA53Fix835769"
    1119             $asm.putStr("#if CPU(ARM64_CORTEXA53)")
    1120             $asm.puts "nop"
    1121             $asm.putStr("#endif")
    11221089        when "globaladdr"
    11231090            uid = $asm.newUID
  • trunk/Source/JavaScriptCore/offlineasm/instructions.rb

    r252422 r260680  
    355355     "bfiq", # Bit field insert <source reg> <last bit written> <width immediate> <dest reg>
    356356     "pcrtoaddr",   # Address from PC relative offset - adr instruction
    357      "nopFixCortexA53Err835769", # nop on Cortex-A53 (nothing otherwise)
    358357     "globaladdr",
    359358     "divi",
Note: See TracChangeset for help on using the changeset viewer.