pa2.2: klib and difftest #1

Merged
xin merged 16 commits from pa2 into master 2024-03-26 03:00:50 +00:00
3 changed files with 9 additions and 5 deletions
Showing only changes of commit d5feb71b50 - Show all commits

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() {