From 80070bd439585ee8d267d2e1c61e4af4ada0be7f Mon Sep 17 00:00:00 2001 From: Reed Kotler Date: Sat, 23 Feb 2013 23:37:03 +0000 Subject: [PATCH] Add new base instruction def for cmpi, cmp, slt and sltu so that def/uses proper. Fixed this already a few days ago for slti. llvm-svn: 175975 --- llvm/lib/Target/Mips/Mips16InstrInfo.td | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/llvm/lib/Target/Mips/Mips16InstrInfo.td b/llvm/lib/Target/Mips/Mips16InstrInfo.td index 2cb1573..1a50faf 100644 --- a/llvm/lib/Target/Mips/Mips16InstrInfo.td +++ b/llvm/lib/Target/Mips/Mips16InstrInfo.td @@ -283,6 +283,11 @@ class FRR16_ins f, string asmstr, InstrItinClass itin> : !strconcat(asmstr, "\t$rx, $ry"), [], itin> { } +class FRR16R_ins f, string asmstr, InstrItinClass itin> : + FRR16 { +} + class FRRTR16_ins : MipsPseudo16<(outs CPU16Regs:$rz), (ins CPU16Regs:$rx, CPU16Regs:$ry), !strconcat(asmstr, "\t$rx, $ry\n\tmove\t$rz, $$t8"), []> ; @@ -610,7 +615,7 @@ def BtnezT8SltiuX16: FEXT_T8I8I16_ins<"btnez", "sltiu">, // Purpose: Compare // To compare the contents of two GPRs. // -def CmpRxRy16: FRR16_ins<0b01010, "cmp", IIAlu> { +def CmpRxRy16: FRR16R_ins<0b01010, "cmp", IIAlu> { let Defs = [T8]; } @@ -619,7 +624,7 @@ def CmpRxRy16: FRR16_ins<0b01010, "cmp", IIAlu> { // Purpose: Compare Immediate // To compare a constant with the contents of a GPR. // -def CmpiRxImm16: FRI16_ins<0b01110, "cmpi", IIAlu> { +def CmpiRxImm16: FRI16R_ins<0b01110, "cmpi", IIAlu> { let Defs = [T8]; } @@ -628,7 +633,7 @@ def CmpiRxImm16: FRI16_ins<0b01110, "cmpi", IIAlu> { // Purpose: Compare Immediate (Extended) // To compare a constant with the contents of a GPR. // -def CmpiRxImmX16: FEXT_RI16_ins<0b01110, "cmpi", IIAlu> { +def CmpiRxImmX16: FEXT_RI16R_ins<0b01110, "cmpi", IIAlu> { let Defs = [T8]; } @@ -1110,7 +1115,7 @@ def SltiuCCRxImmX16: FEXT_CCRXI16_ins<"sltiu">; // Purpose: Set on Less Than // To record the result of a less-than comparison. // -def SltRxRy16: FRR16_ins<0b00010, "slt", IIAlu>{ +def SltRxRy16: FRR16R_ins<0b00010, "slt", IIAlu>{ let Defs = [T8]; } @@ -1120,7 +1125,7 @@ def SltCCRxRy16: FCCRR16_ins<"slt">; // Purpose: Set on Less Than Unsigned // To record the result of an unsigned less-than comparison. // -def SltuRxRy16: FRR16_ins<0b00011, "sltu", IIAlu>{ +def SltuRxRy16: FRR16R_ins<0b00011, "sltu", IIAlu>{ let Defs = [T8]; } -- 2.7.4