From 906192d7859f9e768fc73f330e10d3b3a4ddaba3 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 5 Jun 2021 10:21:46 -0400 Subject: sim: cgen: inline cgen_init logic This function has done only one thing: post-process command line settings to see if profiling or tracing has been enabled, and if so, set the run_fast_p flag in the simulator state. That flag is only used in one place: to select the fast or slow cgen engine. By inlining the run_fast_p logic to the one place it's used, we can delete a good amount of logic specific to cgen ports: both the call to cgen_init and the conditional simulator state. This in turn allows us to have a single simulator state struct across all ports so we can share objects more between them, and makes the sim_open calls look more consistent. --- sim/m32r/ChangeLog | 4 ++++ sim/m32r/sim-if.c | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sim/m32r') diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog index 04d342d..f9d3079 100644 --- a/sim/m32r/ChangeLog +++ b/sim/m32r/ChangeLog @@ -1,3 +1,7 @@ +2021-06-09 Mike Frysinger + + * sim-if.c (sim_open): Delete cgen_init call. + 2021-05-17 Mike Frysinger * sim-main.h (struct sim_state): Delete. diff --git a/sim/m32r/sim-if.c b/sim/m32r/sim-if.c index a6d8c48..e08a5d4 100644 --- a/sim/m32r/sim-if.c +++ b/sim/m32r/sim-if.c @@ -124,10 +124,6 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd, m32r_cgen_init_dis (cd); } - /* Initialize various cgen things not done by common framework. - Must be done after m32r_cgen_cpu_open. */ - cgen_init (sd); - for (c = 0; c < MAX_NR_PROCESSORS; ++c) { /* Only needed for profiling, but the structure member is small. */ -- cgit v1.1