1. 16 12月, 2014 7 次提交
  2. 07 11月, 2014 4 次提交
    • Y
      target-mips: fix multiple TCG registers covering same data · cb269f27
      Yongbok Kim 提交于
      Avoid to allocate different TCG registers for the FPU registers
      that are mapped on the MSA vectore registers.
      Signed-off-by: NYongbok Kim <yongbok.kim@imgtec.com>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Signed-off-by: NLeon Alrae <leon.alrae@imgtec.com>
      cb269f27
    • M
      mips: Ensure PC update with MTC0 single-stepping · 342368af
      Maciej W. Rozycki 提交于
      Correct the way PC is updated when single-stepping instructions, by
      keeping the old PC only for the BS_EXCP (exception condition) state.
      
      Some MTC0 (and possibly other) instructions switch to the BS_STOP state
      to terminate the current translation block, so that the state transition
      of the simulated CPU resulting from the CP0 operation takes effect with
      the following instruction.  This happens with `mtc0 <reg>,c0_config' for
      example, typically used to set KSEG0 cacheability.
      
      While single-stepping this has a side-effect of not advancing the PC
      past the instruction just executed; subsequent single-step traps will
      stop at the same instruction repeatedly.  Example:
      
      (gdb) stepi
      0x80004d24 in _start ()
      5: x/i $pc
      => 0x80004d24 <_start+364>:     mfc0    t1,c0_config
      (gdb)
      0x80004d28 in _start ()
      5: x/i $pc
      => 0x80004d28 <_start+368>:     li      at,-8
      (gdb)
      0x80004d2c in _start ()
      5: x/i $pc
      => 0x80004d2c <_start+372>:     and     t1,t1,at
      (gdb)
      0x80004d30 in _start ()
      5: x/i $pc
      => 0x80004d30 <_start+376>:     ori     t1,t1,0x3
      (gdb)
      0x80004d34 in _start ()
      5: x/i $pc
      => 0x80004d34 <_start+380>:     mtc0    t1,c0_config
      (gdb)
      0x80004d34 in _start ()
      5: x/i $pc
      => 0x80004d34 <_start+380>:     mtc0    t1,c0_config
      (gdb)
      0x80004d34 in _start ()
      5: x/i $pc
      => 0x80004d34 <_start+380>:     mtc0    t1,c0_config
      (gdb)
      0x80004d34 in _start ()
      5: x/i $pc
      => 0x80004d34 <_start+380>:     mtc0    t1,c0_config
      (gdb)
      
      -- oops!
      Signed-off-by: NMaciej W. Rozycki <macro@codesourcery.com>
      Reviewed-by: NLeon Alrae <leon.alrae@imgtec.com>
      Signed-off-by: NLeon Alrae <leon.alrae@imgtec.com>
      342368af
    • L
      target-mips: fix for missing delay slot in BC1EQZ and BC1NEZ · 85479575
      Leon Alrae 提交于
      New R6 COP1 conditional branches currently don't have delay slot. Fixing this
      by setting MIPS_HFLAG_BDS32 flag which is required for branches having 4-byte
      delay slot.
      Signed-off-by: NLeon Alrae <leon.alrae@imgtec.com>
      Reviewed-by: NYongbok Kim <yongbok.kim@imgtec.com>
      85479575
    • M
      mips: Respect CP0.Status.CU1 for microMIPS FP branches · 272f458d
      Maciej W. Rozycki 提交于
      Make microMIPS FP branches respect CP0.Status.CU1 and trap with a
      Coprocessor Unusable exception if COP1 has been disabled; also trap if
      no FPU is present at all.
      
      Standard MIPS FP instruction encodings have a more regular structure and
      branches are covered with a single umbrella along other instructions.
      This is not the case with the microMIPS encoding, this case has to be
      taken care of explicitly here.  Code to do so has been copied from the
      standard MIPS code handler for OPC_CP1, in `decode_opc'.
      
      Problems arising from this bug will generally only show up on user
      context switches in operating systems making use of lazy FP context
      switches, such as Linux.  It will also more readily trigger if software
      FPU emulation is used, either implicitly on a non-float CPU, or forced
      on a hard-float CPU such as with the "nofpu" Linux kernel command line
      argument.
      
      The problem may have been easily missed because we have no hard-float
      microMIPS CPU configuration present; in fact we have no microMIPS CPU
      configuration of any kind present.
      Signed-off-by: NMaciej W. Rozycki <macro@codesourcery.com>
      Reviewed-by: NLeon Alrae <leon.alrae@imgtec.com>
      Signed-off-by: NLeon Alrae <leon.alrae@imgtec.com>
      272f458d
  3. 03 11月, 2014 20 次提交
  4. 14 10月, 2014 9 次提交