> compile NEMU

221220000 张三
Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
 19:43:37 up 18:33,  1 user,  load average: 0.53, 0.27, 0.16
This commit is contained in:
tracer-ics2023
2024-08-31 19:43:38 +08:00
committed by zzy
parent 91a82d290a
commit a3d91eeab4

View File

@ -70,6 +70,11 @@ static int cmd_si(char *args) {
static int cmd_info(char *args) {
char *arg = strtok(NULL, " ");
if (arg == NULL) {
p_help("info");
return 1;
}
if (arg[0] == 'r') {
isa_reg_display();
} else if (arg[0] == 'w') {
@ -110,6 +115,8 @@ static int cmd_p(char *args) {
word_t res = expr(args, &success);
if (success) {
printf("$res = % "PRIdLEAST32"\n", res);
} else {
printf("Invalid expression\n");
}
return success;
}
@ -238,7 +245,7 @@ void _test_expr() {
} else {
fprintf(stdout, "test_expr Failed:");
}
printf("%"PRIuLEAST32" : %"PRIuLEAST32"\n", expect, res);
printf(" %d : %d\n", expect, res);
}
int test_expr(int argc, char *argv[]) {