From a5971e8c004c588a8dfa90da49986af60620189e Mon Sep 17 00:00:00 2001 From: Reed Kotler Date: Wed, 10 Oct 2012 01:58:16 +0000 Subject: [PATCH] Reorder some parts of the td file to by in alphabetical order git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165590 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Mips/Mips16InstrInfo.td | 139 ++++++++++++++++------------- 1 file changed, 75 insertions(+), 64 deletions(-) diff --git a/lib/Target/Mips/Mips16InstrInfo.td b/lib/Target/Mips/Mips16InstrInfo.td index 77126bb6529..e1c90466fbf 100644 --- a/lib/Target/Mips/Mips16InstrInfo.td +++ b/lib/Target/Mips/Mips16InstrInfo.td @@ -11,69 +11,19 @@ // //===----------------------------------------------------------------------===// // -// This are pseudo formats for multiply -// This first one can be changed to non pseudo now. -//fmul -class FMULT16_ins : - MipsPseudo16<(outs), (ins CPU16Regs:$rx, CPU16Regs:$ry), - !strconcat(asmstr, "\t$rx, $ry"), []>; - -class FMULT16_LO_ins : - MipsPseudo16<(outs CPU16Regs:$rz), (ins CPU16Regs:$rx, CPU16Regs:$ry), - !strconcat(asmstr, "\t$rx, $ry\n\tmflo\t$rz"), []> { - let isCodeGenOnly=1; -} -// -// RRR-type instruction format -// - -class FRRR16_ins _f, string asmstr, InstrItinClass itin> : - FRRR16<_f, (outs CPU16Regs:$rz), (ins CPU16Regs:$rx, CPU16Regs:$ry), - !strconcat(asmstr, "\t$rz, $rx, $ry"), [], itin>; // -// I8_MOVR32 instruction format (used only by the MOVR32 instructio -// -class FI8_MOVR3216_ins: - FI8_MOVR3216<(outs CPU16Regs:$rz), (ins CPURegs:$r32), - !strconcat(asmstr, "\t$rz, $r32"), [], itin>; - -// -// I8_MOV32R instruction format (used only by MOV32R instruction) -// - -class FI8_MOV32R16_ins: - FI8_MOV32R16<(outs CPURegs:$r32), (ins CPU16Regs:$rz), - !strconcat(asmstr, "\t$r32, $rz"), [], itin>; - +// Address operand +def mem16 : Operand { + let PrintMethod = "printMemOperand"; + let MIOperandInfo = (ops CPU16Regs, simm16); + let EncoderMethod = "getMemEncoding"; +} // -// RR-type instruction format +// Assembler formats in alphabetical order. +// Natural and pseudos are mixed together. // - -class FRR16_ins f, string asmstr, InstrItinClass itin> : - FRR16 { -} -class FRR16_M_ins f, string asmstr, - InstrItinClass itin> : - FRR16; - -class FRxRxRy16_ins f, string asmstr, - InstrItinClass itin> : - FRR16 { - let Constraints = "$rx = $rz"; -} - -let rx=0 in -class FRR16_JALRC_RA_only_ins nd_, bits<1> l_, - string asmstr, InstrItinClass itin>: - FRR16_JALRC ; - // // EXT-RI instruction format // @@ -90,7 +40,6 @@ class FEXT_RI16_ins _op, string asmstr, class FEXT_RI16_PC_ins _op, string asmstr, InstrItinClass itin>: FEXT_RI16_ins_base<_op, asmstr, "\t$rx, $$pc, $imm", itin>; - class FEXT_2RI16_ins _op, string asmstr, InstrItinClass itin>: FEXT_RI16<_op, (outs CPU16Regs:$rx), (ins CPU16Regs:$rx_, simm16:$imm), @@ -126,13 +75,75 @@ class FEXT_SHIFT16_ins _f, string asmstr, InstrItinClass itin>: FEXT_SHIFT16<_f, (outs CPU16Regs:$rx), (ins CPU16Regs:$ry, shamt:$sa), !strconcat(asmstr, "\t$rx, $ry, $sa"), [], itin>; + // -// Address operand -def mem16 : Operand { - let PrintMethod = "printMemOperand"; - let MIOperandInfo = (ops CPU16Regs, simm16); - let EncoderMethod = "getMemEncoding"; +// I8_MOVR32 instruction format (used only by the MOVR32 instructio +// +class FI8_MOVR3216_ins: + FI8_MOVR3216<(outs CPU16Regs:$rz), (ins CPURegs:$r32), + !strconcat(asmstr, "\t$rz, $r32"), [], itin>; + +// +// I8_MOV32R instruction format (used only by MOV32R instruction) +// + +class FI8_MOV32R16_ins: + FI8_MOV32R16<(outs CPURegs:$r32), (ins CPU16Regs:$rz), + !strconcat(asmstr, "\t$r32, $rz"), [], itin>; + +// +// This are pseudo formats for multiply +// This first one can be changed to non pseudo now. +// +// MULT +// +class FMULT16_ins : + MipsPseudo16<(outs), (ins CPU16Regs:$rx, CPU16Regs:$ry), + !strconcat(asmstr, "\t$rx, $ry"), []>; + +// +// MULT-LO +// +class FMULT16_LO_ins : + MipsPseudo16<(outs CPU16Regs:$rz), (ins CPU16Regs:$rx, CPU16Regs:$ry), + !strconcat(asmstr, "\t$rx, $ry\n\tmflo\t$rz"), []> { + let isCodeGenOnly=1; +} + +// +// RR-type instruction format +// + +class FRR16_ins f, string asmstr, InstrItinClass itin> : + FRR16 { } +class FRR16_M_ins f, string asmstr, + InstrItinClass itin> : + FRR16; + +class FRxRxRy16_ins f, string asmstr, + InstrItinClass itin> : + FRR16 { + let Constraints = "$rx = $rz"; +} + +let rx=0 in +class FRR16_JALRC_RA_only_ins nd_, bits<1> l_, + string asmstr, InstrItinClass itin>: + FRR16_JALRC ; + +// +// RRR-type instruction format +// + +class FRRR16_ins _f, string asmstr, InstrItinClass itin> : + FRRR16<_f, (outs CPU16Regs:$rz), (ins CPU16Regs:$rx, CPU16Regs:$ry), + !strconcat(asmstr, "\t$rz, $rx, $ry"), [], itin>; // // Some general instruction class info -- 2.34.1