diff options
author | Scott Johnson <scott.johnson@arilinc.com> | 2021-11-02 19:06:31 -0700 |
---|---|---|
committer | Scott Johnson <scott.johnson@arilinc.com> | 2021-11-04 09:54:41 -0700 |
commit | c8f11f3eae37833607d7d2635a30275f30cd5f78 (patch) | |
tree | 1955846cf35f473cba5cb26f53fea7ad52ace946 /riscv | |
parent | 7d6ba2a9f198f786a5c44622c80f700cb8480f96 (diff) | |
download | spike-c8f11f3eae37833607d7d2635a30275f30cd5f78.zip spike-c8f11f3eae37833607d7d2635a30275f30cd5f78.tar.gz spike-c8f11f3eae37833607d7d2635a30275f30cd5f78.tar.bz2 |
Add gva field to insn_trap_t
Since breakpoint will need it soon.
Diffstat (limited to 'riscv')
-rw-r--r-- | riscv/trap.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/riscv/trap.h b/riscv/trap.h index da8da65..4434013 100644 --- a/riscv/trap.h +++ b/riscv/trap.h @@ -29,11 +29,13 @@ class trap_t class insn_trap_t : public trap_t { public: - insn_trap_t(reg_t which, reg_t tval) - : trap_t(which), tval(tval) {} + insn_trap_t(reg_t which, bool gva, reg_t tval) + : trap_t(which), gva(gva), tval(tval) {} + bool has_gva() override { return gva; } bool has_tval() override { return true; } reg_t get_tval() override { return tval; } private: + bool gva; reg_t tval; }; @@ -62,7 +64,7 @@ class mem_trap_t : public trap_t #define DECLARE_INST_TRAP(n, x) class trap_##x : public insn_trap_t { \ public: \ - trap_##x(reg_t tval) : insn_trap_t(n, tval) {} \ + trap_##x(reg_t tval) : insn_trap_t(n, /*gva*/false, tval) {} \ const char* name() { return "trap_"#x; } \ }; |