These are annoying if inlined
This commit is contained in:
@@ -1,6 +1,26 @@
|
|||||||
#include <Core.hpp>
|
#include <Core.hpp>
|
||||||
|
|
||||||
namespace n64 {
|
namespace n64 {
|
||||||
|
|
||||||
|
bool Interpreter::ShouldServiceInterrupt() {
|
||||||
|
bool interrupts_pending = (regs.cop0.status.im & regs.cop0.cause.interruptPending) != 0;
|
||||||
|
bool interrupts_enabled = regs.cop0.status.ie == 1;
|
||||||
|
bool currently_handling_exception = regs.cop0.status.exl == 1;
|
||||||
|
bool currently_handling_error = regs.cop0.status.erl == 1;
|
||||||
|
|
||||||
|
return interrupts_pending && interrupts_enabled &&
|
||||||
|
!currently_handling_exception && !currently_handling_error;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Interpreter::CheckCompareInterrupt() {
|
||||||
|
regs.cop0.count++;
|
||||||
|
regs.cop0.count &= 0x1FFFFFFFF;
|
||||||
|
if(regs.cop0.count == (u64)regs.cop0.compare << 1) {
|
||||||
|
regs.cop0.cause.ip7 = 1;
|
||||||
|
UpdateInterrupt(mem.mmio.mi, regs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int Interpreter::Step() {
|
int Interpreter::Step() {
|
||||||
CheckCompareInterrupt();
|
CheckCompareInterrupt();
|
||||||
|
|
||||||
|
|||||||
@@ -13,26 +13,8 @@ private:
|
|||||||
u64 cop2Latch{};
|
u64 cop2Latch{};
|
||||||
friend struct Cop1;
|
friend struct Cop1;
|
||||||
#define check_address_error(mask, vaddr) (((!regs.cop0.is_64bit_addressing) && (s32)(vaddr) != (vaddr)) || (((vaddr) & (mask)) != 0))
|
#define check_address_error(mask, vaddr) (((!regs.cop0.is_64bit_addressing) && (s32)(vaddr) != (vaddr)) || (((vaddr) & (mask)) != 0))
|
||||||
|
bool ShouldServiceInterrupt() override;
|
||||||
[[nodiscard]] FORCE_INLINE bool ShouldServiceInterrupt() override {
|
void CheckCompareInterrupt() override;
|
||||||
bool interrupts_pending = (regs.cop0.status.im & regs.cop0.cause.interruptPending) != 0;
|
|
||||||
bool interrupts_enabled = regs.cop0.status.ie == 1;
|
|
||||||
bool currently_handling_exception = regs.cop0.status.exl == 1;
|
|
||||||
bool currently_handling_error = regs.cop0.status.erl == 1;
|
|
||||||
|
|
||||||
return interrupts_pending && interrupts_enabled &&
|
|
||||||
!currently_handling_exception && !currently_handling_error;
|
|
||||||
}
|
|
||||||
|
|
||||||
FORCE_INLINE void CheckCompareInterrupt() override {
|
|
||||||
regs.cop0.count++;
|
|
||||||
regs.cop0.count &= 0x1FFFFFFFF;
|
|
||||||
if(regs.cop0.count == (u64)regs.cop0.compare << 1) {
|
|
||||||
regs.cop0.cause.ip7 = 1;
|
|
||||||
UpdateInterrupt(mem.mmio.mi, regs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void cop2Decode(u32);
|
void cop2Decode(u32);
|
||||||
void special(u32);
|
void special(u32);
|
||||||
void regimm(u32);
|
void regimm(u32);
|
||||||
|
|||||||
Reference in New Issue
Block a user