From d5a71b1131778cf2a023855966831eb2457d50d6 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 12 Aug 2016 22:12:41 +0800 Subject: [PATCH] sim: cgen: move cgen_cpu_max_extra_bytes logic into the common code Every arch handles this the same way, so move it to the common code. This will also make unifying the sim_cpu structure easier. --- sim/aarch64/ChangeLog | 4 ++++ sim/aarch64/interp.c | 2 +- sim/arm/ChangeLog | 4 ++++ sim/arm/wrapper.c | 2 +- sim/avr/ChangeLog | 4 ++++ sim/avr/interp.c | 2 +- sim/bfin/ChangeLog | 4 ++++ sim/bfin/interp.c | 2 +- sim/bpf/ChangeLog | 4 ++++ sim/bpf/sim-if.c | 3 +-- sim/common/ChangeLog | 9 +++++++++ sim/common/sim-cpu.c | 15 ++++++++++----- sim/common/sim-cpu.h | 4 ++-- sim/cr16/ChangeLog | 4 ++++ sim/cr16/interp.c | 2 +- sim/cris/ChangeLog | 4 ++++ sim/cris/sim-if.c | 2 +- sim/d10v/ChangeLog | 4 ++++ sim/d10v/interp.c | 2 +- sim/example-synacor/ChangeLog | 4 ++++ sim/example-synacor/interp.c | 2 +- sim/frv/ChangeLog | 4 ++++ sim/frv/sim-if.c | 2 +- sim/ft32/ChangeLog | 4 ++++ sim/ft32/interp.c | 2 +- sim/h8300/ChangeLog | 4 ++++ sim/h8300/compile.c | 2 +- sim/iq2000/ChangeLog | 4 ++++ sim/iq2000/sim-if.c | 2 +- sim/lm32/ChangeLog | 4 ++++ sim/lm32/sim-if.c | 2 +- sim/m32r/ChangeLog | 4 ++++ sim/m32r/sim-if.c | 2 +- sim/m68hc11/ChangeLog | 4 ++++ sim/m68hc11/interp.c | 2 +- sim/mcore/ChangeLog | 4 ++++ sim/mcore/interp.c | 2 +- sim/microblaze/ChangeLog | 4 ++++ sim/microblaze/interp.c | 2 +- sim/mips/ChangeLog | 4 ++++ sim/mips/interp.c | 2 +- sim/mn10300/ChangeLog | 4 ++++ sim/mn10300/interp.c | 2 +- sim/moxie/ChangeLog | 4 ++++ sim/moxie/interp.c | 2 +- sim/msp430/ChangeLog | 4 ++++ sim/msp430/msp430-sim.c | 2 +- sim/or1k/ChangeLog | 4 ++++ sim/or1k/sim-if.c | 2 +- sim/pru/ChangeLog | 4 ++++ sim/pru/interp.c | 2 +- sim/riscv/ChangeLog | 4 ++++ sim/riscv/interp.c | 2 +- sim/sh/ChangeLog | 4 ++++ sim/sh/interp.c | 2 +- sim/v850/ChangeLog | 4 ++++ sim/v850/interp.c | 2 +- 57 files changed, 156 insertions(+), 35 deletions(-) diff --git a/sim/aarch64/ChangeLog b/sim/aarch64/ChangeLog index d328fcddf6e..be8cafb5b38 100644 --- a/sim/aarch64/ChangeLog +++ b/sim/aarch64/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * interp.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-07 Jim Wilson PR sim/27483 diff --git a/sim/aarch64/interp.c b/sim/aarch64/interp.c index 25c3f2e8570..fae2b7a06bb 100644 --- a/sim/aarch64/interp.c +++ b/sim/aarch64/interp.c @@ -329,7 +329,7 @@ sim_open (SIM_OPEN_KIND kind, SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); /* Perform the initialization steps one by one. */ - if (sim_cpu_alloc_all (sd, 1, 0) != SIM_RC_OK + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK || sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK || sim_parse_args (sd, argv) != SIM_RC_OK || sim_analyze_program (sd, diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog index c4f87e374b4..1d0d52872ce 100644 --- a/sim/arm/ChangeLog +++ b/sim/arm/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * wrapper.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-02 Mike Frysinger * aclocal.m4, configure: Regenerate. diff --git a/sim/arm/wrapper.c b/sim/arm/wrapper.c index 5fc753a71af..c89efe4ee97 100644 --- a/sim/arm/wrapper.c +++ b/sim/arm/wrapper.c @@ -800,7 +800,7 @@ sim_open (SIM_OPEN_KIND kind, SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); /* The cpu data is kept in a separately allocated chunk of memory. */ - if (sim_cpu_alloc_all (sd, 1, /*cgen_cpu_max_extra_bytes ()*/0) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { free_state (sd); return 0; diff --git a/sim/avr/ChangeLog b/sim/avr/ChangeLog index 8e9a27d2129..60c54faea2c 100644 --- a/sim/avr/ChangeLog +++ b/sim/avr/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * interp.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-02 Mike Frysinger * aclocal.m4, configure: Regenerate. diff --git a/sim/avr/interp.c b/sim/avr/interp.c index cce84a97f22..c806f4c46eb 100644 --- a/sim/avr/interp.c +++ b/sim/avr/interp.c @@ -1684,7 +1684,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); /* The cpu data is kept in a separately allocated chunk of memory. */ - if (sim_cpu_alloc_all (sd, 1, /*cgen_cpu_max_extra_bytes ()*/0) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { free_state (sd); return 0; diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index 2f363175c64..2a48fe102a3 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * interp.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-02 Mike Frysinger * aclocal.m4, configure: Regenerate. diff --git a/sim/bfin/interp.c b/sim/bfin/interp.c index ceb5939f4e6..747898ceff5 100644 --- a/sim/bfin/interp.c +++ b/sim/bfin/interp.c @@ -723,7 +723,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, SIM_DESC sd = sim_state_alloc (kind, callback); /* The cpu data is kept in a separately allocated chunk of memory. */ - if (sim_cpu_alloc_all (sd, 1, /*cgen_cpu_max_extra_bytes ()*/0) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { free_state (sd); return 0; diff --git a/sim/bpf/ChangeLog b/sim/bpf/ChangeLog index 89db85dd7c4..79b66920860 100644 --- a/sim/bpf/ChangeLog +++ b/sim/bpf/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * sim-if.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-08 Tom Tromey * bpf.c (bpf_def_model_init): Use new-style declaration. diff --git a/sim/bpf/sim-if.c b/sim/bpf/sim-if.c index ad75ac4affa..c2c01fc547a 100644 --- a/sim/bpf/sim-if.c +++ b/sim/bpf/sim-if.c @@ -122,8 +122,7 @@ sim_open (SIM_OPEN_KIND kind, SIM_DESC sd = sim_state_alloc (kind, callback); - if (sim_cpu_alloc_all (sd, 1, cgen_cpu_max_extra_bytes ()) - != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) goto error; if (sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK) diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index ca0829cd631..dd4391e36d9 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,12 @@ +2021-04-12 Mike Frysinger + + * sim-cpu.c (sim_cpu_alloc_all): Delete 3rd arg. Delete 2nd arg to + sim_cpu_alloc. + (sim_cpu_alloc): Move extra_bytes to local var. Add result of + cgen_cpu_max_extra_bytes. + * sim-cpu.h (sim_cpu_alloc_all): Delete 3rd arg. + (sim_cpu_alloc): Delete 2nd arg. + 2021-04-08 Tom Tromey * cgen-utils.c (RORQI, ROLQI, RORHI, ROLHI, RORSI, ROLSI): Use diff --git a/sim/common/sim-cpu.c b/sim/common/sim-cpu.c index a00846cd4c6..552e48c1970 100644 --- a/sim/common/sim-cpu.c +++ b/sim/common/sim-cpu.c @@ -23,17 +23,16 @@ along with this program. If not, see . */ #include "bfd.h" /* Allocate space for all cpus in the simulator. - Space for the cpu must currently exist prior to parsing ARGV. - EXTRA_BYTES is additional space to allocate for the sim_cpu struct. */ + Space for the cpu must currently exist prior to parsing ARGV. */ /* ??? wip. better solution must wait. */ SIM_RC -sim_cpu_alloc_all (SIM_DESC sd, int ncpus, int extra_bytes) +sim_cpu_alloc_all (SIM_DESC sd, int ncpus) { int c; for (c = 0; c < ncpus; ++c) - STATE_CPU (sd, c) = sim_cpu_alloc (sd, extra_bytes); + STATE_CPU (sd, c) = sim_cpu_alloc (sd); return SIM_RC_OK; } @@ -41,8 +40,14 @@ sim_cpu_alloc_all (SIM_DESC sd, int ncpus, int extra_bytes) EXTRA_BYTES is additional space to allocate for the sim_cpu struct. */ sim_cpu * -sim_cpu_alloc (SIM_DESC sd, int extra_bytes) +sim_cpu_alloc (SIM_DESC sd) { + int extra_bytes = 0; + +#ifdef CGEN_ARCH + extra_bytes += cgen_cpu_max_extra_bytes (); +#endif + return zalloc (sizeof (sim_cpu) + extra_bytes); } diff --git a/sim/common/sim-cpu.h b/sim/common/sim-cpu.h index f195a6144c6..7648ba50e9f 100644 --- a/sim/common/sim-cpu.h +++ b/sim/common/sim-cpu.h @@ -123,9 +123,9 @@ typedef struct { } sim_cpu_base; /* Create all cpus. */ -extern SIM_RC sim_cpu_alloc_all (SIM_DESC, int, int); +extern SIM_RC sim_cpu_alloc_all (SIM_DESC, int); /* Create a cpu. */ -extern sim_cpu *sim_cpu_alloc (SIM_DESC, int); +extern sim_cpu *sim_cpu_alloc (SIM_DESC); /* Release resources held by all cpus. */ extern void sim_cpu_free_all (SIM_DESC); /* Release resources held by a cpu. */ diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog index 4ab5fb4019d..274d89fdb7d 100644 --- a/sim/cr16/ChangeLog +++ b/sim/cr16/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * interp.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-02 Mike Frysinger * aclocal.m4, configure: Regenerate. diff --git a/sim/cr16/interp.c b/sim/cr16/interp.c index cff7b885718..f0e0f76224a 100644 --- a/sim/cr16/interp.c +++ b/sim/cr16/interp.c @@ -397,7 +397,7 @@ sim_open (SIM_OPEN_KIND kind, struct host_callback_struct *cb, SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); /* The cpu data is kept in a separately allocated chunk of memory. */ - if (sim_cpu_alloc_all (sd, 1, /*cgen_cpu_max_extra_bytes ()*/0) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { free_state (sd); return 0; diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog index 45907986303..1efd0a54932 100644 --- a/sim/cris/ChangeLog +++ b/sim/cris/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * sim-if.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-08 Tom Tromey * traps.c: Include stdlib.h. diff --git a/sim/cris/sim-if.c b/sim/cris/sim-if.c index 787896cae23..9914912b156 100644 --- a/sim/cris/sim-if.c +++ b/sim/cris/sim-if.c @@ -659,7 +659,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd, bfd_byte sp_init[4] = {0, 0, 0, 0}; /* The cpu data is kept in a separately allocated chunk of memory. */ - if (sim_cpu_alloc_all (sd, 1, cgen_cpu_max_extra_bytes ()) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { free_state (sd); return 0; diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog index 835c1a9f8b2..e05746f6f15 100644 --- a/sim/d10v/ChangeLog +++ b/sim/d10v/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * interp.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-02 Mike Frysinger * aclocal.m4, configure: Regenerate. diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c index 276c76beab0..4fa2069fda1 100644 --- a/sim/d10v/interp.c +++ b/sim/d10v/interp.c @@ -751,7 +751,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); /* The cpu data is kept in a separately allocated chunk of memory. */ - if (sim_cpu_alloc_all (sd, 1, /*cgen_cpu_max_extra_bytes ()*/0) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { free_state (sd); return 0; diff --git a/sim/example-synacor/ChangeLog b/sim/example-synacor/ChangeLog index 801175b888e..4e664e2a14a 100644 --- a/sim/example-synacor/ChangeLog +++ b/sim/example-synacor/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * interp.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-03 Mike Frysinger * configure.ac, interp.c, Makefile.in, README, README.arch-spec, diff --git a/sim/example-synacor/interp.c b/sim/example-synacor/interp.c index a422fbde9b4..d2080b6f7f2 100644 --- a/sim/example-synacor/interp.c +++ b/sim/example-synacor/interp.c @@ -82,7 +82,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, SIM_DESC sd = sim_state_alloc (kind, callback); /* The cpu data is kept in a separately allocated chunk of memory. */ - if (sim_cpu_alloc_all (sd, 1, /*cgen_cpu_max_extra_bytes ()*/0) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { free_state (sd); return 0; diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog index a067ff80c3e..1ec05977f69 100644 --- a/sim/frv/ChangeLog +++ b/sim/frv/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * sim-if.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-08 Tom Tromey * traps.c: Include stdlib.h. diff --git a/sim/frv/sim-if.c b/sim/frv/sim-if.c index 9351f79e053..65e29375369 100644 --- a/sim/frv/sim-if.c +++ b/sim/frv/sim-if.c @@ -52,7 +52,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, bfd *abfd, SIM_DESC sd = sim_state_alloc (kind, callback); /* The cpu data is kept in a separately allocated chunk of memory. */ - if (sim_cpu_alloc_all (sd, 1, cgen_cpu_max_extra_bytes ()) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { free_state (sd); return 0; diff --git a/sim/ft32/ChangeLog b/sim/ft32/ChangeLog index 236d0e61fbc..6d6ef90c14f 100644 --- a/sim/ft32/ChangeLog +++ b/sim/ft32/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * interp.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-02 Mike Frysinger * aclocal.m4, configure: Regenerate. diff --git a/sim/ft32/interp.c b/sim/ft32/interp.c index 1b3db9bc008..ba2297f4078 100644 --- a/sim/ft32/interp.c +++ b/sim/ft32/interp.c @@ -807,7 +807,7 @@ sim_open (SIM_OPEN_KIND kind, SIM_DESC sd = sim_state_alloc (kind, cb); /* The cpu data is kept in a separately allocated chunk of memory. */ - if (sim_cpu_alloc_all (sd, 1, /*cgen_cpu_max_extra_bytes ()*/0) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { free_state (sd); return 0; diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog index 2b2c6a73fc0..806f05332d8 100644 --- a/sim/h8300/ChangeLog +++ b/sim/h8300/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * compile.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-08 Tom Tromey * compile.c (init_pointers): Fix sequence point warning. diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c index c8060b27ab7..fb0e51b2e58 100644 --- a/sim/h8300/compile.c +++ b/sim/h8300/compile.c @@ -4659,7 +4659,7 @@ sim_open (SIM_OPEN_KIND kind, sd = sim_state_alloc (kind, callback); /* The cpu data is kept in a separately allocated chunk of memory. */ - if (sim_cpu_alloc_all (sd, 1, /*cgen_cpu_max_extra_bytes ()*/0) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { free_state (sd); return 0; diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog index 95ad2a8ce6e..4cace111f63 100644 --- a/sim/iq2000/ChangeLog +++ b/sim/iq2000/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * sim-if.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-08 Tom Tromey * iq2000.c: Include stdlib.h. diff --git a/sim/iq2000/sim-if.c b/sim/iq2000/sim-if.c index 158c6e7574a..4db2e4d9b06 100644 --- a/sim/iq2000/sim-if.c +++ b/sim/iq2000/sim-if.c @@ -58,7 +58,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd, SIM_DESC sd = sim_state_alloc (kind, callback); /* The cpu data is kept in a separately allocated chunk of memory. */ - if (sim_cpu_alloc_all (sd, 1, cgen_cpu_max_extra_bytes ()) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { free_state (sd); return 0; diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog index 92e86af34a6..32766f07950 100644 --- a/sim/lm32/ChangeLog +++ b/sim/lm32/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * sim-if.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-08 Tom Tromey * sim-if.c (sim_open, sim_create_inferior): Use new-style diff --git a/sim/lm32/sim-if.c b/sim/lm32/sim-if.c index 398eb60c67a..c97a45129dc 100644 --- a/sim/lm32/sim-if.c +++ b/sim/lm32/sim-if.c @@ -89,7 +89,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd, unsigned long base, limit; /* The cpu data is kept in a separately allocated chunk of memory. */ - if (sim_cpu_alloc_all (sd, 1, cgen_cpu_max_extra_bytes ()) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { free_state (sd); return 0; diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog index 3252bdea457..123bcf4fb19 100644 --- a/sim/m32r/ChangeLog +++ b/sim/m32r/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * sim-if.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-08 Tom Tromey * traps.c: Include stdlib.h. diff --git a/sim/m32r/sim-if.c b/sim/m32r/sim-if.c index 42cf728e79e..8d9f4324c9c 100644 --- a/sim/m32r/sim-if.c +++ b/sim/m32r/sim-if.c @@ -52,7 +52,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd, int i; /* The cpu data is kept in a separately allocated chunk of memory. */ - if (sim_cpu_alloc_all (sd, 1, cgen_cpu_max_extra_bytes ()) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { free_state (sd); return 0; diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog index 1ec27ec1b68..8a35a0cb5bf 100644 --- a/sim/m68hc11/ChangeLog +++ b/sim/m68hc11/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * interp.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-02 Mike Frysinger * aclocal.m4, configure: Regenerate. diff --git a/sim/m68hc11/interp.c b/sim/m68hc11/interp.c index 7dc8e25c046..91d4d25b322 100644 --- a/sim/m68hc11/interp.c +++ b/sim/m68hc11/interp.c @@ -404,7 +404,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); /* The cpu data is kept in a separately allocated chunk of memory. */ - if (sim_cpu_alloc_all (sd, 1, /*cgen_cpu_max_extra_bytes ()*/0) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { free_state (sd); return 0; diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog index 20a75d6000c..00da8817104 100644 --- a/sim/mcore/ChangeLog +++ b/sim/mcore/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * interp.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-02 Mike Frysinger * aclocal.m4, configure: Regenerate. diff --git a/sim/mcore/interp.c b/sim/mcore/interp.c index 9981517e1e6..09e005f1d39 100644 --- a/sim/mcore/interp.c +++ b/sim/mcore/interp.c @@ -1349,7 +1349,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); /* The cpu data is kept in a separately allocated chunk of memory. */ - if (sim_cpu_alloc_all (sd, 1, /*cgen_cpu_max_extra_bytes ()*/0) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { free_state (sd); return 0; diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog index 122b064e315..48b264c713d 100644 --- a/sim/microblaze/ChangeLog +++ b/sim/microblaze/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * interp.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-02 Mike Frysinger * aclocal.m4, configure: Regenerate. diff --git a/sim/microblaze/interp.c b/sim/microblaze/interp.c index 8a9dbc3245a..2bd067c6dc5 100644 --- a/sim/microblaze/interp.c +++ b/sim/microblaze/interp.c @@ -393,7 +393,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); /* The cpu data is kept in a separately allocated chunk of memory. */ - if (sim_cpu_alloc_all (sd, 1, /*cgen_cpu_max_extra_bytes ()*/0) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { free_state (sd); return 0; diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog index 6d515f80486..b1580749668 100644 --- a/sim/mips/ChangeLog +++ b/sim/mips/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * interp.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-08 Simon Marchi * Makefile.in: Set ASAN_OPTIONS when running igen. diff --git a/sim/mips/interp.c b/sim/mips/interp.c index 55b089dbee9..64259cc3fed 100644 --- a/sim/mips/interp.c +++ b/sim/mips/interp.c @@ -350,7 +350,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); /* The cpu data is kept in a separately allocated chunk of memory. */ - if (sim_cpu_alloc_all (sd, 1, /*cgen_cpu_max_extra_bytes ()*/0) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) return 0; cpu = STATE_CPU (sd, 0); /* FIXME */ diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog index 9b3a9c58134..5638b8621ef 100644 --- a/sim/mn10300/ChangeLog +++ b/sim/mn10300/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * interp.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-08 Simon Marchi * Makefile.in: Set ASAN_OPTIONS when running igen. diff --git a/sim/mn10300/interp.c b/sim/mn10300/interp.c index 1c9c6905afc..55e9e212fe7 100644 --- a/sim/mn10300/interp.c +++ b/sim/mn10300/interp.c @@ -93,7 +93,7 @@ sim_open (SIM_OPEN_KIND kind, SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); /* The cpu data is kept in a separately allocated chunk of memory. */ - if (sim_cpu_alloc_all (sd, 1, /*cgen_cpu_max_extra_bytes ()*/0) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) return 0; /* for compatibility */ diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog index 95ddb4fa3b3..7814bcfd735 100644 --- a/sim/moxie/ChangeLog +++ b/sim/moxie/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * interp.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-08 Luis Machado * Makefile.in (moxie-gdb.dtb): Add maintainer mode dependency. diff --git a/sim/moxie/interp.c b/sim/moxie/interp.c index da97397c506..5da13f7808c 100644 --- a/sim/moxie/interp.c +++ b/sim/moxie/interp.c @@ -1197,7 +1197,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); /* The cpu data is kept in a separately allocated chunk of memory. */ - if (sim_cpu_alloc_all (sd, 1, /*cgen_cpu_max_extra_bytes ()*/0) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { free_state (sd); return 0; diff --git a/sim/msp430/ChangeLog b/sim/msp430/ChangeLog index 69faefd4115..80bd1b2a231 100644 --- a/sim/msp430/ChangeLog +++ b/sim/msp430/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * msp430-sim.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-02 Mike Frysinger * aclocal.m4, configure: Regenerate. diff --git a/sim/msp430/msp430-sim.c b/sim/msp430/msp430-sim.c index ea7a157231c..4e213f978c6 100644 --- a/sim/msp430/msp430-sim.c +++ b/sim/msp430/msp430-sim.c @@ -110,7 +110,7 @@ sim_open (SIM_OPEN_KIND kind, /* Initialise the simulator. */ - if (sim_cpu_alloc_all (sd, 1, /*cgen_cpu_max_extra_bytes ()*/0) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { sim_state_free (sd); return 0; diff --git a/sim/or1k/ChangeLog b/sim/or1k/ChangeLog index 934a9d6e926..710bb223f7b 100644 --- a/sim/or1k/ChangeLog +++ b/sim/or1k/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * sim-if.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-02 Mike Frysinger * aclocal.m4, configure: Regenerate. diff --git a/sim/or1k/sim-if.c b/sim/or1k/sim-if.c index b5258a828a5..41dbaaebf1d 100644 --- a/sim/or1k/sim-if.c +++ b/sim/or1k/sim-if.c @@ -158,7 +158,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd, int i; /* The cpu data is kept in a separately allocated chunk of memory. */ - if (sim_cpu_alloc_all (sd, 1, cgen_cpu_max_extra_bytes ()) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { free_state (sd); return 0; diff --git a/sim/pru/ChangeLog b/sim/pru/ChangeLog index a22bf17ce9a..d00bf5fc47f 100644 --- a/sim/pru/ChangeLog +++ b/sim/pru/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * interp.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-02 Mike Frysinger * aclocal.m4, configure: Regenerate. diff --git a/sim/pru/interp.c b/sim/pru/interp.c index 2933075bd08..8d247f3795f 100644 --- a/sim/pru/interp.c +++ b/sim/pru/interp.c @@ -744,7 +744,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); /* The cpu data is kept in a separately allocated chunk of memory. */ - if (sim_cpu_alloc_all (sd, 1, /*cgen_cpu_max_extra_bytes ()*/0) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { free_state (sd); return 0; diff --git a/sim/riscv/ChangeLog b/sim/riscv/ChangeLog index 40e6d94b29f..f69e4e95676 100644 --- a/sim/riscv/ChangeLog +++ b/sim/riscv/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * interp.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-02 Mike Frysinger * aclocal.m4, configure: Regenerate. diff --git a/sim/riscv/interp.c b/sim/riscv/interp.c index 1bf60a43aec..6192b6dc5b2 100644 --- a/sim/riscv/interp.c +++ b/sim/riscv/interp.c @@ -61,7 +61,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, SIM_DESC sd = sim_state_alloc (kind, callback); /* The cpu data is kept in a separately allocated chunk of memory. */ - if (sim_cpu_alloc_all (sd, 1, /*cgen_cpu_max_extra_bytes ()*/0) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { free_state (sd); return 0; diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog index cbf84a9f198..8a62318bbf0 100644 --- a/sim/sh/ChangeLog +++ b/sim/sh/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * interp.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-02 Mike Frysinger * aclocal.m4, configure: Regenerate. diff --git a/sim/sh/interp.c b/sim/sh/interp.c index 872bfe28893..7b9dd521c87 100644 --- a/sim/sh/interp.c +++ b/sim/sh/interp.c @@ -2361,7 +2361,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); /* The cpu data is kept in a separately allocated chunk of memory. */ - if (sim_cpu_alloc_all (sd, 1, /*cgen_cpu_max_extra_bytes ()*/0) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { free_state (sd); return 0; diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog index 4488b2eb772..460706312c0 100644 --- a/sim/v850/ChangeLog +++ b/sim/v850/ChangeLog @@ -1,3 +1,7 @@ +2021-04-12 Mike Frysinger + + * interp.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. + 2021-04-08 Simon Marchi * Makefile.in: Set ASAN_OPTIONS when running igen. diff --git a/sim/v850/interp.c b/sim/v850/interp.c index 76ecab7f7bf..e72dab645dd 100644 --- a/sim/v850/interp.c +++ b/sim/v850/interp.c @@ -195,7 +195,7 @@ sim_open (SIM_OPEN_KIND kind, SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); /* The cpu data is kept in a separately allocated chunk of memory. */ - if (sim_cpu_alloc_all (sd, 1, /*cgen_cpu_max_extra_bytes ()*/0) != SIM_RC_OK) + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) return 0; /* for compatibility */ -- 2.39.2