summaryrefslogtreecommitdiff
path: root/lib/Target/Mips/Mips16InstrInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/Mips/Mips16InstrInfo.h')
-rw-r--r--lib/Target/Mips/Mips16InstrInfo.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Target/Mips/Mips16InstrInfo.h b/lib/Target/Mips/Mips16InstrInfo.h
index 26a5a5e5fb..f8570bdc27 100644
--- a/lib/Target/Mips/Mips16InstrInfo.h
+++ b/lib/Target/Mips/Mips16InstrInfo.h
@@ -86,6 +86,18 @@ public:
MachineBasicBlock::iterator II, DebugLoc DL,
unsigned &NewImm) const;
+ static bool validSpImm8(int offset) {
+ return ((offset & 7) == 0) && isInt<11>(offset);
+ }
+
+ //
+ // build the proper one based on the Imm field
+ //
+ void BuildAddiuSpImm(MachineBasicBlock &MBB,
+ MachineBasicBlock::iterator II, DebugLoc DL,
+ int64_t Imm) const;
+
+
private:
virtual unsigned GetAnalyzableBrOpc(unsigned Opc) const;