From 2cc303c8a78ba2b1f939ff7a51ecdeb3b49b8287 Mon Sep 17 00:00:00 2001 From: libretroadmin Date: Thu, 18 Apr 2024 14:26:17 +0200 Subject: [PATCH] Remove unused functions --- src/core/cpu_core_private.h | 5 +++-- src/core/dma.h | 7 ------- src/core/gte.cpp | 5 ----- src/core/gte.h | 3 --- 4 files changed, 3 insertions(+), 17 deletions(-) diff --git a/src/core/cpu_core_private.h b/src/core/cpu_core_private.h index 1be1b13a..d82b0843 100644 --- a/src/core/cpu_core_private.h +++ b/src/core/cpu_core_private.h @@ -83,8 +83,9 @@ ALWAYS_INLINE Segment GetSegmentForAddress(VirtualMemoryAddress address) case 0x06: // KSEG2 case 0x07: // KSEG2 default: - return Segment::KSEG2; + break; } + return Segment::KSEG2; } ALWAYS_INLINE PhysicalMemoryAddress VirtualAddressToPhysical(VirtualMemoryAddress address) @@ -122,4 +123,4 @@ ALWAYS_INLINE void StallUntilGTEComplete() (g_state.gte_completion_tick > g_state.pending_ticks) ? g_state.gte_completion_tick : g_state.pending_ticks; } -} // namespace CPU \ No newline at end of file +} // namespace CPU diff --git a/src/core/dma.h b/src/core/dma.h index 461fe7b2..c4191aa8 100644 --- a/src/core/dma.h +++ b/src/core/dma.h @@ -146,7 +146,6 @@ private: BitField priority_offset; BitField unused; - u8 GetPriority(Channel channel) const { return ((bits >> (static_cast(channel) * 4)) & u32(3)); } bool GetMasterEnable(Channel channel) const { return ConvertToBoolUnchecked((bits >> (static_cast(channel) * 4 + 3)) & u32(1)); @@ -182,13 +181,7 @@ private: return ConvertToBoolUnchecked((bits >> (static_cast(channel) + 16)) & u32(1)); } - bool GetIRQFlag(Channel channel) const - { - return ConvertToBoolUnchecked((bits >> (static_cast(channel) + 24)) & u32(1)); - } - void SetIRQFlag(Channel channel) { bits |= (u32(1) << (static_cast(channel) + 24)); } - void ClearIRQFlag(Channel channel) { bits &= ~(u32(1) << (static_cast(channel) + 24)); } void UpdateMasterFlag() { diff --git a/src/core/gte.cpp b/src/core/gte.cpp index d9d2ddfe..78ee29f5 100644 --- a/src/core/gte.cpp +++ b/src/core/gte.cpp @@ -330,11 +330,6 @@ void WriteRegister(u32 index, u32 value) } } -u32* GetRegisterPtr(u32 index) -{ - return ®S.r32[index]; -} - ALWAYS_INLINE static void SetOTZ(s32 value) { if (value < 0) diff --git a/src/core/gte.h b/src/core/gte.h index 63cc6abb..226286f8 100644 --- a/src/core/gte.h +++ b/src/core/gte.h @@ -14,9 +14,6 @@ void UpdateAspectRatio(); u32 ReadRegister(u32 index); void WriteRegister(u32 index, u32 value); -// use with care, direct register access -u32* GetRegisterPtr(u32 index); - void ExecuteInstruction(u32 inst_bits); using InstructionImpl = void (*)(Instruction);