diff options
Diffstat (limited to 'riscv')
| -rw-r--r-- | riscv/Makefile | 8 | ||||
| -rw-r--r-- | riscv/main.sail | 5 |
2 files changed, 9 insertions, 4 deletions
diff --git a/riscv/Makefile b/riscv/Makefile index 4d2baaf1..e5e21709 100644 --- a/riscv/Makefile +++ b/riscv/Makefile @@ -32,8 +32,11 @@ coverage: _sbuild/coverage.native mkdir bisect && mv bisect*.out bisect/ mkdir coverage && bisect-ppx-report -html coverage/ -I _sbuild/ bisect/bisect*.out -riscv.c: $(SAIL_SRCS) Makefile - $(SAIL) -O -memo_z3 -c $(SAIL_SRCS) 1> $@ +riscv.c: $(SAIL_SRCS) main.sail Makefile + $(SAIL) -O -memo_z3 -c $(SAIL_SRCS) main.sail 1> $@ + +riscv_c: riscv.c + gcc -O2 riscv.c ../lib/*.c -lgmp -lz -I ../lib -o riscv_c latex: $(SAIL_SRCS) Makefile $(SAIL) -latex -latex_prefix sail -o sail_ltx $(SAIL_SRCS) @@ -102,5 +105,6 @@ clean: -rm -f platform_main.native platform coverage.native -rm -f riscv.vo riscv_types.vo riscv_extras.vo riscv.v riscv_types.v -rm -f riscv_duopod.vo riscv_duopod_types.vo riscv_duopod.v riscv_duopod_types.v + -rm -f riscv.c -Holmake cleanAll ocamlbuild -clean diff --git a/riscv/main.sail b/riscv/main.sail index b2a53b11..32f14177 100644 --- a/riscv/main.sail +++ b/riscv/main.sail @@ -14,8 +14,9 @@ function main () = { PC = __GetSlice_int(64, elf_entry(), 0); try { - init_sys (); - loop (elf_tohost()) + init_platform(); + init_sys(); + loop() } catch { Error_not_implemented(s) => print_string("Error: Not implemented: ", s), Error_internal_error() => print("Error: internal error") |
