Ignore:
Timestamp:
Jan 17, 2016, 1:15:45 AM (9 years ago)
Author:
Julien Brianceau
Message:

[mips] Fix regT2 and regT3 trampling in MacroAssembler
https://bugs.webkit.org/show_bug.cgi?id=153131

Mips $t2 and $t3 registers were used as temporary registers
in MacroAssemblerMIPS.h, whereas they are mapped to regT2
and regT3 in LLInt and GPRInfo.

This patch rearranges register mapping for the mips architecture:

  • use $t0 and $t1 as temp registers in LLInt (as in MacroAssembler)
  • use $t7 and $t8 as temp registers in MacroAssembler (as in LLInt)
  • remove $t6 from temp registers list in LLInt
  • update GPRInfo.h accordingly
  • add mips macroScratchRegisters() list in RegisterSet.cpp

Reviewed by Michael Saboff.

  • assembler/MacroAssemblerMIPS.h:
  • jit/GPRInfo.h:

(JSC::GPRInfo::toRegister):
(JSC::GPRInfo::toIndex):

  • jit/RegisterSet.cpp:

(JSC::RegisterSet::macroScratchRegisters):
(JSC::RegisterSet::calleeSaveRegisters):

  • offlineasm/mips.rb:
File:
1 edited

Legend:

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

    r194725 r195182  
    3333# $v0 => t0, r0
    3434# $v1 => t1, r1
     35# $t0 =>            (scratch)
     36# $t1 =>            (scratch)
    3537# $t2 =>         t2
    3638# $t3 =>         t3
    3739# $t4 =>         t4
    3840# $t5 =>         t5
    39 # $t6 =>            (scratch)
     41# $t6 =>         t6
    4042# $t7 =>            (scratch)
    4143# $t8 =>            (scratch)
     
    9395end
    9496
    95 MIPS_TEMP_GPRS = [SpecialRegister.new("$t6"), SpecialRegister.new("$t7"), SpecialRegister.new("$t8")]
     97MIPS_TEMP_GPRS = [SpecialRegister.new("$t0"), SpecialRegister.new("$t1"), SpecialRegister.new("$t7"), SpecialRegister.new("$t8")]
    9698MIPS_ZERO_REG = SpecialRegister.new("$zero")
    9799MIPS_GP_REG = SpecialRegister.new("$gp")
Note: See TracChangeset for help on using the changeset viewer.