Emulator: Fix compiler warnings in cpu-prefix.cpp
This commit is contained in:
+3
-5
@@ -4,9 +4,7 @@
|
|||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#include <cstdint> // uint8_t, uint32_t
|
||||||
|
|
||||||
#include <cstdint> // uint32_t
|
|
||||||
|
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
#include "ruc/format/print.h"
|
#include "ruc/format/print.h"
|
||||||
@@ -22,7 +20,7 @@ void CPU::prefix()
|
|||||||
// Read next opcode
|
// Read next opcode
|
||||||
uint8_t opcode = read(m_pc);
|
uint8_t opcode = read(m_pc);
|
||||||
print("running opcode: {:#04x} @ ({:#06x})\n", opcode, m_pc);
|
print("running opcode: {:#04x} @ ({:#06x})\n", opcode, m_pc);
|
||||||
if (opcode >= 0x00 && opcode <= 0x07) {
|
if (opcode <= 0x07) {
|
||||||
rlc();
|
rlc();
|
||||||
}
|
}
|
||||||
else if (opcode >= 0x08 && opcode <= 0x0f) {
|
else if (opcode >= 0x08 && opcode <= 0x0f) {
|
||||||
@@ -52,7 +50,7 @@ void CPU::prefix()
|
|||||||
else if (opcode >= 0x80 && opcode <= 0xbf) {
|
else if (opcode >= 0x80 && opcode <= 0xbf) {
|
||||||
res();
|
res();
|
||||||
}
|
}
|
||||||
else if (opcode >= 0xc0 && opcode <= 0xff) {
|
else if (opcode >= 0xc0) {
|
||||||
set();
|
set();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
+1
-1
@@ -240,7 +240,7 @@ void CPU::update()
|
|||||||
print("illegal opcode\n");
|
print("illegal opcode\n");
|
||||||
VERIFY_NOT_REACHED();
|
VERIFY_NOT_REACHED();
|
||||||
default:
|
default:
|
||||||
print("opcode {:#x} not implemented\n", opcode);
|
print("opcode {:#04x} not implemented\n", opcode);
|
||||||
print("immediate: {:#04x}\n", pcRead());
|
print("immediate: {:#04x}\n", pcRead());
|
||||||
VERIFY_NOT_REACHED();
|
VERIFY_NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user