summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReed Kotler <rkotler@mips.com>2013-02-23 23:37:03 +0000
committerReed Kotler <rkotler@mips.com>2013-02-23 23:37:03 +0000
commit80070bd439585ee8d267d2e1c61e4af4ada0be7f (patch)
treeacd0c408c13da7fbd808924326d82074e809a03d
parente6907bc0e6ab9dcd11eccdd14fcc1168a815b98c (diff)
downloadbcm5719-llvm-80070bd439585ee8d267d2e1c61e4af4ada0be7f.tar.gz
bcm5719-llvm-80070bd439585ee8d267d2e1c61e4af4ada0be7f.zip
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
-rw-r--r--llvm/lib/Target/Mips/Mips16InstrInfo.td15
1 files changed, 10 insertions, 5 deletions
diff --git a/llvm/lib/Target/Mips/Mips16InstrInfo.td b/llvm/lib/Target/Mips/Mips16InstrInfo.td
index 2cb1573e1d5..1a50faff11e 100644
--- a/llvm/lib/Target/Mips/Mips16InstrInfo.td
+++ b/llvm/lib/Target/Mips/Mips16InstrInfo.td
@@ -283,6 +283,11 @@ class FRR16_ins<bits<5> f, string asmstr, InstrItinClass itin> :
!strconcat(asmstr, "\t$rx, $ry"), [], itin> {
}
+class FRR16R_ins<bits<5> f, string asmstr, InstrItinClass itin> :
+ FRR16<f, (outs), (ins CPU16Regs:$rx, CPU16Regs:$ry),
+ !strconcat(asmstr, "\t$rx, $ry"), [], itin> {
+}
+
class FRRTR16_ins<string asmstr> :
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];
}
OpenPOWER on IntegriCloud