[PATCH] D16182: [mips][microMIPS][DSP] Implement BALIGN, BITREV, BPOSGE32, CMP*, CMPGDU*, CMPGU* and CMPU* instructions
Simon Dardis via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 25 03:14:19 PDT 2016
sdardis added a subscriber: sdardis.
sdardis requested changes to this revision.
sdardis added a reviewer: sdardis.
This revision now requires changes to proceed.
================
Comment at: lib/Target/Mips/MicroMipsDSPInstrFormats.td:279
@@ +278,3 @@
+
+class POOL32_3RB0POOL_FMT<string opstr, bits<6> pool, bits<10> op>
+ : MMDSPInst<opstr> {
----------------
Pool occurs twice in the name of this class, is the second mention necessary?
================
Comment at: lib/Target/Mips/MicroMipsDSPInstrInfo.td:392-404
@@ -370,1 +391,15 @@
+class BALIGN_MM_R2_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
+ Operand ImmOp, SDPatternOperator Imm,
+ InstrItinClass itin> {
+ dag OutOperandList = (outs GPR32Opnd:$rt);
+ dag InOperandList = (ins GPR32Opnd:$rs, ImmOp:$bp, GPR32Opnd:$src);
+ string AsmString = !strconcat(instr_asm, "\t$rt, $rs, $bp");
+ list<dag> Pattern = [(set GPR32Opnd:$rt,
+ (OpNode GPR32Opnd:$src, GPR32Opnd:$rs, Imm:$bp))];
+ InstrItinClass Itinerary = itin;
+ string Constraints = "$src = $rt";
+}
+
+class BALIGN_MMR2_DESC : BALIGN_MM_R2_DESC_BASE<"balign", int_mips_balign,
+ uimm2, immZExt2, NoItinerary>;
----------------
Can the DESC_BASE be turned into a parameterless class? BALIGN_MMR2_DESC seems to be the only class using the description BASE.
================
Comment at: lib/Target/Mips/MipsDSPInstrInfo.td:1230-1232
@@ -1226,5 +1229,5 @@
def SUBU_S_PH : DspMMRel, SUBU_S_PH_ENC, SUBU_S_PH_DESC, ISA_DSPR2;
-def CMPGDU_EQ_QB : CMPGDU_EQ_QB_ENC, CMPGDU_EQ_QB_DESC, ISA_DSPR2;
-def CMPGDU_LT_QB : CMPGDU_LT_QB_ENC, CMPGDU_LT_QB_DESC, ISA_DSPR2;
-def CMPGDU_LE_QB : CMPGDU_LE_QB_ENC, CMPGDU_LE_QB_DESC, ISA_DSPR2;
+def CMPGDU_EQ_QB : DspMMRel, CMPGDU_EQ_QB_ENC, CMPGDU_EQ_QB_DESC;
+def CMPGDU_LT_QB : DspMMRel, CMPGDU_LT_QB_ENC, CMPGDU_LT_QB_DESC;
+def CMPGDU_LE_QB : DspMMRel, CMPGDU_LE_QB_ENC, CMPGDU_LE_QB_DESC;
def ABSQ_S_QB : DspMMRel, ABSQ_S_QB_ENC, ABSQ_S_QB_DESC, ISA_DSPR2;
----------------
Why was ISA_DSPR2 removed? These instructions are only defined for DSP revision 2.
================
Comment at: lib/Target/Mips/MipsDSPInstrInfo.td:1270
@@ -1266,3 +1269,3 @@
def APPEND : APPEND_ENC, APPEND_DESC, ISA_DSPR2;
-def BALIGN : BALIGN_ENC, BALIGN_DESC, ISA_DSPR2;
+def BALIGN : DspMMRel, BALIGN_ENC, BALIGN_DESC;
def PREPEND : DspMMRel, PREPEND_ENC, PREPEND_DESC, ISA_DSPR2;
----------------
Same here, this instruction is defined for DSP revision 2.
http://reviews.llvm.org/D16182
More information about the llvm-commits
mailing list