aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/instruction.h
diff options
context:
space:
mode:
Diffstat (limited to 'qtmips_machine/instruction.h')
-rw-r--r--qtmips_machine/instruction.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/qtmips_machine/instruction.h b/qtmips_machine/instruction.h
index b07a0e8..2ecd0c4 100644
--- a/qtmips_machine/instruction.h
+++ b/qtmips_machine/instruction.h
@@ -78,8 +78,8 @@ enum InstructionFlags {
struct RelocExpression {
inline RelocExpression(std::int32_t location, QString expression, std::int64_t offset, std::int64_t min,
- std::int64_t max, unsigned lsb_bit, unsigned bits, unsigned shift, int line,
- int options) {
+ std::int64_t max, unsigned lsb_bit, unsigned bits, unsigned shift,
+ QString filename, int line, int options) {
this->location = location;
this->expression = expression;
this->offset = offset;
@@ -88,6 +88,7 @@ struct RelocExpression {
this->lsb_bit = lsb_bit;
this->bits = bits;
this->shift = shift;
+ this->filename = filename;
this->line = line;
this->options = options;
}
@@ -99,6 +100,7 @@ struct RelocExpression {
unsigned lsb_bit;
unsigned bits;
unsigned shift;
+ QString filename;
int line;
int options;
};
@@ -152,11 +154,11 @@ public:
QString inst_base, QStringList &inst_fields, QString &error,
std::uint32_t inst_addr = 0,
RelocExpressionList *reloc = nullptr,
- int line = 0, bool pseudo_opt = false, int options = 0);
+ QString filename = "", int line = 0, bool pseudo_opt = false, int options = 0);
static ssize_t code_from_string(std::uint32_t *code, size_t buffsize,
QString str, QString &error, std::uint32_t inst_addr = 0,
- RelocExpressionList *reloc = nullptr,
+ RelocExpressionList *reloc = nullptr, QString filename = "",
int line = 0, bool pseudo_opt = false, int options = 0);
bool update(std::int64_t val, RelocExpression *relocexp);