From d575410a068fc0d7bdd549f1b7d2e43925513bc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A0rius=20Mont=C3=B3n?= Date: Tue, 24 Sep 2019 11:12:47 +0200 Subject: [PATCH] if condition clarified --- src/CPU.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/CPU.cpp b/src/CPU.cpp index ac0b514..46a24ca 100644 --- a/src/CPU.cpp +++ b/src/CPU.cpp @@ -40,8 +40,7 @@ bool CPU::cpu_process_IRQ() { if (interrupt == true) { csr_temp = register_bank->getCSR(CSR_MSTATUS); - if (csr_temp & MSTATUS_MIE) { - } else { + if ( (csr_temp & MSTATUS_MIE) == 0) { log->SC_log(Log::DEBUG) << "interrupt delayed" << endl; return ret_value; }