Index: src/IceInstMIPS32.cpp |
diff --git a/src/IceInstMIPS32.cpp b/src/IceInstMIPS32.cpp |
index bca00ba147dc98eae7caa73d9d7d2fb1ae7d74d6..2c3333dbce121fcdfc3e8a4a351e94a111f773ad 100644 |
--- a/src/IceInstMIPS32.cpp |
+++ b/src/IceInstMIPS32.cpp |
@@ -900,6 +900,13 @@ template <> void InstMIPS32Div_s::emitIAS(const Cfg *Func) const { |
Asm->div_s(getDest(), getSrc(0), getSrc(1)); |
} |
+template <> void InstMIPS32Lui::emitIAS(const Cfg *Func) const { |
Jim Stichnoth
2016/09/27 04:20:32
This specialization also needs to be declared in t
obucinac
2016/09/27 14:22:01
Done.
|
+ auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
+ auto *C32 = llvm::dyn_cast<ConstantInteger32>(getSrc(0)); |
+ uint16_t Imm = static_cast<uint16_t>(C32->getValue()); |
+ Asm->lui(getDest(), Imm); |
+} |
+ |
template <> void InstMIPS32Lw::emitIAS(const Cfg *Func) const { |
auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
auto *Mem = llvm::dyn_cast<OperandMIPS32Mem>(getSrc(0)); |