aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/memory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qtmips_machine/memory.cpp')
-rw-r--r--qtmips_machine/memory.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/qtmips_machine/memory.cpp b/qtmips_machine/memory.cpp
index fd1dbb4..3d711cc 100644
--- a/qtmips_machine/memory.cpp
+++ b/qtmips_machine/memory.cpp
@@ -57,6 +57,8 @@ std::uint32_t MemoryAccess::read_word(std::uint32_t offset) {
void MemoryAccess::write_ctl(enum MemoryAccess::AccessControl ctl, std::uint32_t offset, std::uint32_t value) {
switch (ctl) {
+ case AC_NONE:
+ break;
case AC_BYTE:
case AC_BYTE_UNSIGNED:
this->write_byte(offset, value);
@@ -75,6 +77,8 @@ void MemoryAccess::write_ctl(enum MemoryAccess::AccessControl ctl, std::uint32_t
std::uint32_t MemoryAccess::read_ctl(enum MemoryAccess::AccessControl ctl, std::uint32_t offset) {
switch (ctl) {
+ case AC_NONE:
+ return 0;
case AC_BYTE:
{
std::uint8_t b = this->read_byte(offset);