From dce00ea47fd4100df97349fd2bf998169b05b74a Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Tue, 2 Jul 2019 15:00:17 +0200 Subject: Change instruction parsing to allow multiple words pseudo-operations. Signed-off-by: Pavel Pisa --- qtmips_machine/instruction.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'qtmips_machine/instruction.h') 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 &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; -- cgit v1.2.3