> compile NEMU

ysyx_22040000 李心杨
Linux calcite 6.6.18 #1-NixOS SMP PREEMPT_DYNAMIC Fri Feb 23 08:25:28 UTC 2024 x86_64 GNU/Linux
 19:08:50  up  22:37,  2 users,  load average: 0.46, 0.27, 0.37
This commit is contained in:
tracer-ysyx 2024-03-05 19:08:50 +08:00 committed by xinyangli
parent ee52b3b45a
commit 455cf3d498
2 changed files with 2 additions and 2 deletions

View file

@ -63,7 +63,7 @@ static int decode_exec(Decode *s) {
INSTPAT("??????? ????? ????? ??? ????? 01101 11", lui , U, R(rd) = imm);
INSTPAT("??????? ????? ????? ??? ????? 00101 11", auipc , U, R(rd) = s->pc + imm);
INSTPAT("??????? ????? ????? ??? ????? 11011 11", jal , J, do {s->dnpc = s->pc + imm; R(rd) = s->pc + 4; } while(0));
INSTPAT("??????? ????? ????? ??? ????? 11001 11", jalr , I, do {s->dnpc = s->pc + src1; R(rd) = s->pc + 4; } while(0));
INSTPAT("??????? ????? ????? ??? ????? 11001 11", jalr , I, do {printf("src=%d, pc=%d", src1, s->pc); s->dnpc = s->pc + src1; R(rd) = s->pc + 4; } while(0));
INSTPAT("??????? ????? ????? 100 ????? 00000 11", lbu , I, R(rd) = Mr(src1 + imm, 1));
INSTPAT("??????? ????? ????? 000 ????? 01000 11", sb , S, Mw(src1 + imm, 1, src2));
INSTPAT("??????? ????? ????? 010 ????? 01000 11", sw , S, Mw(src1 + imm, 4, src2));

2
result
View file

@ -1 +1 @@
/nix/store/9kqxzm48m60w4h7bfkhv47qw7y47x5sa-nemu-2024-03-02
/nix/store/d0jlcjdrgsb5pis8flyy5ihifdnfhms5-am-kernels-riscv32-none-elf-2024.02.18