diff options
| author | Robert Norton | 2018-06-26 16:41:13 +0100 |
|---|---|---|
| committer | Robert Norton | 2018-06-26 16:43:48 +0100 |
| commit | d2d227a23d96c11b619ec17d9e35d82bef543a62 (patch) | |
| tree | eca18fbfc8fae8f86e4cfdfb68f4ae2204b160a1 | |
| parent | 68703bf244a10e5281625b0cb1d620d78d6c5cbb (diff) | |
turn on warnings when compiling mips c then dial back ones that are triggered by generated code (probably false positives). Fix some warnings in rts.c
| -rw-r--r-- | cheri/Makefile | 3 | ||||
| -rw-r--r-- | lib/rts.c | 6 | ||||
| -rw-r--r-- | lib/rts.h | 6 | ||||
| -rw-r--r-- | mips/Makefile | 4 |
4 files changed, 11 insertions, 8 deletions
diff --git a/cheri/Makefile b/cheri/Makefile index 42c7ef86..dfd33ef4 100644 --- a/cheri/Makefile +++ b/cheri/Makefile @@ -32,6 +32,9 @@ cheri_trace: $(CHERI_SAILS) $(CHERI_MAIN) cheri.c: $(CHERI_SAILS) $(CHERI_MAIN) $(SAIL) -memo_z3 -c $^ 1> $@ +cheri_c: cheri.c ../lib/sail.h Makefile + gcc -O2 -g -I ../lib $< ../lib/*.c -lgmp -lz -o $@ + latex_128: $(MIPS_SAIL_DIR)/prelude.sail $(CHERI_SAIL_DIR)/cheri_types.sail $(CHERI_SAIL_DIR)/cheri_prelude_128.sail rm -rf sail_latexcc $(SAIL) -latex -latex_prefix sailcc -o sail_latexcc $^ @@ -6,6 +6,8 @@ #include"rts.h" #include"elf.h" +static uint64_t g_elf_entry; + void sail_match_failure(sail_string msg) { fprintf(stderr, "Pattern match failure in %s\n", msg); @@ -236,6 +238,10 @@ void load_image(char *file) // ***** Tracing support ***** +static int64_t g_trace_depth; +//static int64_t g_trace_max_depth; +static bool g_trace_enabled; + unit enable_tracing(const unit u) { g_trace_depth = 0; @@ -63,10 +63,6 @@ void load_image(char *); /* ***** Tracing ***** */ -static int64_t g_trace_depth; -static int64_t g_trace_max_depth; -static bool g_trace_enabled; - /* * Bind these functions in Sail to enable and disable tracing (see * lib/trace.sail): @@ -119,8 +115,6 @@ unit cycle_count(const unit); * Functions to get info from ELF files. */ -static uint64_t g_elf_entry; - void elf_entry(sail_int *rop, const unit u); void elf_tohost(sail_int *rop, const unit u); diff --git a/mips/Makefile b/mips/Makefile index b43dd5d9..3592ac54 100644 --- a/mips/Makefile +++ b/mips/Makefile @@ -18,8 +18,8 @@ mips: $(MIPS_PRE) $(MIPS_TLB) $(MIPS_SAILS) $(MIPS_MAIN) ../sail mips.c: $(MIPS_PRE) $(MIPS_TLB) $(MIPS_SAILS) $(MIPS_MAIN) Makefile ../sail $(SAIL) -O -memo_z3 -c $(filter %.sail, $^) 1> $@ -mips_c: mips.c ../lib/sail.h Makefile - gcc -O2 -g -I ../lib $< ../lib/*.c -lgmp -lz -o $@ +mips_c: mips.c ../lib/sail.h ../lib/*.c Makefile + gcc -Wall -Wno-unused-but-set-variable -Wno-unused-label -Wno-maybe-uninitialized -Wno-return-type -O2 -g -I ../lib $< ../lib/*.c -lgmp -lz -o $@ sim.dtb: sim.dts dtc -O dtb -o $@ -b 0 $< |
