> compile NEMU

ysyx_22040000 李心杨
Linux calcite 6.1.69 #1-NixOS SMP PREEMPT_DYNAMIC Wed Dec 20 16:00:29 UTC 2023 x86_64 GNU/Linux
 20:49:42  up 3 days 19:50,  2 users,  load average: 1.26, 0.91, 0.68
This commit is contained in:
tracer-ysyx 2024-01-11 20:49:42 +08:00 committed by xinyangli
parent ba8658f385
commit 60cb7ee36a
2 changed files with 33 additions and 15 deletions

View file

@ -15,6 +15,7 @@
#include <isa.h>
#include "local-include/reg.h"
#include "macro.h"
const char *regs[] = {
"$0", "ra", "sp", "gp", "tp", "t0", "t1", "t2",
@ -24,6 +25,12 @@ const char *regs[] = {
};
void isa_reg_display() {
int colomn_per_row = 4;
for(int i = 0; i < ARRLEN(regs); i++) {
printf("%s: %#X", reg_name(i), gpr(i));
if (i % colomn_per_row == 3)
putchar('\n');
}
}
word_t isa_reg_str2val(const char *s, bool *success) {