nemu: try difftest
Some checks failed
Build abstract machine with nix / build-abstract-machine (push) Failing after 7m47s

This commit is contained in:
xinyangli 2024-03-26 01:53:17 +08:00
parent d5521806d9
commit d5feb71b50
Signed by: xin
SSH key fingerprint: SHA256:qZ/tzd8lYRtUFSrfBDBMcUqV4GHKxqeqRA3huItgvbk
3 changed files with 9 additions and 5 deletions

View file

@ -10,9 +10,8 @@ jobs:
name: ysyx name: ysyx
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- uses: actions/checkout@v4 - uses: actions/checkout@v4
sparse-checkout: | with:
flake.nix submodules: true
abstract-machine
- name: Build abstract-machine - name: Build abstract-machine
run: | run: |
nix build .#abstract-machine nix build .#abstract-machine

View file

@ -1,7 +1,8 @@
{ pkgs, { pkgs,
lib, lib,
stdenv, stdenv,
am-kernels am-kernels,
dtc
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -15,6 +16,7 @@ stdenv.mkDerivation rec {
pkg-config pkg-config
flex flex
bison bison
dtc
]; ];
buildInputs = with pkgs; [ buildInputs = with pkgs; [

View file

@ -18,7 +18,10 @@
#include "../local-include/reg.h" #include "../local-include/reg.h"
bool isa_difftest_checkregs(CPU_state *ref_r, vaddr_t pc) { bool isa_difftest_checkregs(CPU_state *ref_r, vaddr_t pc) {
return false; for(int i = 0; i < MUXDEF(CONFIG_RVE, 16, 32); i++) {
if(!difftest_check_reg(reg_name(i), pc, ref_r->gpr[i], gpr(i))) return false;
}
return true;
} }
void isa_difftest_attach() { void isa_difftest_attach() {