diff options
Diffstat (limited to 'backend/src/ir/instruction.cpp')
-rw-r--r-- | backend/src/ir/instruction.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/backend/src/ir/instruction.cpp b/backend/src/ir/instruction.cpp index a9156ffe..48590fd1 100644 --- a/backend/src/ir/instruction.cpp +++ b/backend/src/ir/instruction.cpp @@ -833,6 +833,9 @@ namespace ir { INLINE Immediate getImmediate(const Function &fn) const { return fn.getImmediate(immediateIndex); } + INLINE void setImmediateIndex(ImmediateIndex immIndex) { + immediateIndex = immIndex; + } INLINE Type getType(void) const { return this->type; } bool wellFormed(const Function &fn, std::string &why) const; INLINE void out(std::ostream &out, const Function &fn) const; @@ -2445,6 +2448,10 @@ DECL_MEM_FN(MemInstruction, void, setBtiReg(Register reg), setBtiReg(reg)) return reinterpret_cast<const internal::LoadImmInstruction*>(this)->getImmediate(fn); } + void LoadImmInstruction::setImmediateIndex(ImmediateIndex immIndex) { + reinterpret_cast<internal::LoadImmInstruction*>(this)->setImmediateIndex(immIndex); + } + /////////////////////////////////////////////////////////////////////////// // Implements the emission functions /////////////////////////////////////////////////////////////////////////// |