summaryrefslogtreecommitdiff
path: root/lib/Target/Mips/MipsSEInstrInfo.h
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2012-08-23 00:21:05 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2012-08-23 00:21:05 +0000
commitfc4eafa0f490bd06d8191a2f007514b9e3ce0387 (patch)
tree3ba47dec32b4f29ed8b80df2b2ddb55186892f38 /lib/Target/Mips/MipsSEInstrInfo.h
parent91a35f03da446009cd1de4cdabaa1cdec7e74e0c (diff)
downloadllvm-fc4eafa0f490bd06d8191a2f007514b9e3ce0387.tar.gz
llvm-fc4eafa0f490bd06d8191a2f007514b9e3ce0387.tar.bz2
llvm-fc4eafa0f490bd06d8191a2f007514b9e3ce0387.tar.xz
Make function loadImmediate a member of MipsSEInstrInfo and change it to return
the temporary register that was used to load the immediate. Currently, it always returns register $at, but this will change if, in the future, we decide to use another register. No changes in functionality. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162417 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsSEInstrInfo.h')
-rw-r--r--lib/Target/Mips/MipsSEInstrInfo.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Target/Mips/MipsSEInstrInfo.h b/lib/Target/Mips/MipsSEInstrInfo.h
index 346e74dba4..55b78b2cfb 100644
--- a/lib/Target/Mips/MipsSEInstrInfo.h
+++ b/lib/Target/Mips/MipsSEInstrInfo.h
@@ -15,7 +15,6 @@
#define MIPSSEINSTRUCTIONINFO_H
#include "MipsInstrInfo.h"
-#include "MipsAnalyzeImmediate.h"
#include "MipsSERegisterInfo.h"
namespace llvm {
@@ -70,6 +69,13 @@ public:
void adjustStackPtr(unsigned SP, int64_t Amount, MachineBasicBlock &MBB,
MachineBasicBlock::iterator I) const;
+ /// Emit a series of instructions to load an immediate. If NewImm is a
+ /// non-NULL parameter, the last instruction is not emitted, but instead
+ /// its immediate operand is returned in NewImm.
+ unsigned loadImmediate(int64_t Imm, MachineBasicBlock &MBB,
+ MachineBasicBlock::iterator II, DebugLoc DL,
+ unsigned *NewImm) const;
+
private:
virtual unsigned GetAnalyzableBrOpc(unsigned Opc) const;