diff options
author | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-07-02 15:00:17 +0200 |
---|---|---|
committer | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-07-02 15:00:17 +0200 |
commit | dce00ea47fd4100df97349fd2bf998169b05b74a (patch) | |
tree | c493de54f5f0309b5af893e4b9e8fa8c34cdf9a6 /qtmips_machine/instruction.h | |
parent | cf97513e757cdd25e6b1dd1fd584e4ec13d93cb1 (diff) | |
download | qtmips-dce00ea47fd4100df97349fd2bf998169b05b74a.tar.gz qtmips-dce00ea47fd4100df97349fd2bf998169b05b74a.tar.bz2 qtmips-dce00ea47fd4100df97349fd2bf998169b05b74a.zip |
Change instruction parsing to allow multiple words pseudo-operations.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'qtmips_machine/instruction.h')
-rw-r--r-- | qtmips_machine/instruction.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/qtmips_machine/instruction.h b/qtmips_machine/instruction.h index d55b079..3e48fc2 100644 --- a/qtmips_machine/instruction.h +++ b/qtmips_machine/instruction.h @@ -144,8 +144,17 @@ public: QString to_str(std::int32_t inst_addr = 0) const; - static Instruction from_string(QString str, bool *pok = nullptr, - std::uint32_t inst_addr = 0, RelocExpressionList *reloc = nullptr, int line = 0); + static ssize_t code_from_string(std::uint32_t *code, size_t buffsize, + QString inst_base, QVector<QString> &inst_fields, + std::uint32_t inst_addr = 0, + RelocExpressionList *reloc = nullptr, + int line = 0, bool pseudo_opt = false); + + static ssize_t code_from_string(std::uint32_t *code, size_t buffsize, + QString str, std::uint32_t inst_addr = 0, + RelocExpressionList *reloc = nullptr, + int line = 0, bool pseudo_opt = false); + bool update(std::int64_t val, RelocExpression *relocexp); private: std::uint32_t dt; |