diff --git a/CMakeLists.txt b/CMakeLists.txt index 65e221549..19dbd07cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -616,7 +616,6 @@ target_sources(${PROJECT_NAME} PRIVATE core/hw/sh4/dyna/decoder_opcodes.h core/hw/sh4/dyna/driver.cpp core/hw/sh4/dyna/ngen.h - core/hw/sh4/dyna/rec_config.h core/hw/sh4/dyna/regalloc.h core/hw/sh4/dyna/shil_canonical.h core/hw/sh4/dyna/shil.cpp diff --git a/core/hw/sh4/dyna/decoder.cpp b/core/hw/sh4/dyna/decoder.cpp index 0547b64fa..aa0fb976e 100644 --- a/core/hw/sh4/dyna/decoder.cpp +++ b/core/hw/sh4/dyna/decoder.cpp @@ -891,7 +891,7 @@ static bool dec_generic(u32 op) //skip the aggregated opcodes state.cpu.rpc += 128; - blk->guest_cycles += CPU_RATIO*64; + blk->guest_cycles += 64; } else { @@ -923,7 +923,7 @@ static bool dec_generic(u32 op) //skip the aggregated opcodes state.cpu.rpc+=128; - blk->guest_cycles += CPU_RATIO * 64; + blk->guest_cycles += 64; } else { @@ -1017,10 +1017,8 @@ bool dec_DecodeBlock(RuntimeBlockInfo* rbi,u32 max_cycles) blk->guest_opcodes++; if (!mmu_enabled()) { - if (op>=0xF000) - blk->guest_cycles+=0; - else - blk->guest_cycles+=CPU_RATIO; + if (op < 0xF000) + blk->guest_cycles++; } else { diff --git a/core/hw/sh4/dyna/ngen.h b/core/hw/sh4/dyna/ngen.h index e3fcdbb67..a45994f4c 100644 --- a/core/hw/sh4/dyna/ngen.h +++ b/core/hw/sh4/dyna/ngen.h @@ -41,7 +41,6 @@ */ #pragma once -#include "rec_config.h" #include "decoder.h" #include "blockmanager.h" diff --git a/core/hw/sh4/dyna/rec_config.h b/core/hw/sh4/dyna/rec_config.h deleted file mode 100644 index 8d00dff94..000000000 --- a/core/hw/sh4/dyna/rec_config.h +++ /dev/null @@ -1,2 +0,0 @@ -#pragma once -#define CPU_RATIO (1) diff --git a/core/rec-ARM/ngen_arm.S b/core/rec-ARM/ngen_arm.S index 5affdeab3..85f5a7a48 100644 --- a/core/rec-ARM/ngen_arm.S +++ b/core/rec-ARM/ngen_arm.S @@ -7,7 +7,6 @@ .equ SH4_TIMESLICE, 448 .equ BM_BLOCKLIST_MASK, 65532 @FFFC -.equ CPU_RATIO, 5 #if defined(__APPLE__) #define CSYM(n) _##n diff --git a/core/rec-x64/rec_x64.cpp b/core/rec-x64/rec_x64.cpp index 182d5240d..721819aec 100644 --- a/core/rec-x64/rec_x64.cpp +++ b/core/rec-x64/rec_x64.cpp @@ -248,7 +248,7 @@ static void handle_mem_exception(u32 exception_raised, u32 pc) spc = pc - 1; else spc = pc; - cycle_counter += CPU_RATIO * 2; // probably more is needed but no easy way to find out + cycle_counter += 2; // probably more is needed but no easy way to find out longjmp(jmp_env, 1); } } @@ -288,7 +288,7 @@ static void handle_sh4_exception(SH4ThrownException& ex, u32 pc) pc--; } Do_Exception(pc, ex.expEvn, ex.callVect); - cycle_counter += CPU_RATIO * 4; // probably more is needed + cycle_counter += 4; // probably more is needed longjmp(jmp_env, 1); } @@ -1035,9 +1035,9 @@ public: { movss(rd, rs1); } - if (cpu.has(Xbyak::util::Cpu::tFMA)) - vfmadd231ss(rd, rs2, rs3); - else + //if (cpu.has(Xbyak::util::Cpu::tFMA)) + // vfmadd231ss(rd, rs2, rs3); + //else { movss(xmm0, rs2); mulss(xmm0, rs3); diff --git a/shell/apple/emulator-ios/reicast-ios.xcodeproj/project.pbxproj b/shell/apple/emulator-ios/reicast-ios.xcodeproj/project.pbxproj index c1151cfb1..6fa49b750 100644 --- a/shell/apple/emulator-ios/reicast-ios.xcodeproj/project.pbxproj +++ b/shell/apple/emulator-ios/reicast-ios.xcodeproj/project.pbxproj @@ -526,7 +526,6 @@ 9C7A3A2B18C806DF0070BB5F /* decoder_opcodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = decoder_opcodes.h; sourceTree = ""; }; 9C7A3A2C18C806DF0070BB5F /* driver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = driver.cpp; sourceTree = ""; }; 9C7A3A2D18C806DF0070BB5F /* ngen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ngen.h; sourceTree = ""; }; - 9C7A3A2E18C806DF0070BB5F /* rec_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rec_config.h; sourceTree = ""; }; 9C7A3A2F18C806DF0070BB5F /* regalloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = regalloc.h; sourceTree = ""; }; 9C7A3A3018C806DF0070BB5F /* shil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = shil.cpp; sourceTree = ""; }; 9C7A3A3118C806DF0070BB5F /* shil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = shil.h; sourceTree = ""; }; @@ -1220,7 +1219,6 @@ 9C7A3A2B18C806DF0070BB5F /* decoder_opcodes.h */, 9C7A3A2C18C806DF0070BB5F /* driver.cpp */, 9C7A3A2D18C806DF0070BB5F /* ngen.h */, - 9C7A3A2E18C806DF0070BB5F /* rec_config.h */, 9C7A3A2F18C806DF0070BB5F /* regalloc.h */, 9C7A3A3018C806DF0070BB5F /* shil.cpp */, 9C7A3A3118C806DF0070BB5F /* shil.h */, diff --git a/shell/apple/emulator-osx/reicast-osx.xcodeproj/project.pbxproj b/shell/apple/emulator-osx/reicast-osx.xcodeproj/project.pbxproj index f989ae4d2..5f50ebae9 100644 --- a/shell/apple/emulator-osx/reicast-osx.xcodeproj/project.pbxproj +++ b/shell/apple/emulator-osx/reicast-osx.xcodeproj/project.pbxproj @@ -519,7 +519,6 @@ 84B7BE131B72720100F9733F /* decoder_opcodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = decoder_opcodes.h; sourceTree = ""; }; 84B7BE141B72720100F9733F /* driver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = driver.cpp; sourceTree = ""; }; 84B7BE151B72720100F9733F /* ngen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ngen.h; sourceTree = ""; }; - 84B7BE161B72720100F9733F /* rec_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rec_config.h; sourceTree = ""; }; 84B7BE171B72720100F9733F /* regalloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = regalloc.h; sourceTree = ""; }; 84B7BE181B72720100F9733F /* shil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = shil.cpp; sourceTree = ""; }; 84B7BE191B72720100F9733F /* shil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = shil.h; sourceTree = ""; }; @@ -1519,7 +1518,6 @@ 84B7BE131B72720100F9733F /* decoder_opcodes.h */, 84B7BE141B72720100F9733F /* driver.cpp */, 84B7BE151B72720100F9733F /* ngen.h */, - 84B7BE161B72720100F9733F /* rec_config.h */, 84B7BE171B72720100F9733F /* regalloc.h */, 84B7BE181B72720100F9733F /* shil.cpp */, 84B7BE191B72720100F9733F /* shil.h */,