Skip to content
  1. Apr 23, 2013
  2. Apr 22, 2013
  3. Apr 20, 2013
  4. Apr 19, 2013
  5. Apr 18, 2013
  6. Apr 17, 2013
  7. Apr 16, 2013
  8. Apr 13, 2013
  9. Apr 11, 2013
  10. 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
    • Jack Carter's avatar
      Mips specific inline asm operand modifier 'D' · b04e357d
      Jack Carter authored
      Modifier 'D' is to use the second word of a double integer.
      
      We had previously implemented the pure register varient of 
      the modifier and this patch implements the memory reference.
      
      
      
      #include "stdio.h"
      
      int b[8] = {0,1,2,3,4,5,6,7};
      void main()
      {
          int i;
          
          // The first word. Notice, no 'D'
          {asm (
          "lw    %0,%1;"
          : "=r" (i)
          : "m" (*(b+4))
          );}
          
          printf("%d\n",i);
      
          // The second word
          {asm (
          "lw    %0,%D1;"
          : "=r" (i)
          : "m" (*(b+4))
          );}
          
          printf("%d\n",i);
      }
      
      llvm-svn: 179135
      b04e357d
  11. 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
  12. Apr 03, 2013
  13. Mar 30, 2013
Loading