Index: src/IceInstMIPS32.cpp |
diff --git a/src/IceInstMIPS32.cpp b/src/IceInstMIPS32.cpp |
index c83267d11166c748e01b80cbba755cc0903e9ab2..95253e31264b3c99954be5e74b2fb819534f4c4a 100644 |
--- a/src/IceInstMIPS32.cpp |
+++ b/src/IceInstMIPS32.cpp |
@@ -648,17 +648,9 @@ void InstMIPS32Mov::emitIAS(const Cfg *Func) const { |
// reg to reg |
if (DestIsReg && SrcIsReg) { |
- switch (Dest->getType()) { |
- default: |
- break; |
- case IceType_i1: |
- case IceType_i8: |
- case IceType_i16: |
- case IceType_i32: |
- auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
- Asm->move(getDest(), getSrc(0)); |
- return; |
- } |
+ auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
+ Asm->move(getDest(), getSrc(0)); |
+ return; |
} |
llvm_unreachable("Not yet implemented"); |
} |
@@ -786,6 +778,96 @@ void InstMIPS32Mov::emitSingleDestSingleSource(const Cfg *Func) const { |
llvm::report_fatal_error("Invalid mov instruction. Dest or Src is memory."); |
} |
+template <> void InstMIPS32Abs_d::emitIAS(const Cfg *Func) const { |
+ auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
+ Asm->abs_d(getDest(), getSrc(0)); |
+} |
+ |
+template <> void InstMIPS32Abs_s::emitIAS(const Cfg *Func) const { |
+ auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
+ Asm->abs_s(getDest(), getSrc(0)); |
+} |
+ |
+template <> void InstMIPS32Add_d::emitIAS(const Cfg *Func) const { |
+ auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
+ Asm->add_d(getDest(), getSrc(0), getSrc(1)); |
+} |
+ |
+template <> void InstMIPS32Add_s::emitIAS(const Cfg *Func) const { |
+ auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
+ Asm->add_s(getDest(), getSrc(0), getSrc(1)); |
+} |
+ |
+template <> void InstMIPS32Div_d::emitIAS(const Cfg *Func) const { |
+ auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
+ Asm->div_d(getDest(), getSrc(0), getSrc(1)); |
+} |
+ |
+template <> void InstMIPS32Div_s::emitIAS(const Cfg *Func) const { |
+ auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
+ Asm->div_s(getDest(), getSrc(0), getSrc(1)); |
+} |
+ |
+template <> void InstMIPS32Mov_d::emitIAS(const Cfg *Func) const { |
+ auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
+ Asm->mov_d(getDest(), getSrc(0)); |
+} |
+ |
+template <> void InstMIPS32Mov_s::emitIAS(const Cfg *Func) const { |
+ auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
+ Asm->mov_s(getDest(), getSrc(0)); |
+} |
+ |
+template <> void InstMIPS32Movn_d::emitIAS(const Cfg *Func) const { |
+ auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
+ Asm->movn_d(getDest(), getSrc(0), getSrc(1)); |
+} |
+ |
+template <> void InstMIPS32Movn_s::emitIAS(const Cfg *Func) const { |
+ auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
+ Asm->movn_s(getDest(), getSrc(0), getSrc(1)); |
+} |
+ |
+template <> void InstMIPS32Movz_d::emitIAS(const Cfg *Func) const { |
+ auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
+ Asm->movz_d(getDest(), getSrc(0), getSrc(1)); |
+} |
+ |
+template <> void InstMIPS32Movz_s::emitIAS(const Cfg *Func) const { |
+ auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
+ Asm->movz_s(getDest(), getSrc(0), getSrc(1)); |
+} |
+ |
+template <> void InstMIPS32Mul_d::emitIAS(const Cfg *Func) const { |
+ auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
+ Asm->mul_d(getDest(), getSrc(0), getSrc(1)); |
+} |
+ |
+template <> void InstMIPS32Mul_s::emitIAS(const Cfg *Func) const { |
+ auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
+ Asm->mul_s(getDest(), getSrc(0), getSrc(1)); |
+} |
+ |
+template <> void InstMIPS32Sqrt_d::emitIAS(const Cfg *Func) const { |
+ auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
+ Asm->sqrt_d(getDest(), getSrc(0)); |
+} |
+ |
+template <> void InstMIPS32Sqrt_s::emitIAS(const Cfg *Func) const { |
+ auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
+ Asm->sqrt_s(getDest(), getSrc(0)); |
+} |
+ |
+template <> void InstMIPS32Sub_d::emitIAS(const Cfg *Func) const { |
+ auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
+ Asm->sub_d(getDest(), getSrc(0), getSrc(1)); |
+} |
+ |
+template <> void InstMIPS32Sub_s::emitIAS(const Cfg *Func) const { |
+ auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
+ Asm->sub_s(getDest(), getSrc(0), getSrc(1)); |
+} |
+ |
template <> void InstMIPS32Addiu::emitIAS(const Cfg *Func) const { |
auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
Asm->addiu(getDest(), getSrc(0), Imm); |