summaryrefslogtreecommitdiff
path: root/lib/Target/Mips/Mips16InstrInfo.td
diff options
context:
space:
mode:
authorReed Kotler <rkotler@mips.com>2013-02-19 00:20:58 +0000
committerReed Kotler <rkotler@mips.com>2013-02-19 00:20:58 +0000
commitf80167520740cbd9b73ead4fa524533532c5538e (patch)
tree07ffbb0ac495f1e47ff3a6f10af9ca2ef1fc4831 /lib/Target/Mips/Mips16InstrInfo.td
parent56f58ad0e415fcc390cdd4f891e6bf936f0dcf53 (diff)
downloadllvm-f80167520740cbd9b73ead4fa524533532c5538e.tar.gz
llvm-f80167520740cbd9b73ead4fa524533532c5538e.tar.bz2
llvm-f80167520740cbd9b73ead4fa524533532c5538e.tar.xz
Expand pseudos BteqzT8CmpiX16 and BtnezT8CmpiX16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175474 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/Mips16InstrInfo.td')
-rw-r--r--lib/Target/Mips/Mips16InstrInfo.td27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/Target/Mips/Mips16InstrInfo.td b/lib/Target/Mips/Mips16InstrInfo.td
index c7adce3a5b..1a5c30b57a 100644
--- a/lib/Target/Mips/Mips16InstrInfo.td
+++ b/lib/Target/Mips/Mips16InstrInfo.td
@@ -51,6 +51,15 @@ class FI816_SP_ins<bits<3> _func, string asmstr,
//
+class FRI16_ins_base<bits<5> op, string asmstr, string asmstr2,
+ InstrItinClass itin>:
+ FRI16<op, (outs CPU16Regs:$rx), (ins simm16:$imm),
+ !strconcat(asmstr, asmstr2), [], itin>;
+
+class FRI16_ins<bits<5> op, string asmstr,
+ InstrItinClass itin>:
+ FRI16_ins_base<op, asmstr, "\t$rx, $imm \t# 16 bit inst", itin>;
+
class F2RI16_ins<bits<5> _op, string asmstr,
InstrItinClass itin>:
FRI16<_op, (outs CPU16Regs:$rx), (ins CPU16Regs:$rx_, simm16:$imm),
@@ -565,6 +574,24 @@ def CmpRxRy16: FRR16_ins<0b01010, "cmp", IIAlu> {
let Defs = [T8];
}
+//
+// Format: CMPI rx, immediate MIPS16e
+// Purpose: Compare Immediate
+// To compare a constant with the contents of a GPR.
+//
+def CmpiRxImm16: FRI16_ins<0b01110, "cmpi", IIAlu> {
+ let Defs = [T8];
+}
+
+//
+// Format: CMPI rx, immediate MIPS16e
+// Purpose: Compare Immediate (Extended)
+// To compare a constant with the contents of a GPR.
+//
+def CmpiRxImmX16: FEXT_RI16_ins<0b01110, "cmpi", IIAlu> {
+ let Defs = [T8];
+}
+
//
// Format: DIV rx, ry MIPS16e