Skip to content
  1. Feb 20, 2014
  2. Feb 05, 2014
  3. Jan 07, 2014
  4. Nov 28, 2013
    • Reed Kotler's avatar
      Check in conditional branches for constant islands. Still need to finish · 0d409e2d
      Reed Kotler authored
      conditional branches for very large targets. That will be the next small
      patch. Everything now should in principle work as good (functionality
      wise) as without constant islands so we decided at Mips/Imagination to
      make constant islands the default for Mips16 now so that it will get
      excercised a lot and this port is still experimentatl though hopefully soon
      we will change the status. Some more cleanup and code review is in order
      but things are converging fast.
      
      llvm-svn: 195902
      0d409e2d
  5. Nov 19, 2013
    • Simon Atanasyan's avatar
      [Mips] Adjust float ABI settings in case of MIPS16 mode. · 1093afe2
      Simon Atanasyan authored
      Hard float for mips16 means essentially to compile as soft float but to
      use a runtime library for soft float that is written with native mips32
      floating point instructions (those runtime routines run in mips32 hard
      float mode).
      
      The patch reviewed by Reed Kotler.
      
      llvm-svn: 195123
      1093afe2
  6. Oct 30, 2013
  7. Oct 29, 2013
  8. Oct 27, 2013
    • Reed Kotler's avatar
      Make first substantial checkin of my port of ARM constant islands code to Mips. · 91ae9829
      Reed Kotler authored
      Before I just ported the shell of the pass. I've tried to keep everything
      nearly identical to the ARM version. I think it will be very easy to eventually
      merge these two and create a new more general pass that other targets can
      use. I have some improvements I would like to make to allow pools to 
      be shared across functions and some other things. When I'm all done we
      can think about making a more general pass. More to be ported but the
      basic mechanism works now almost as good as gcc mips16.
      
      llvm-svn: 193509
      91ae9829
  9. Sep 27, 2013
  10. Aug 30, 2013
    • Reed Kotler's avatar
      Fix a problem with dual mips16/mips32 mode. When the underlying processor · c03807a3
      Reed Kotler authored
      has hard float, when you compile the mips32 code you have to make sure
      that it knows to compile any mips32 routines as hard float. I need to clean
      up the way mips16 hard float is specified but I need to first think through
      all the details. Mips16 always has a form of soft float, the difference being
      whether the underlying hardware has floating point. So it's not really
      necessary to pass the -soft-float to llvm since soft-float is always true
      for mips16 by virtue of the fact that it will not register floating point
      registers. By using this fact, I can simplify the way this is all handled.
      
      llvm-svn: 189690
      c03807a3
  11. Aug 17, 2013
    • Reed Kotler's avatar
      Fix a subtle difference between running clang vs llc for mips16. · 0eae85fb
      Reed Kotler authored
      This regards how mips16 is viewed. It's not really a target type but
      there has always been a target for it in the td files. It's more properly
      -mcpu=mips32 -mattr=+mips16 . This is how clang treats it but we have
      always had the -mcpu=mips16 which I probably should delete now but it will
      require updating all the .ll test cases for mips16. In this case it changed
      how we decide if we have a count bits instruction and whether instruction
      lowering should then expand ctlz. Now that we have dual mode compilation,
      -mattr=+mips16 really just indicates the inital processor mode that
      we are compiling for. (It is also possible to have -mcpu=64 -mattr=+mips16
      but as far as I know, nobody has even built such a processor, though there
      is an architecture manual for this).
      
      llvm-svn: 188586
      0eae85fb
  12. Aug 13, 2013
    • Jack Carter's avatar
      [Mips][msa] Added initial MSA support. · 3a2c2d42
      Jack Carter authored
      * msa SubtargetFeature
      * registers
      * ld.[bhwd], and st.[bhwd] instructions
      
      Does not correctly prohibit use of both 32-bit FPU registers and MSA together.
      
      Patch by Daniel Sanders
      
      llvm-svn: 188313
      3a2c2d42
  13. Aug 07, 2013
  14. May 11, 2013
    • Reed Kotler's avatar
      Checkin in of first of several patches to finish implementation of · 783c7944
      Reed Kotler authored
      mips16/mips32 floating point interoperability. 
      
      This patch fixes returns from mips16 functions so that if the function
      was in fact called by a mips32 hard float routine, then values
      that would have been returned in floating point registers are so returned.
      
      Mips16 mode has no floating point instructions so there is no way to
      load values into floating point registers.
      
      This is needed when returning float, double, single complex, double complex
      in the Mips ABI.
      
      Helper functions in libc for mips16 are available to do this.
      
      For efficiency purposes, these helper functions have a different calling
      convention from normal Mips calls.
      
      Registers v0,v1,a0,a1 are used to pass parameters instead of
      a0,a1,a2,a3.
      
      This is because v0,v1,a0,a1 are the natural registers used to return
      floating point values in soft float. These values can then be moved
      to the appropriate floating point registers with no extra cost.
      
      The only register that is modified is ra in this call.
      
      The helper functions make sure that the return values are in the floating
      point registers that they would be in if soft float was not in effect
      (which it is for mips16, though the soft float is implemented using a mips32
      library that uses hard float).
       
      
      llvm-svn: 181641
      783c7944
  15. Apr 10, 2013
    • Reed Kotler's avatar
      This is for an experimental option -mips-os16. The idea is to compile all · fe94cc3e
      Reed Kotler authored
      Mips32 code as Mips16 unless it can't be compiled as Mips 16. For now this
      would happen as long as floating point instructions are not needed.
      Probably it would also make sense to compile as mips32 if atomic operations
      are needed too. There may be other cases too.
      
      A module pass prescans the IR and adds the mips16 or nomips16 attribute
      to functions depending on the functions needs.
      
      Mips 16 mode can result in a 40% code compression by utililizing 16 bit
      encoding of many instructions.
      
      The hope is for this to replace the traditional gcc way of dealing with
      Mips16 code using floating point which involves essentially using soft float
      but with a library implemented using mips32 floating point. This gcc 
      method also requires creating stubs so that Mips32 code can interact with
      these Mips 16 functions that have floating point needs. My conjecture is
      that in reality this traditional gcc method would never win over this
      new method.
      
      I will be implementing the traditional gcc method also. Some of it is already
      done but I needed to do the stubs to finish the work and those required
      this mips16/32 mixed mode capability.
      
      I have more ideas for to make this new method much better and I think the old
      method will just live in llvm for anyone that needs the backward compatibility
      but I don't for what reason that would be needed.
      
      llvm-svn: 179185
      fe94cc3e
  16. Apr 09, 2013
    • Reed Kotler's avatar
      This patch enables llvm to switch between compiling for mips32/mips64 · 1595f36d
      Reed Kotler authored
      and mips16 on a per function basis.
      
      Because this patch is somewhat involved I have provide an overview of the
      key pieces of it.
      
      The patch is written so as to not change the behavior of the non mixed
      mode. We have tested this a lot but it is something new to switch subtargets
      so we don't want any chance of regression in the mainline compiler until
      we have more confidence in this.
      
      Mips32/64 are very different from Mip16 as is the case of ARM vs Thumb1.
      For that reason there are derived versions of the register info, frame info, 
      instruction info and instruction selection classes.
      
      Now we register three separate passes for instruction selection.
      One which is used to switch subtargets (MipsModuleISelDAGToDAG.cpp) and then
      one for each of the current subtargets (Mips16ISelDAGToDAG.cpp and
      MipsSEISelDAGToDAG.cpp).
      
      When the ModuleISel pass runs, it determines if there is a need to switch
      subtargets and if so, the owning pointers in MipsTargetMachine are
      appropriately changed.
      
      When 16Isel or SEIsel is run, they will return immediately without doing
      any work if the current subtarget mode does not apply to them.
      
      In addition, MipsAsmPrinter needs to be reset on a function basis.
      
      The pass BasicTargetTransformInfo is substituted with a null pass since the
      pass is immutable and really needs to be a function pass for it to be
      used with changing subtargets. This will be fixed in a follow on patch.
      
      llvm-svn: 179118
      1595f36d
  17. Mar 06, 2013
  18. Feb 05, 2013
  19. Jan 30, 2013
  20. Dec 07, 2012
  21. Nov 15, 2012
  22. Sep 26, 2012
  23. Aug 22, 2012
  24. Jun 14, 2012
  25. May 17, 2012
    • Akira Hatanaka's avatar
      This patch adds the register class for MIPS16 as well as the ability for · 0faaebf2
      Akira Hatanaka authored
      llc to recognize MIPS16 as a MIPS ASE extension. -mips16 will mean the
      mips16 ASE for mips32 by default.
      
      As part of fixing of adding this we discovered some small changes that
      need to be made to MipsInstrInfo::storeRegToStackSLot and
      MipsInstrInfo::loadRegFromStackSlot. We were using some "==" equality tests
      where in fact we should have been using Mips::<regclas>.hasSubClassEQ instead,
      per suggestion of Jakob Stoklund Olesen.
      
      Patch by Reed Kotler.
      
      llvm-svn: 156958
      0faaebf2
  26. May 15, 2012
  27. Mar 28, 2012
  28. Feb 28, 2012
  29. Feb 17, 2012
  30. Dec 20, 2011
  31. Nov 30, 2011
  32. Sep 21, 2011
  33. Sep 09, 2011
  34. Aug 24, 2011
Loading