Fix last linking issues
This commit is contained in:
@@ -325,15 +325,18 @@ ExceptionCode GetTLBExceptionCode(TLBError error, TLBAccessType accessType) {
|
||||
|
||||
template<class T>
|
||||
void Cop0::decode(T& cpu, u32 instr) {
|
||||
if constexpr (std::is_same_v<decltype(cpu), Interpreter>()) {
|
||||
decodeInterpreter(cpu.regs, instr);
|
||||
} else if constexpr (std::is_same_v<decltype(cpu), JIT>()) {
|
||||
if constexpr (std::is_same_v<decltype(cpu), Interpreter&>) {
|
||||
decodeInterp(cpu.regs, instr);
|
||||
} else if constexpr (std::is_same_v<decltype(cpu), JIT&>) {
|
||||
decodeJIT(cpu, instr);
|
||||
} else {
|
||||
Util::panic("What the fuck did you just give me?!!");
|
||||
}
|
||||
}
|
||||
|
||||
template void Cop0::decode<Interpreter>(Interpreter&, u32);
|
||||
template void Cop0::decode<JIT>(JIT&, u32);
|
||||
|
||||
void Cop0::decodeJIT(JIT& cpu, u32 instr) {
|
||||
|
||||
}
|
||||
|
||||
@@ -17,15 +17,18 @@ void Cop1::Reset() {
|
||||
|
||||
template <class T>
|
||||
void Cop1::decode(T& cpu, u32 instr) {
|
||||
if constexpr (std::is_same_v<decltype(cpu), Interpreter>()) {
|
||||
if constexpr (std::is_same_v<decltype(cpu), Interpreter&>) {
|
||||
decodeInterp(cpu, instr);
|
||||
} else if constexpr (std::is_same_v<decltype(cpu), JIT>()) {
|
||||
} else if constexpr (std::is_same_v<decltype(cpu), JIT&>) {
|
||||
decodeJIT(cpu, instr);
|
||||
} else {
|
||||
Util::panic("What the fuck did you just give me?!");
|
||||
}
|
||||
}
|
||||
|
||||
template void Cop1::decode<Interpreter>(Interpreter&, u32);
|
||||
template void Cop1::decode<JIT>(JIT&, u32);
|
||||
|
||||
void Cop1::decodeInterp(Interpreter &cpu, u32 instr) {
|
||||
Registers ®s = cpu.regs;
|
||||
if(!regs.cop0.status.cu1) {
|
||||
|
||||
@@ -203,10 +203,18 @@ private:
|
||||
void swc1Interp(Registers&, Mem&, u32);
|
||||
void ldc1Interp(Registers&, Mem&, u32);
|
||||
void sdc1Interp(Registers&, Mem&, u32);
|
||||
void lwc1JIT(JIT&, Mem&, u32);
|
||||
void swc1JIT(JIT&, Mem&, u32);
|
||||
void ldc1JIT(JIT&, Mem&, u32);
|
||||
void sdc1JIT(JIT&, Mem&, u32);
|
||||
void lwc1JIT(JIT&, Mem&, u32) {
|
||||
Util::panic("[JIT]: lwc1 not implemented!");
|
||||
}
|
||||
void swc1JIT(JIT&, Mem&, u32) {
|
||||
Util::panic("[JIT]: swc1 not implemented!");
|
||||
}
|
||||
void ldc1JIT(JIT&, Mem&, u32) {
|
||||
Util::panic("[JIT]: ldc1 not implemented!");
|
||||
}
|
||||
void sdc1JIT(JIT&, Mem&, u32) {
|
||||
Util::panic("[JIT]: sdc1 not implemented!");
|
||||
}
|
||||
void mfc1(Registers&, u32 instr);
|
||||
void dmfc1(Registers&, u32 instr);
|
||||
void mtc1(Registers&, u32 instr);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include <core/registers/Cop1.hpp>
|
||||
#include <core/registers/Registers.hpp>
|
||||
#include <core/Interpreter.hpp>
|
||||
#include <core/JIT.hpp>
|
||||
#include <core/Mem.hpp>
|
||||
#include <cmath>
|
||||
#include <cfenv>
|
||||
@@ -445,48 +447,60 @@ void Cop1::floorwd(Registers& regs, u32 instr) {
|
||||
|
||||
template<class T>
|
||||
void Cop1::lwc1(T &cpu, Mem &mem, u32 instr) {
|
||||
if constexpr(std::is_same_v<decltype(cpu), Interpreter>()) {
|
||||
if constexpr(std::is_same_v<decltype(cpu), Interpreter&>) {
|
||||
lwc1Interp(cpu.regs, mem, instr);
|
||||
} else if(std::is_same_v<decltype(cpu), JIT>()) {
|
||||
} else if constexpr (std::is_same_v<decltype(cpu), JIT&>) {
|
||||
lwc1JIT(cpu, mem, instr);
|
||||
} else {
|
||||
Util::panic("What the fuck did you just give me?!!");
|
||||
}
|
||||
}
|
||||
|
||||
template void Cop1::lwc1<Interpreter>(Interpreter&, Mem&, u32);
|
||||
template void Cop1::lwc1<JIT>(JIT&, Mem&, u32);
|
||||
|
||||
template<class T>
|
||||
void Cop1::swc1(T &cpu, Mem &mem, u32 instr) {
|
||||
if constexpr(std::is_same_v<decltype(cpu), Interpreter>()) {
|
||||
if constexpr(std::is_same_v<decltype(cpu), Interpreter&>) {
|
||||
swc1Interp(cpu.regs, mem, instr);
|
||||
} else if(std::is_same_v<decltype(cpu), JIT>()) {
|
||||
} else if constexpr (std::is_same_v<decltype(cpu), JIT&>) {
|
||||
swc1JIT(cpu, mem, instr);
|
||||
} else {
|
||||
Util::panic("What the fuck did you just give me?!!");
|
||||
}
|
||||
}
|
||||
|
||||
template void Cop1::swc1<Interpreter>(Interpreter&, Mem&, u32);
|
||||
template void Cop1::swc1<JIT>(JIT&, Mem&, u32);
|
||||
|
||||
template<class T>
|
||||
void Cop1::ldc1(T &cpu, Mem &mem, u32 instr) {
|
||||
if constexpr(std::is_same_v<decltype(cpu), Interpreter>()) {
|
||||
if constexpr(std::is_same_v<decltype(cpu), Interpreter&>) {
|
||||
ldc1Interp(cpu.regs, mem, instr);
|
||||
} else if(std::is_same_v<decltype(cpu), JIT>()) {
|
||||
} else if constexpr (std::is_same_v<decltype(cpu), JIT&>) {
|
||||
ldc1JIT(cpu, mem, instr);
|
||||
} else {
|
||||
Util::panic("What the fuck did you just give me?!!");
|
||||
}
|
||||
}
|
||||
|
||||
template void Cop1::ldc1<Interpreter>(Interpreter&, Mem&, u32);
|
||||
template void Cop1::ldc1<JIT>(JIT&, Mem&, u32);
|
||||
|
||||
template<class T>
|
||||
void Cop1::sdc1(T &cpu, Mem &mem, u32 instr) {
|
||||
if constexpr(std::is_same_v<decltype(cpu), Interpreter>()) {
|
||||
if constexpr(std::is_same_v<decltype(cpu), Interpreter&>) {
|
||||
sdc1Interp(cpu.regs, mem, instr);
|
||||
} else if(std::is_same_v<decltype(cpu), JIT>()) {
|
||||
} else if constexpr (std::is_same_v<decltype(cpu), JIT&>) {
|
||||
sdc1JIT(cpu, mem, instr);
|
||||
} else {
|
||||
Util::panic("What the fuck did you just give me?!!");
|
||||
}
|
||||
}
|
||||
|
||||
template void Cop1::sdc1<Interpreter>(Interpreter&, Mem&, u32);
|
||||
template void Cop1::sdc1<JIT>(JIT&, Mem&, u32);
|
||||
|
||||
void Cop1::lwc1Interp(Registers& regs, Mem& mem, u32 instr) {
|
||||
if(!regs.cop0.status.cu1) {
|
||||
FireException(regs, ExceptionCode::CoprocessorUnusable, 1, true);
|
||||
|
||||
Reference in New Issue
Block a user