Finally clangformat
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include <Core.hpp>
|
||||
|
||||
namespace n64 {
|
||||
Interpreter::Interpreter(ParallelRDP& parallel) : mem(regs, parallel) { }
|
||||
Interpreter::Interpreter(ParallelRDP ¶llel) : mem(regs, parallel) {}
|
||||
|
||||
bool Interpreter::ShouldServiceInterrupt() {
|
||||
bool interrupts_pending = (regs.cop0.status.im & regs.cop0.cause.interruptPending) != 0;
|
||||
@@ -9,14 +9,13 @@ bool Interpreter::ShouldServiceInterrupt() {
|
||||
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;
|
||||
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) {
|
||||
if (regs.cop0.count == (u64)regs.cop0.compare << 1) {
|
||||
regs.cop0.cause.ip7 = 1;
|
||||
mem.mmio.mi.UpdateInterrupt();
|
||||
}
|
||||
@@ -28,14 +27,14 @@ int Interpreter::Step() {
|
||||
regs.prevDelaySlot = regs.delaySlot;
|
||||
regs.delaySlot = false;
|
||||
|
||||
if(check_address_error(0b11, u64(regs.pc))) [[unlikely]] {
|
||||
if (check_address_error(0b11, u64(regs.pc))) [[unlikely]] {
|
||||
regs.cop0.HandleTLBException(regs.pc);
|
||||
regs.cop0.FireException(ExceptionCode::AddressErrorLoad, 0, regs.pc);
|
||||
return 1;
|
||||
}
|
||||
|
||||
u32 paddr = 0;
|
||||
if(!regs.cop0.MapVAddr(Cop0::LOAD, regs.pc, paddr)) {
|
||||
if (!regs.cop0.MapVAddr(Cop0::LOAD, regs.pc, paddr)) {
|
||||
regs.cop0.HandleTLBException(regs.pc);
|
||||
regs.cop0.FireException(regs.cop0.GetTLBExceptionCode(regs.cop0.tlbError, Cop0::LOAD), 0, regs.pc);
|
||||
return 1;
|
||||
@@ -43,7 +42,7 @@ int Interpreter::Step() {
|
||||
|
||||
u32 instruction = mem.Read<u32>(regs, paddr);
|
||||
|
||||
if(ShouldServiceInterrupt()) {
|
||||
if (ShouldServiceInterrupt()) {
|
||||
regs.cop0.FireException(ExceptionCode::Interrupt, 0, regs.pc);
|
||||
return 1;
|
||||
}
|
||||
@@ -67,7 +66,5 @@ std::vector<u8> Interpreter::Serialize() {
|
||||
return res;
|
||||
}
|
||||
|
||||
void Interpreter::Deserialize(const std::vector<u8> &data) {
|
||||
memcpy(®s, data.data(), sizeof(Registers));
|
||||
}
|
||||
}
|
||||
void Interpreter::Deserialize(const std::vector<u8> &data) { memcpy(®s, data.data(), sizeof(Registers)); }
|
||||
} // namespace n64
|
||||
|
||||
Reference in New Issue
Block a user