don't do interlocks for the arm7

This commit is contained in:
Jaklyy 2024-06-15 18:37:31 -04:00
parent a973c0bf5b
commit 449557624d

View File

@ -166,23 +166,10 @@ public:
}
// fetch the value of a register while handling any interlock cycles
inline u32 GetReg(const u32 reg, const u32 delay = 0)
{
#ifdef INTERLOCK
if (InterlockTimestamp[reg] > (Timestamp() + delay))
Timestamp() = InterlockTimestamp[reg] - delay;
#endif
return R[reg];
}
virtual inline u32 GetReg(const u32 reg, const u32 delay = 0) = 0;
// Must be called after all of an instruction's cycles are calculated!!!
inline void SetCycles_L(const u32 reg, const u32 cycles, const u32 type)
{
#ifdef INTERLOCK
InterlockTimestamp[reg] = cycles + Timestamp() + Cycles;
//InterlockType[reg] = type;
#endif
}
virtual inline void SetCycles_L(const u32 reg, const u32 cycles, const u32 type) = 0;
virtual u64& Timestamp() = 0;
@ -351,6 +338,25 @@ public:
// Cycles += numC + numD;
}
// fetch the value of a register while handling any interlock cycles
inline u32 GetReg(const u32 reg, const u32 delay = 0) override
{
#ifdef INTERLOCK
if (InterlockTimestamp[reg] > (Timestamp() + delay))
Timestamp() = InterlockTimestamp[reg] - delay;
#endif
return R[reg];
}
// Must be called after all of an instruction's cycles are calculated!!!
inline void SetCycles_L(const u32 reg, const u32 cycles, const u32 type) override
{
#ifdef INTERLOCK
InterlockTimestamp[reg] = cycles + Timestamp() + Cycles;
//InterlockType[reg] = type;
#endif
}
u64& Timestamp() override;
void GetCodeMemRegion(u32 addr, MemRegion* region);
@ -468,6 +474,15 @@ public:
void AddCycles_CDI() override;
void AddCycles_CD() override;
// fetch the value of a register while handling any interlock cycles
inline u32 GetReg(const u32 reg, const u32 delay = 0) override
{
return R[reg];
}
// Must be called after all of an instruction's cycles are calculated!!!
inline void SetCycles_L(const u32 reg, const u32 cycles, const u32 type) override{}
u64& Timestamp() override;
protected:
u8 BusRead8(u32 addr) override;