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_gui/programmodel.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'qtmips_gui/programmodel.cpp') diff --git a/qtmips_gui/programmodel.cpp b/qtmips_gui/programmodel.cpp index 64dffb8..0f3341f 100644 --- a/qtmips_gui/programmodel.cpp +++ b/qtmips_gui/programmodel.cpp @@ -274,8 +274,7 @@ bool ProgramModel::setData(const QModelIndex & index, const QVariant & value, in mem->write_word(address, data); break; case 3: - data = machine::Instruction::from_string(value.toString(), &ok, address).data(); - if (!ok) + if (machine::Instruction::code_from_string(&data, 4, value.toString(), address) < 0) return false; mem->write_word(address, data); break; -- cgit v1.2.3