提交 f7eda1eb 编写于 作者: Z Zihao Yu

Merge branch 'difftest-hook' into 'master'

Difftest hook

See merge request projectn/nemu!32
......@@ -3,4 +3,7 @@
#define DIFFTEST_REG_SIZE (sizeof(uint32_t) * 38) // GRPs + status + lo + hi + badvaddr + cause + pc
#define isa_difftest_getregs_hook()
#define isa_difftest_setregs_hook()
#endif
......@@ -3,4 +3,7 @@
#define DIFFTEST_REG_SIZE (sizeof(uint32_t) * 33) // GRPs + pc
#define isa_difftest_getregs_hook()
#define isa_difftest_setregs_hook()
#endif
......@@ -3,4 +3,7 @@
#define DIFFTEST_REG_SIZE (sizeof(uint32_t) * 9) // GRPs + EIP
#define isa_difftest_getregs_hook()
#define isa_difftest_setregs_hook()
#endif
......@@ -52,26 +52,12 @@ word_t isa_reg_str2val(const char *s, bool *success) {
int i;
*success = true;
for (i = 0; i < 8; i ++) {
if (strcmp(regsl[i], s) == 0) {
return reg_l(i);
}
if (strcmp(regsl[i], s) == 0) return reg_l(i);
if (strcmp(regsw[i], s) == 0) return reg_w(i);
if(strcmp(regsb[i], s) == 0) return reg_b(i);
}
for (i = 0; i < 8; i ++) {
if (strcmp(regsw[i], s) == 0) {
return reg_w(i);
}
}
for (i = 0; i < 8; i ++) {
if(strcmp(regsb[i], s) == 0) {
return reg_b(i);
}
}
if (strcmp("pc", s) == 0) {
return cpu.pc;
}
if (strcmp("pc", s) == 0) return cpu.pc;
*success = false;
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册