提交 347060c1 编写于 作者: Z Zihao Yu

riscv{32,64},exec: reset gpr[0] after every instruction

上级 e58bb2c3
......@@ -90,5 +90,9 @@ vaddr_t isa_exec_once() {
void query_intr(DecodeExecState *s);
query_intr(&s);
#endif
// reset gpr[0]
reg_l(0) = 0;
return s.seq_pc;
}
......@@ -16,7 +16,6 @@ static inline make_DopHelper(r) {
op->type = OP_TYPE_REG;
op->reg = val;
op->preg = &reg_l(val);
reg_l(0) = 0;
print_Dop(op->str, OP_STR_SIZE, "%s", reg_name(op->reg, 4));
}
......
......@@ -226,5 +226,9 @@ vaddr_t isa_exec_once() {
void query_intr(DecodeExecState *s);
query_intr(&s);
#endif
// reset gpr[0]
reg_l(0) = 0;
return s.seq_pc;
}
......@@ -16,7 +16,6 @@ static inline make_DopHelper(r) {
op->type = OP_TYPE_REG;
op->reg = val;
op->preg = &reg_l(val);
reg_l(0) = 0;
print_Dop(op->str, OP_STR_SIZE, "%s", reg_name(op->reg, 4));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册