diff options
Diffstat (limited to 'qtmips_machine/qtmipsmachine.cpp')
-rw-r--r-- | qtmips_machine/qtmipsmachine.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/qtmips_machine/qtmipsmachine.cpp b/qtmips_machine/qtmipsmachine.cpp index 8299ddf..68eeeca 100644 --- a/qtmips_machine/qtmipsmachine.cpp +++ b/qtmips_machine/qtmipsmachine.cpp @@ -186,7 +186,15 @@ Cache *QtMipsMachine::cache_data_rw() { return cch_data; } -const PhysAddrSpace *QtMipsMachine::physical_address_space() { +void QtMipsMachine::cache_sync() { + if (cch_program != nullptr) + cch_program->sync(); + if (cch_data != nullptr) + cch_data->sync(); +} + + +const PhysAddrSpace *QtMipsMachine::physical_address_space() { return physaddrspace; } @@ -210,6 +218,15 @@ const SymbolTable *QtMipsMachine::symbol_table() { return symtab; } +void QtMipsMachine::set_symbol(QString name, std::uint32_t value, + std::uint32_t size, unsigned char info, + unsigned char other) { + if (symtab == nullptr) + symtab = new SymbolTable; + symtab->remove_symbol(name); + symtab->add_symbol(name, value, size, info, other); +} + const Core *QtMipsMachine::core() { return cr; } |