Skip to content
  1. Jun 17, 2015
    • Toma Tabacu's avatar
      [mips] [IAS] Add test for SW with relative label operands. NFC. · 6a1e0eb2
      Toma Tabacu authored
      Reviewers: dsanders
      
      Reviewed By: dsanders
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D10497
      
      llvm-svn: 239899
      6a1e0eb2
    • Toma Tabacu's avatar
      [mips] [IAS] Fix LW with relative label operands. · 07c97b3b
      Toma Tabacu authored
      Summary:
      Previously, MCSymbolRefExpr::create() was called with a StringRef of the symbol
      name, which it would then search for in the Symbols StringMap (from MCContext).
      
      However, relative labels (which are temporary symbols) are apparently not stored
      in the Symbols StringMap, so we end up creating a new {$,.L}tmp symbol
      ({$,.L}tmp00, {$,.L}tmp10 etc.) each time we create an MCSymbolRefExpr by
      passing in the symbol name as a StringRef.
      
      Fortunately, there is a version of MCSymbolRefExpr::create() which takes an
      MCSymbol* and we already have an MCSymbol* at that point, so we can just pass
      that in instead of the StringRef.
      
      I also removed the local StringRef calls to MCSymbolRefExpr::create() from
      expandMemInst(), as those cases can be handled by evaluateRelocExpr() anyway.
      
      Reviewers: dsanders
      
      Reviewed By: dsanders
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D9938
      
      llvm-svn: 239897
      07c97b3b
  2. Jun 11, 2015
  3. Jun 09, 2015
  4. Jun 02, 2015
    • Toma Tabacu's avatar
      [mips] [IAS] Reformat mips-expansions.s. NFC. · c15dd736
      Toma Tabacu authored
      Summary:
      Make mips-expansions.s more readable by grouping the instructions with their respective CHECK's.
      This test is going to get a lot bigger soon and it will become essentially unreadable if the current formatting is kept.
      
      I've also made the comments more useful and accurate, and I've restricted the RUN lines to under 80 columns.
      
      Reviewers: dsanders
      
      Reviewed By: dsanders
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D10089
      
      llvm-svn: 238817
      c15dd736
  5. May 21, 2015
  6. May 15, 2015
    • Toma Tabacu's avatar
      [mips] [IAS] Fix expansion of negative 32-bit immediates for LI/DLI. · a3d056fd
      Toma Tabacu authored
      Summary:
      To maintain compatibility with GAS, we need to stop treating negative 32-bit immediates as 64-bit values when expanding LI/DLI.
      This currently happens because of sign extension.
      
      To do this we need to choose the 32-bit value expansion for values which use their upper 33 bits only for sign extension (i.e. no 0's, only 1's).
      
      Reviewers: dsanders
      
      Reviewed By: dsanders
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D8662
      
      llvm-svn: 237428
      a3d056fd
  7. May 14, 2015
  8. May 13, 2015
  9. Apr 28, 2015
  10. Apr 08, 2015
    • Toma Tabacu's avatar
      [mips] [IAS] Do not generate redundant move when expanding lw/sw with symbol. · c6ce0749
      Toma Tabacu authored
      Summary:
      Even though there is no 2nd register operand in the "lw/sw $8, symbol" case, we still try to find one, 
      and we end up with $0, which makes us generate an unnecessary "addu $8, $8, $0" (a.k.a. "move $8, $8").
      
      We can avoid this by checking if the 2nd register operand is different from $0, before generating the addu.
      
      Reviewers: dsanders
      
      Reviewed By: dsanders
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D8055
      
      llvm-svn: 234406
      c6ce0749
  11. Aug 14, 2014
  12. Jun 18, 2014
  13. Apr 14, 2013
  14. Mar 22, 2013
  15. Oct 10, 2012
    • Jack Carter's avatar
      Initial assembler implementation of Mips load address macro · 543fdf85
      Jack Carter authored
      This patch provides initial implementation of load address 
      macro instruction for Mips. We have implemented two kinds 
      of expansions with their variations depending on the size 
      of immediate operand:
      
       1) load address with immediate value directly:
          * la d,j => addiu d,$zero,j   (for -32768 <= j <= 65535)
          * la d,j => lui d,hi16(j)
                      ori d,d,lo16(j)   (for any other 32 bit value of j)
      
       2) load load address with register offset value
          * la d,j(s) => addiu d,s,j     (for -32768 <= j <= 65535)
          * la d,j(s) => lui d,hi16(j)   (for any other 32 bit value of j)
                         ori d,d,lo16(j)
                         addu d,d,s
      
      This patch does not cover the case when the address is loaded 
      from the value of the label or function.
      
      Contributer: Vladimir Medic
      llvm-svn: 165561
      543fdf85
  16. Oct 04, 2012
    • Jack Carter's avatar
      Implement methods that enable expansion of load immediate · 30a5982e
      Jack Carter authored
      macro instruction (li) in the assembler.
      
      We have identified three possible expansions depending on 
      the size of immediate operand:
        1) for 0 ≤ j ≤ 65535.
           li d,j =>
           ori d,$zero,j
      
        2) for −32768 ≤ j < 0.
           li d,j =>
           addiu d,$zero,j
      
        3) for any other value of j that is representable as a 32-bit integer.
           li d,j =>
           lui d,hi16(j)
           ori d,d,lo16(j)
      
      All of the above have been implemented in ths patch.
      
      Contributer: Vladimir Medic
      llvm-svn: 165199
      30a5982e
Loading