diff options
author | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-07-01 18:37:54 +0200 |
---|---|---|
committer | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-07-01 18:37:54 +0200 |
commit | b62686b24fbb65d0810475e24aba7a5c4ee3e05e (patch) | |
tree | 1071883f7f678d112126e6c934a4b9af4709619e /qtmips_machine/qtmipsmachine.cpp | |
parent | 2db0208ed333e0bf232e396c1789085781f50d66 (diff) | |
download | qtmips-b62686b24fbb65d0810475e24aba7a5c4ee3e05e.tar.gz qtmips-b62686b24fbb65d0810475e24aba7a5c4ee3e05e.tar.bz2 qtmips-b62686b24fbb65d0810475e24aba7a5c4ee3e05e.zip |
Minimal prototype of integrated assembler.
The labels are parsed and stored into symbol table
but expressions dependent on symbols values are not evaluated.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
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; } |