aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine
diff options
context:
space:
mode:
Diffstat (limited to 'qtmips_machine')
-rw-r--r--qtmips_machine/memory.cpp4
-rw-r--r--qtmips_machine/memory.h1
2 files changed, 5 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);
diff --git a/qtmips_machine/memory.h b/qtmips_machine/memory.h
index 90fda1b..7b14855 100644
--- a/qtmips_machine/memory.h
+++ b/qtmips_machine/memory.h
@@ -19,6 +19,7 @@ public:
std::uint32_t read_word(std::uint32_t offset);
enum AccessControl {
+ AC_NONE,
AC_BYTE,
AC_HALFWORD,
AC_WORD,