From a9d200398aea31fc81191d44f91dad3996780bc8 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 27 Jun 2021 00:02:52 -0400 Subject: [PATCH] sim: frv: fix up various missing prototype warnings Some of these were missing includes, some were unused funcs we can cleanup, and some were missing prototypes for use in other files. --- sim/frv/ChangeLog | 10 ++++++++++ sim/frv/interrupts.c | 1 + sim/frv/profile-fr400.c | 2 ++ sim/frv/reset.c | 1 + sim/frv/sim-if.c | 1 - sim/frv/sim-main.h | 8 ++++++++ 6 files changed, 22 insertions(+), 1 deletion(-) diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog index cb4e2cfeaa1..da32914d379 100644 --- a/sim/frv/ChangeLog +++ b/sim/frv/ChangeLog @@ -1,3 +1,13 @@ +2021-06-27 Mike Frysinger + + * interrupts.c: Include cgen-mem.h. + * profile-fr400.c (acc_use_is_media_p4): Disable function. + * reset.c: Include cgen-mem.h. + * sim-if.c (print_frv_misc_cpu): Delete. + * sim-main.h (FRV_SIM_MAIN_H): Add ifdef guard. + (frvbf_model_branch): New prototype. + (frvbf_perform_writeback): Likewise. + 2021-06-27 Mike Frysinger * profile.c (wait_for_flush): Change %p to %x. diff --git a/sim/frv/interrupts.c b/sim/frv/interrupts.c index 99b27cffa94..64c563a2a89 100644 --- a/sim/frv/interrupts.c +++ b/sim/frv/interrupts.c @@ -27,6 +27,7 @@ along with this program. If not, see . */ #include "sim-signal.h" #include "bfd.h" #include +#include "cgen-mem.h" /* FR-V Interrupt table. Describes the interrupts supported by the FR-V. diff --git a/sim/frv/profile-fr400.c b/sim/frv/profile-fr400.c index f6752d88c10..3f2b6efcb44 100644 --- a/sim/frv/profile-fr400.c +++ b/sim/frv/profile-fr400.c @@ -176,6 +176,7 @@ set_acc_use_not_media_p4 (SIM_CPU *cpu, INT acc) d->cur_acc_p4 &= ~(((DI)1) << acc); } +#if 0 static int acc_use_is_media_p4 (SIM_CPU *cpu, INT acc) { @@ -184,6 +185,7 @@ acc_use_is_media_p4 (SIM_CPU *cpu, INT acc) return d->cur_acc_p4 & (((DI)1) << acc); return 0; } +#endif static void set_use_is_media_p6 (SIM_CPU *cpu, INT fr) diff --git a/sim/frv/reset.c b/sim/frv/reset.c index c87b99f2a95..8b44fab6de6 100644 --- a/sim/frv/reset.c +++ b/sim/frv/reset.c @@ -25,6 +25,7 @@ along with this program. If not, see . */ #include "sim-main.h" #include "bfd.h" +#include "cgen-mem.h" /* Initialize the frv simulator. */ void diff --git a/sim/frv/sim-if.c b/sim/frv/sim-if.c index 3dd76ad7c9c..ac5d83cbed1 100644 --- a/sim/frv/sim-if.c +++ b/sim/frv/sim-if.c @@ -30,7 +30,6 @@ along with this program. If not, see . */ #include "elf-bfd.h" static void free_state (SIM_DESC); -static void print_frv_misc_cpu (SIM_CPU *cpu, int verbose); /* Cover function of sim_state_free to free the cpu buffers as well. */ diff --git a/sim/frv/sim-main.h b/sim/frv/sim-main.h index e2b09a3778d..9297e55521b 100644 --- a/sim/frv/sim-main.h +++ b/sim/frv/sim-main.h @@ -17,6 +17,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#ifndef FRV_SIM_MAIN_H +#define FRV_SIM_MAIN_H + /* Main header for the frv. */ /* This is a global setting. Different cpu families can't mix-n-match -scache @@ -114,3 +117,8 @@ frv_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), \ /* Default memory size. */ #define FRV_DEFAULT_MEM_SIZE 0x800000 /* 8M */ + +void frvbf_model_branch (SIM_CPU *, PCADDR, int hint); +void frvbf_perform_writeback (SIM_CPU *); + +#endif -- 2.30.2