[llvm-commits] initial mips support!

Evan Cheng evan.cheng at apple.com
Tue May 29 12:11:22 PDT 2007


Hi,

I know nothing about MIPs so I only do some nitpicking. Please fix  
them and then re-submit:

1. isMoveInstr():
   //  addiu $n, $n, 0
   if (MI.getOpcode() == Mips::ADDiu)
   {
     if ((MI.getOperand(1).isRegister()) &&
       (isZeroImm(MI.getOperand(2)))) {
       DstReg = MI.getOperand(0).getReg();
       SrcReg = MI.getOperand(2).getReg();    <=== Is this right?  
Should it be getOperand(1)?
       return true;
     }
   }

2. isMoveInstrt(), isLoadFromStackSlot(), etc.: Please fix the  
indentation problems.
3. InsertBranch():  Please don't leave code that's commented out in,
4. MipsISelDAGToDAG.cpp. Please don't include header files that are  
not needed, e.g. MathExtras.h, SSARegMap.h
     Also
public:
   MipsDAGToDAGISel(MipsTargetMachine &tm) :
         SelectionDAGISel(MipsLowering),
         TM(tm), MipsLowering(*TM.getTargetLowering()) {}
         //,Subtarget(&TM.getSubtarget<MipsSubtarget>()) {}    <==  
Plz remove code that's commented out.

5. MipsInstrInfo.td: Are branches marked isTerminator?
6. MipsInstrFormats.td: I know fields like rs, rt, shamt are not  
currently used. But it would be nice if there are some simple  
documentation.

Nice work! Thanks,

Evan


On May 21, 2007, at 7:14 PM, bruno cardoso wrote:

> Hello,
>
> With the files on attachment LLVM has now initial support for MIPS. =)
> The support is still simple and experimental.
> The status is:
>
> x - Mips I instructions, without (coprocessor) float point support.
> x - Mips o32 ABI calling convention implemented.
> x -  .s files generated by LLC can be compiled with Mips GCC/GAS.
> x - Simple test programs are working on Linux in a Mips emulated  
> QEMU machine.
> x - AsmPrinter does not yet generate all Mips GAS pseudo-instructions
>     (such as .cpload, .fmask, .mask)
>
> I hope you enjoy! =)
> Cheers,
>
> -- 
> Bruno Cardoso Lopes
> http://www.brunocardoso.org
>
> "The Man in Black fled across the desert and the gunslinger followed"
>   - Childe Roland to the Dark Tower Came
> <Makefile>
> <Mips.h>
> <Mips.td>
> <MipsCallingConv.td>
> <MipsISelDAGToDAG.cpp>
> <MipsISelLowering.cpp>
> <MipsInstrFormats.td>
> <MipsInstrInfo.cpp>
> <MipsInstrInfo.h>
> <MipsInstrInfo.td>
> <MipsRegisterInfo.cpp>
> <MipsRegisterInfo.h>
> <MipsRegisterInfo.td>
> <MipsSubtarget.cpp>
> <MipsSubtarget.h>
> <MipsTargetAsmInfo.cpp>
> <MipsTargetAsmInfo.h>
> <MipsTargetMachine.cpp>
> <MipsAsmPrinter.cpp>
> <MipsISelLowering.h>
> <MipsTargetMachine.h>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20070529/0c2514d2/attachment.html>


More information about the llvm-commits mailing list