aboutsummaryrefslogtreecommitdiff
path: root/riscv/execute.cc
diff options
context:
space:
mode:
authorChih-Min Chao <chihmin.chao@sifive.com>2019-12-19 23:12:05 -0800
committerChih-Min Chao <chihmin.chao@sifive.com>2020-01-13 22:47:37 -0800
commit7928724c4a31cf103a44605716706efd6c25f7e2 (patch)
tree20145838d2f2f194df0f193887d7f1513849bb85 /riscv/execute.cc
parent816213f776d9e84b03eba515909f31c153c37dd7 (diff)
downloadspike-7928724c4a31cf103a44605716706efd6c25f7e2.zip
spike-7928724c4a31cf103a44605716706efd6c25f7e2.tar.gz
spike-7928724c4a31cf103a44605716706efd6c25f7e2.tar.bz2
commitlog: extend load/store record to keep multiple access
use vector to store memory accesses Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
Diffstat (limited to 'riscv/execute.cc')
-rw-r--r--riscv/execute.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/riscv/execute.cc b/riscv/execute.cc
index e138683..87c3717 100644
--- a/riscv/execute.cc
+++ b/riscv/execute.cc
@@ -60,20 +60,22 @@ static void commit_log_print_insn(state_t* state, reg_t pc, insn_t insn)
fprintf(stderr, " %c%2d ", fp ? 'f' : 'x', rd);
commit_log_print_value(size, reg.data.v[1], reg.data.v[0]);
}
- if (load.size) {
+
+ for (auto item : load) {
fprintf(stderr, " mem ");
- commit_log_print_value(xlen, 0, load.addr);
+ commit_log_print_value(xlen, 0, std::get<0>(item));
}
- if (store.size) {
+
+ for (auto item : store) {
fprintf(stderr, " mem ");
- commit_log_print_value(xlen, 0, store.addr);
+ commit_log_print_value(xlen, 0, std::get<0>(item));
fprintf(stderr, " ");
- commit_log_print_value(store.size << 3, 0, store.value);
+ commit_log_print_value(std::get<2>(item) << 3, 0, std::get<1>(item));
}
fprintf(stderr, "\n");
reg.addr = 0;
- load.size = 0;
- store.size = 0;
+ load.clear();
+ store.clear();
#endif
}