> 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 13:45:07 up 1 day, 12:35, 1 user, load average: 0.53, 0.38, 0.24
This commit is contained in:
@ -24,6 +24,7 @@ static inline int check_reg_idx(int idx) {
|
||||
}
|
||||
|
||||
#define gpr(idx) (cpu.gpr[check_reg_idx(idx)])
|
||||
#define selfpc (cpu.pc)
|
||||
|
||||
static inline const char* reg_name(int idx) {
|
||||
extern const char* regs[];
|
||||
|
@ -33,6 +33,7 @@ void isa_reg_display() {
|
||||
|
||||
word_t isa_reg_str2val(const char *s, bool *success) {
|
||||
*success = false;
|
||||
if (strcmp(s, "pc") == 0) return selfpc;
|
||||
for (int i = 0; i < ARRLEN(regs); i ++) {
|
||||
if (strcmp(s, reg_name(i)) == 0) {
|
||||
*success = true;
|
||||
|
Reference in New Issue
Block a user