Refactor Cop1 pt.2 + fix build
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
file(GLOB_RECURSE SOURCES *.cpp)
|
||||
file(GLOB_RECURSE HEADERS *.hpp)
|
||||
|
||||
find_package(SDL2 REQUIRED)
|
||||
|
||||
add_library(mmio ${SOURCES} ${HEADERS} ../../../../external/cic_nus_6105/n64_cic_nus_6105.cpp)
|
||||
|
||||
target_link_libraries(mmio PRIVATE SDL2::SDL2)
|
||||
add_library(mmio ${SOURCES} ${HEADERS} ../../../../external/cic_nus_6105/n64_cic_nus_6105.cpp)
|
||||
@@ -915,9 +915,8 @@ void Cop1::truncld(u32 instr) {
|
||||
template<class T>
|
||||
void Cop1::lwc1(T &cpu, Mem &mem, u32 instr) {
|
||||
if constexpr(std::is_same_v<decltype(cpu), Interpreter&>) {
|
||||
Registers& regs = cpu.regs;
|
||||
CheckFPUUsable_PreserveCause();
|
||||
lwc1Interp(cpu.regs, mem, instr);
|
||||
lwc1Interp(mem, instr);
|
||||
} else if constexpr (std::is_same_v<decltype(cpu), JIT&>) {
|
||||
lwc1JIT(cpu, mem, instr);
|
||||
} else {
|
||||
@@ -931,9 +930,8 @@ 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&>) {
|
||||
Registers& regs = cpu.regs;
|
||||
CheckFPUUsable_PreserveCause();
|
||||
swc1Interp(cpu.regs, mem, instr);
|
||||
swc1Interp(mem, instr);
|
||||
} else if constexpr (std::is_same_v<decltype(cpu), JIT&>) {
|
||||
swc1JIT(cpu, mem, instr);
|
||||
} else {
|
||||
@@ -947,9 +945,8 @@ 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&>) {
|
||||
Registers& regs = cpu.regs;
|
||||
CheckFPUUsable_PreserveCause();
|
||||
ldc1Interp(cpu.regs, mem, instr);
|
||||
ldc1Interp(mem, instr);
|
||||
} else if constexpr (std::is_same_v<decltype(cpu), JIT&>) {
|
||||
ldc1JIT(cpu, mem, instr);
|
||||
} else {
|
||||
@@ -963,9 +960,8 @@ 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&>) {
|
||||
Registers& regs = cpu.regs;
|
||||
CheckFPUUsable_PreserveCause();
|
||||
sdc1Interp(cpu.regs, mem, instr);
|
||||
sdc1Interp(mem, instr);
|
||||
} else if constexpr (std::is_same_v<decltype(cpu), JIT&>) {
|
||||
sdc1JIT(cpu, mem, instr);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user