summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorReed Kotler <rkotler@mips.com>2013-02-19 03:56:57 +0000
committerReed Kotler <rkotler@mips.com>2013-02-19 03:56:57 +0000
commit3e457f505e69286ab5d0c7980deab0302cc32def (patch)
treea9a6cb3fe8c70f30e966663f98831934b7dc3862 /llvm/lib/Target
parentac820845633f9a09415abb3b65dd51ffc2359a08 (diff)
downloadbcm5719-llvm-3e457f505e69286ab5d0c7980deab0302cc32def.tar.gz
bcm5719-llvm-3e457f505e69286ab5d0c7980deab0302cc32def.zip
Expand pseudos/macros BteqzT8SltiX16, BteqzT8SltiuX16,
BtnezT8SltiX16, BtnezT8SltiuX16 . llvm-svn: 175486
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/Mips/Mips16InstrInfo.cpp17
-rw-r--r--llvm/lib/Target/Mips/Mips16InstrInfo.td32
2 files changed, 48 insertions, 1 deletions
diff --git a/llvm/lib/Target/Mips/Mips16InstrInfo.cpp b/llvm/lib/Target/Mips/Mips16InstrInfo.cpp
index b6194390c8a..22cb9638bc6 100644
--- a/llvm/lib/Target/Mips/Mips16InstrInfo.cpp
+++ b/llvm/lib/Target/Mips/Mips16InstrInfo.cpp
@@ -132,7 +132,6 @@ loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,
bool Mips16InstrInfo::expandPostRAPseudo(MachineBasicBlock::iterator MI) const {
MachineBasicBlock &MBB = *MI->getParent();
-
switch(MI->getDesc().getOpcode()) {
default:
return false;
@@ -146,11 +145,19 @@ bool Mips16InstrInfo::expandPostRAPseudo(MachineBasicBlock::iterator MI) const {
case Mips::BteqzT8SltX16:
ExpandFEXT_T8I816_ins(MBB, MI, Mips::BteqzX16, Mips::SltRxRy16);
break;
+ case Mips::BteqzT8SltiX16:
+ ExpandFEXT_T8I8I16_ins(MBB, MI, Mips::BteqzX16,
+ Mips::SltiRxImm16, Mips::SltiRxImmX16);
+ break;
case Mips::BteqzT8SltuX16:
// TBD: figure out a way to get this or remove the instruction
// altogether.
ExpandFEXT_T8I816_ins(MBB, MI, Mips::BteqzX16, Mips::SltuRxRy16);
break;
+ case Mips::BteqzT8SltiuX16:
+ ExpandFEXT_T8I8I16_ins(MBB, MI, Mips::BteqzX16,
+ Mips::SltiuRxImm16, Mips::SltiuRxImmX16);
+ break;
case Mips::BtnezT8CmpX16:
ExpandFEXT_T8I816_ins(MBB, MI, Mips::BtnezX16, Mips::CmpRxRy16);
break;
@@ -161,11 +168,19 @@ bool Mips16InstrInfo::expandPostRAPseudo(MachineBasicBlock::iterator MI) const {
case Mips::BtnezT8SltX16:
ExpandFEXT_T8I816_ins(MBB, MI, Mips::BtnezX16, Mips::SltRxRy16);
break;
+ case Mips::BtnezT8SltiX16:
+ ExpandFEXT_T8I8I16_ins(MBB, MI, Mips::BtnezX16,
+ Mips::SltiRxImm16, Mips::SltiRxImmX16);
+ break;
case Mips::BtnezT8SltuX16:
// TBD: figure out a way to get this or remove the instruction
// altogether.
ExpandFEXT_T8I816_ins(MBB, MI, Mips::BtnezX16, Mips::SltuRxRy16);
break;
+ case Mips::BtnezT8SltiuX16:
+ ExpandFEXT_T8I8I16_ins(MBB, MI, Mips::BtnezX16,
+ Mips::SltiuRxImm16, Mips::SltiuRxImmX16);
+ break;
case Mips::RetRA16:
ExpandRetRA16(MBB, MI, Mips::JrcRa16);
break;
diff --git a/llvm/lib/Target/Mips/Mips16InstrInfo.td b/llvm/lib/Target/Mips/Mips16InstrInfo.td
index 1a5c30b57a8..0d90df41fe6 100644
--- a/llvm/lib/Target/Mips/Mips16InstrInfo.td
+++ b/llvm/lib/Target/Mips/Mips16InstrInfo.td
@@ -1012,13 +1012,45 @@ def SllX16: FEXT_SHIFT16_ins<0b00, "sll", IIAlu>;
//
def SllvRxRy16 : FRxRxRy16_ins<0b00100, "sllv", IIAlu>;
+// Format: SLTI rx, immediate MIPS16e
+// Purpose: Set on Less Than Immediate
+// To record the result of a less-than comparison with a constant.
+//
+//
+def SltiRxImm16: FRI16_ins<0b01010, "slti", IIAlu> {
+ let Defs = [T8];
+}
+
//
// Format: SLTI rx, immediate MIPS16e
// Purpose: Set on Less Than Immediate (Extended)
// To record the result of a less-than comparison with a constant.
//
+//
+def SltiRxImmX16: FEXT_RI16_ins<0b01010, "slti", IIAlu> {
+ let Defs = [T8];
+}
+
def SltiCCRxImmX16: FEXT_CCRXI16_ins<"slti">;
+// Format: SLTIU rx, immediate MIPS16e
+// Purpose: Set on Less Than Immediate Unsigned
+// To record the result of a less-than comparison with a constant.
+//
+//
+def SltiuRxImm16: FRI16_ins<0b01011, "sltiu", IIAlu> {
+ let Defs = [T8];
+}
+
+//
+// Format: SLTI rx, immediate MIPS16e
+// Purpose: Set on Less Than Immediate Unsigned (Extended)
+// To record the result of a less-than comparison with a constant.
+//
+//
+def SltiuRxImmX16: FEXT_RI16_ins<0b01011, "sltiu", IIAlu> {
+ let Defs = [T8];
+}
//
// Format: SLTIU rx, immediate MIPS16e
// Purpose: Set on Less Than Immediate Unsigned (Extended)
OpenPOWER on IntegriCloud