diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-06-23 20:19:53 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-06-24 23:52:06 -0400 |
commit | a7cde6df4039dc575469430bbb7caa4706840d93 (patch) | |
tree | 22c008bdc2d56cfc717f617982d318e3327f4437 /sim/cris | |
parent | bdedb2d21b3f0aceb391a96b8605d35f3a4ade5c (diff) | |
download | gdb-a7cde6df4039dc575469430bbb7caa4706840d93.zip gdb-a7cde6df4039dc575469430bbb7caa4706840d93.tar.gz gdb-a7cde6df4039dc575469430bbb7caa4706840d93.tar.bz2 |
sim: cris: fix a few missing prototype warnings
Add a stub prototype for the dump function meant to be called by devs
from gdb, and trim unused functions that aren't supposed to be used.
Diffstat (limited to 'sim/cris')
-rw-r--r-- | sim/cris/ChangeLog | 8 | ||||
-rw-r--r-- | sim/cris/cris-sim.h | 1 | ||||
-rw-r--r-- | sim/cris/traps.c | 34 |
3 files changed, 11 insertions, 32 deletions
diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog index 1f4bd8b..e22e99f 100644 --- a/sim/cris/ChangeLog +++ b/sim/cris/ChangeLog @@ -1,3 +1,11 @@ +2021-06-24 Mike Frysinger <vapier@gentoo.org> + + * cris-sim.h (cris_bmod_handler): Delete. + * traps.c (cris_dump_map): New prototype. + (cris_bmod_handler): Delete. + (h_supr_set_handler): Likewise. + (h_supr_get_handler): Likewise. + 2021-06-23 Mike Frysinger <vapier@gentoo.org> * traps.c (cris_getpid): New function. diff --git a/sim/cris/cris-sim.h b/sim/cris/cris-sim.h index dfd2cb8..13e8c4a 100644 --- a/sim/cris/cris-sim.h +++ b/sim/cris/cris-sim.h @@ -79,7 +79,6 @@ typedef struct { /* Handler prototypes for functions called from the CGEN description. */ -extern USI cris_bmod_handler (SIM_CPU *, UINT, USI); extern void cris_flush_simulator_decode_cache (SIM_CPU *, USI); extern USI crisv10f_break_handler (SIM_CPU *, USI, USI); extern USI crisv32f_break_handler (SIM_CPU *, USI, USI); diff --git a/sim/cris/traps.c b/sim/cris/traps.c index fd7f9bc..49f99ba 100644 --- a/sim/cris/traps.c +++ b/sim/cris/traps.c @@ -929,8 +929,10 @@ is_mapped_only (SIM_DESC sd ATTRIBUTE_UNUSED, return 0; } -/* Debug helper; to be run from gdb. */ +/* Provide a prototype to silence -Wmissing-prototypes. */ +void cris_dump_map (SIM_CPU *current_cpu); +/* Debug helper; to be run from gdb. */ void cris_dump_map (SIM_CPU *current_cpu) { @@ -1070,36 +1072,6 @@ sim_engine_invalid_insn (SIM_CPU *current_cpu, IADDR cia, SEM_PC vpc) return vpc; } -/* Handlers from the CGEN description that should not be called. */ - -USI -cris_bmod_handler (SIM_CPU *current_cpu ATTRIBUTE_UNUSED, - UINT srcreg ATTRIBUTE_UNUSED, - USI dstreg ATTRIBUTE_UNUSED) -{ - SIM_DESC sd = CPU_STATE (current_cpu); - abort (); -} - -void -h_supr_set_handler (SIM_CPU *current_cpu ATTRIBUTE_UNUSED, - UINT index ATTRIBUTE_UNUSED, - USI page ATTRIBUTE_UNUSED, - USI newval ATTRIBUTE_UNUSED) -{ - SIM_DESC sd = CPU_STATE (current_cpu); - abort (); -} - -USI -h_supr_get_handler (SIM_CPU *current_cpu ATTRIBUTE_UNUSED, - UINT index ATTRIBUTE_UNUSED, - USI page ATTRIBUTE_UNUSED) -{ - SIM_DESC sd = CPU_STATE (current_cpu); - abort (); -} - /* Swap one context for another. */ static void |