File tree 3 files changed +26
-2
lines changed
3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ BBV_DIR?=../bbv
188
188
C_WARNINGS ?=
189
189
# -Wall -Wextra -Wno-unused-label -Wno-unused-parameter -Wno-unused-but-set-variable -Wno-unused-function
190
190
C_INCS = $(addprefix $(SAIL_RISCV_DIR ) /c_emulator/,riscv_prelude.h riscv_platform_impl.h riscv_platform.h riscv_softfloat.h)
191
- C_SRCS = $(addprefix $(SAIL_RISCV_DIR ) /c_emulator/,riscv_prelude.c riscv_platform_impl.c riscv_platform.c riscv_softfloat.c)
191
+ C_SRCS = $(addprefix $(SAIL_RISCV_DIR ) /c_emulator/,riscv_prelude.c riscv_platform_impl.c riscv_platform.c riscv_softfloat.c) handwritten_support/c_emulator_fix.c
192
192
193
193
SOFTFLOAT_DIR = $(SAIL_RISCV_DIR ) /c_emulator/SoftFloat-3e
194
194
SOFTFLOAT_INCDIR = $(SOFTFLOAT_DIR ) /source/include
Original file line number Diff line number Diff line change
1
+ /* The generated C emulator is missing this function.
2
+ Up to this point, only used by --disable-compressed/-C.
3
+ Make a dummy implementation of it.
4
+ */
5
+
6
+ #include <stdio.h>
7
+ #include <stdlib.h>
8
+ #include <stdint.h>
9
+
10
+ struct zMisa ;
11
+
12
+ typedef int unit ;
13
+ typedef uint64_t mach_bits ;
14
+
15
+ unit z_set_Misa_C (struct zMisa * , mach_bits ) {
16
+ fprintf (stderr , "z_set_Misa_C is not supported\n" );
17
+ exit (EXIT_FAILURE );
18
+ }
Original file line number Diff line number Diff line change 6
6
RISCVDIR=" $DIR /.."
7
7
RISCVTESTDIR=" $RISCVDIR /sail-riscv/test"
8
8
9
+ DTC_PATH=$( which dtc)
10
+ if [ -z " $DTC_PATH " ]; then
11
+ echo " dtc not found. Install it via your package manager."
12
+ exit 1
13
+ fi
14
+
9
15
RED=' \033[0;91m'
10
16
GREEN=' \033[0;92m'
11
17
YELLOW=' \033[0;93m'
@@ -71,7 +77,7 @@ for test in $RISCVTESTDIR/riscv-tests/rv64*.elf; do
71
77
if [[ $( basename $test ) =~ $pat ]];
72
78
then continue
73
79
fi
74
- if $RISCVDIR /ocaml_emulator/cheri_riscv_ocaml_sim_RV64 " $test " > " ${test/ .elf/ .out} " 2>&1 && grep -q SUCCESS " ${test/ .elf/ .out} "
80
+ if $RISCVDIR /ocaml_emulator/cheri_riscv_ocaml_sim_RV64 -with-dtc " $DTC_PATH " " $test " > " ${test/ .elf/ .out} " 2>&1 && grep -q SUCCESS " ${test/ .elf/ .out} "
75
81
then
76
82
green " OCaml-64 $( basename $test ) " " ok"
77
83
else
You can’t perform that action at this time.
0 commit comments