Ignore:
Timestamp:
Sep 21, 2020, 9:56:42 PM (5 years ago)
Author:
Paulo Matos
Message:

Fix MIPS leai,leap when offset is nonzero
https://bugs.webkit.org/show_bug.cgi?id=216772

Reviewed by Mark Lam.

Fix required by change from webkit#216685

  • offlineasm/mips.rb:
File:
1 edited

Legend:

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

    r264105 r267395  
    10511051            if operands[0].is_a? LabelReference
    10521052                labelRef = operands[0]
    1053                 raise unless labelRef.offset == 0
    1054                 $asm.puts "lw #{operands[1].mipsOperand}, %got(#{labelRef.asmLabel})($gp)"
     1053                if labelRef.offset > 0
     1054                    $asm.puts "li #{operands[1].mipsOperand}, #{labelRef.asmLabel}"
     1055                    $asm.puts "addu #{operands[1].mipsOperand}, #{operands[1].mipsOperand}, #{labelRef.offset}"
     1056                    $asm.puts "lw #{operands[1].mipsOperand}, %got(#{operands[1].mipsOperand})($gp)"
     1057                else
     1058                    $asm.puts "lw #{operands[1].mipsOperand}, %got(#{labelRef.asmLabel})($gp)"
     1059                end
    10551060            else
    10561061                operands[0].mipsEmitLea(operands[1])
Note: See TracChangeset for help on using the changeset viewer.