Skip to content
  1. Aug 07, 2012
    • Jack Carter's avatar
      The Mips64InstrInfo.td definitions DynAlloc64 LEA_ADDiu64 · 612c6631
      Jack Carter authored
      were using a class defined for 32 bit instructions and 
      thus the instruction was for addiu instead of daddiu.
      
      This was corrected by adding the instruction opcode as a 
      field in the  base class to be filled in by the defs.
      
      llvm-svn: 161359
      612c6631
  2. Aug 06, 2012
    • Jack Carter's avatar
      Mips relocations R_MIPS_HIGHER and R_MIPS_HIGHEST. · 84491abb
      Jack Carter authored
      These 2 relocations gain access to the 
      highest and the second highest 16 bits
      of a 64 bit object.
      
      R_MIPS_HIGHER %higher(A+S)
      The %higher(x) function is [ (((long long) x + 0x80008000LL) >> 32) & 0xffff ]. 
      
      R_MIPS_HIGHEST %highest(A+S)
      The %highest(x) function is [ (((long long) x + 0x800080008000LL) >> 48) & 0xffff ]. 
      
      llvm-svn: 161348
      84491abb
  3. Aug 04, 2012
  4. Aug 02, 2012
  5. Aug 01, 2012
  6. Jul 31, 2012
  7. Jul 27, 2012
  8. Jul 26, 2012
  9. Jul 25, 2012
  10. Jul 24, 2012
  11. Jul 23, 2012
  12. Jul 21, 2012
  13. Jul 18, 2012
    • Jack Carter's avatar
      Mips specific inline asm operand modifier 'M': · a62ba828
      Jack Carter authored
      Print the high order register of a double word register operand.
      
      In 32 bit mode, a 64 bit double word integer will be represented
      by 2 32 bit registers. This modifier causes the high order register
      to be used in the asm expression. It is useful if you are using 
      doubles in assembler and continue to control register to variable
      relationships.
      
      This patch also fixes a related bug in a previous patch:
      
          case 'D': // Second part of a double word register operand
          case 'L': // Low order register of a double word register operand
          case 'M': // High order register of a double word register operand
      
      I got 'D' and 'M' confused. The second part of a double word operand
      will only match 'M' for one of the endianesses. I had 'L' and 'D'
      be the opposite twins when 'L' and 'M' are.
      
      llvm-svn: 160429
      a62ba828
    • Akira Hatanaka's avatar
      Clean up Mips16InstrFormats.td and Mips16InstrInfo.td. · f640f040
      Akira Hatanaka authored
      Patch by Reed Kotler.
      
      llvm-svn: 160403
      f640f040
  14. Jul 16, 2012
    • Jack Carter's avatar
      Doubleword Shift Left Logical Plus 32 · f649043a
      Jack Carter authored
      Mips shift instructions DSLL, DSRL and DSRA are transformed into
      DSLL32, DSRL32 and DSRA32 respectively if the shift amount is between
      32 and 63
      
      Here is a description of DSLL:
      
      Purpose: Doubleword Shift Left Logical Plus 32
      To execute a left-shift of a doubleword by a fixed amount--32 to 63 bits
      
      Description: GPR[rd] <- GPR[rt] << (sa+32)
      
      The 64-bit doubleword contents of GPR rt are shifted left, inserting
       zeros into the emptied bits; the result is placed in
      GPR rd. The bit-shift amount in the range 0 to 31 is specified by sa.
      
      This patch implements the direct object output of these instructions.
      
      llvm-svn: 160277
      f649043a
  15. Jul 13, 2012
  16. Jul 12, 2012
    • Jack Carter's avatar
      Patch for Mips direct object generation. · 570ae0b1
      Jack Carter authored
      When WriteFragmentData() case FT_align called
      Asm.getBackend().writeNopData() is called, nothing
      is done since Mips implementation of writeNopData just
      returned "true".
      
      For some reason this has not caused problems in 32 bit
      mode, but in 64 bit mode it caused an assert when processing
      multiple function units.
      
      The test case included will assert without this patch. It
      runs twice with different flags to prevent false positives
      due to changes in code generation over time.
      
      llvm-svn: 160084
      570ae0b1
  17. Jul 11, 2012
    • Jack Carter's avatar
      This change removes an "initialization" warning. · 42ebf98b
      Jack Carter authored
      Even though variable in question could not 
      be initialized before use, the code was such that 
      the compiler had no way of knowing that.
      
      llvm-svn: 160081
      42ebf98b
    • Akira Hatanaka's avatar
      In register classes in MipsRegisterInfo.td, list the registers in ascending · bb551915
      Akira Hatanaka authored
      order of binary encoding.
      
      Patch by Vladimir Medic.
      
      llvm-svn: 160073
      bb551915
    • Akira Hatanaka's avatar
      24cf4e36
    • Akira Hatanaka's avatar
      Lower RETURNADDR node in Mips backend. · 878ad8b2
      Akira Hatanaka authored
      Patch by Sasa Stankovic.
      
      llvm-svn: 160031
      878ad8b2
    • Jack Carter's avatar
      Mips specific inline asm operand modifier 'L'. · e8cb2fc6
      Jack Carter authored
         
         Low order register of a double word register operand. Operands 
         are defined by the name of the variable they are marked with in
         the inline assembler code. This is a way to specify that the 
         operand just refers to the low order register for that variable.
         
         It is the opposite of modifier 'D' which specifies the high order
         register.
         
         Example:
         
       main()
      {
      
          long long ll_input = 0x1111222233334444LL;
          long long ll_val = 3;
          int i_result = 0;
      
          __asm__ __volatile__( 
      		   "or	%0, %L1, %2"
      	     : "=r" (i_result) 
      	     : "r" (ll_input), "r" (ll_val)); 
      }
      
         Which results in:
         
         	lui	$2, %hi(_gp_disp)
      	addiu	$2, $2, %lo(_gp_disp)
      	addiu	$sp, $sp, -8
      	addu	$2, $2, $25
      	sw	$2, 0($sp)
      	lui	$2, 13107
      	ori	$3, $2, 17476     <-- Low 32 bits of ll_input
      	lui	$2, 4369
      	ori	$4, $2, 8738      <-- High 32 bits of ll_input
      	addiu	$5, $zero, 3  <-- Low 32 bits of ll_val
      	addiu	$2, $zero, 0  <-- High 32 bits of ll_val
      	#APP
      	or	$3, $4, $5        <-- or i_result, high 32 ll_input, low 32 of ll_val
      	#NO_APP
      	addiu	$sp, $sp, 8
      	jr	$ra
      
      If not direction is done for the long long for 32 bit variables results
      in using the low 32 bits as ll_val shows.
      
      There is an existing bug if 'L' or 'D' is used for the destination register
      for 32 bit long longs in that the target value will be updated incorrectly
      for the non-specified part unless explicitly set within the inline asm code.
      
      llvm-svn: 160028
      e8cb2fc6
Loading