Changeset 160315 in webkit
- Timestamp:
- Dec 9, 2013 10:36:44 AM (10 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r160295 r160315 1 2013-12-09 Julien Brianceau <jbriance@cisco.com> 2 3 Fix sh4 LLINT build. 4 https://bugs.webkit.org/show_bug.cgi?id=125454 5 6 Reviewed by Michael Saboff. 7 8 In LLINT, sh4 backend implementation didn't handle properly conditional jumps using 9 a LabelReference instance. This patch fixes it through sh4LowerMisplacedLabels phase. 10 Also, to avoid the need of a 4th temporary gpr, this phase is triggered later in 11 getModifiedListSH4. 12 13 * offlineasm/sh4.rb: 14 1 15 2013-12-08 Filip Pizlo <fpizlo@apple.com> 2 16 -
trunk/Source/JavaScriptCore/offlineasm/sh4.rb
r160100 r160315 453 453 | node | 454 454 if node.is_a? Instruction 455 case node.opcode 456 when "jmp", "call" 457 if node.operands[0].is_a? LabelReference 458 tmp = Tmp.new(codeOrigin, :gpr) 459 newList << Instruction.new(codeOrigin, "move", [node.operands[0], tmp]) 460 newList << Instruction.new(codeOrigin, node.opcode, [tmp]) 461 else 462 newList << node 463 end 464 else 465 newList << node 466 end 455 operands = node.operands 456 newOperands = [] 457 operands.each { 458 | operand | 459 if operand.is_a? LabelReference 460 tmp = Tmp.new(operand.codeOrigin, :gpr) 461 newList << Instruction.new(operand.codeOrigin, "move", [operand, tmp]) 462 newOperands << tmp 463 else 464 newOperands << operand 465 end 466 } 467 newList << Instruction.new(node.codeOrigin, node.opcode, newOperands, node.annotation) 467 468 else 468 469 newList << node … … 731 732 "bigteq", "bpgteq", "bilt", "bplt", "bigt", "bpgt", "bilteq", "bplteq", "btiz", "btpz", "btinz", "btpnz", "btbz", "btbnz"]) 732 733 result = riscLowerMalformedImmediates(result, -128..127) 734 result = riscLowerMisplacedAddresses(result) 733 735 result = sh4LowerMisplacedLabels(result) 734 result = riscLowerMisplacedAddresses(result)735 736 result = sh4LowerMisplacedSpecialRegisters(result) 736 737 … … 750 751 751 752 def emitSH4Branch(sh4opcode, operand) 753 raise "Invalid operand #{operand}" unless operand.is_a? RegisterID or operand.is_a? SpecialRegister 752 754 $asm.puts "#{sh4opcode} @#{operand.sh4Operand}" 753 755 $asm.puts "nop" … … 773 775 end 774 776 775 def emitSH4BranchIfT( label, neg)777 def emitSH4BranchIfT(dest, neg) 776 778 outlabel = LocalLabel.unique("branchIfT") 777 779 sh4opcode = neg ? "bt" : "bf" 778 780 $asm.puts "#{sh4opcode} #{LocalLabelReference.new(codeOrigin, outlabel).asmLabel}" 779 $asm.puts "bra #{label.asmLabel}" 780 $asm.puts "nop" 781 if dest.is_a? LocalLabelReference 782 $asm.puts "bra #{dest.asmLabel}" 783 $asm.puts "nop" 784 else 785 emitSH4Branch("jmp", dest) 786 end 781 787 outlabel.lower("SH4") 782 788 end
Note: See TracChangeset
for help on using the changeset viewer.