Fix compilation issue on my machine (no idea)

This commit is contained in:
2026-06-01 19:28:34 +02:00
parent 24fb2898e9
commit 58e5c89c15
4 changed files with 7 additions and 8 deletions
+1 -1
View File
@@ -141,7 +141,7 @@ u32 Interpreter::ExecuteCached() {
auto &blocks = cachedState.blocks; auto &blocks = cachedState.blocks;
if (!blocks[CACHE_GET_BLOCK(addr)]) { if (!blocks[CACHE_GET_BLOCK(addr)]) {
blocks[CACHE_GET_BLOCK(addr)] = new CachedBlock<cachedState.MAX_LINES / 4>(); blocks[CACHE_GET_BLOCK(addr)] = new CachedBlock(cachedState.MAX_LINES / 4);
return CacheBlock(addr); return CacheBlock(addr);
} }
+2 -2
View File
@@ -38,8 +38,8 @@ struct Interpreter final {
u32 rspSyncCount = 0; u32 rspSyncCount = 0;
bool Fetch(Instruction &, u64); bool Fetch(Instruction &, u64);
void CacheTypeData(u8, u64, u32, u32); // void CacheTypeData(u8, u64, u32, u32);
void CacheTypeInstruction(u8, u64, u32, u32); // void CacheTypeInstruction(u8, u64, u32, u32);
[[nodiscard]] bool ShouldServiceInterrupt() const; [[nodiscard]] bool ShouldServiceInterrupt() const;
void UpdateCompareInterrupt() const; void UpdateCompareInterrupt() const;
+2 -3
View File
@@ -16,16 +16,15 @@ struct CachedLine {
u32 cycles = 0; u32 cycles = 0;
}; };
template <u32 lineAmount>
struct CachedBlock { struct CachedBlock {
CachedBlock() { lines.resize(lineAmount); } CachedBlock(u32 lineAmount) { lines.resize(lineAmount); }
std::vector<CachedLine *> lines = {}; std::vector<CachedLine *> lines = {};
}; };
template <u32 blockBits, u64 addressSpace> template <u32 blockBits, u64 addressSpace>
struct CachedState { struct CachedState {
static constexpr u32 MAX_LINES = 1 << blockBits; static constexpr u32 MAX_LINES = 1 << blockBits;
std::vector<CachedBlock<MAX_LINES / 4> *> blocks = {}; std::vector<CachedBlock *> blocks = {};
bool exception = false; bool exception = false;
void EvictCachedBlock(u32 addr) { blocks[addr / MAX_LINES] = {}; } void EvictCachedBlock(u32 addr) { blocks[addr / MAX_LINES] = {}; }
@@ -861,7 +861,7 @@ void Interpreter::dmfc2(const Instruction instr) { regs.Write(instr.rt(), cop2La
void Interpreter::ctc2(const Instruction) {} void Interpreter::ctc2(const Instruction) {}
void Interpreter::cfc2(const Instruction) {} void Interpreter::cfc2(const Instruction) {}
/*
void Interpreter::cache(const Instruction instr) { void Interpreter::cache(const Instruction instr) {
u8 type = instr.op() & 3; u8 type = instr.op() & 3;
const u8 op = (instr.op() >> 2) & 7; const u8 op = (instr.op() >> 2) & 7;
@@ -943,5 +943,5 @@ void Interpreter::CacheTypeData(const u8 op, const u64 vaddr, const u32 paddr, c
default: default:
panic("Unimplemented dcache op 0b{:03b}", op); panic("Unimplemented dcache op 0b{:03b}", op);
} }
} }*/
} // namespace n64 } // namespace n64