From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id H/MNOx8w/F9EFAAAWB0awg (envelope-from ) for ; Mon, 11 Jan 2021 06:01:51 -0500 Received: by simark.ca (Postfix, from userid 112) id E2B881EEEF; Mon, 11 Jan 2021 06:01:51 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 6EDE11E4F4 for ; Mon, 11 Jan 2021 06:01:50 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 176EC3861810; Mon, 11 Jan 2021 11:01:50 +0000 (GMT) Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by sourceware.org (Postfix) with ESMTPS id 7082D3861810 for ; Mon, 11 Jan 2021 11:01:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7082D3861810 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wr1-x42a.google.com with SMTP id 91so15935615wrj.7 for ; Mon, 11 Jan 2021 03:01:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=84LHDj8f/dP8RXuwJtBC7AF6jzkykaUMlcThpCoh8CU=; b=QdNVIDb945jK/7OI72AfYqN3bTCGTMmAhYGss9dp4AH9A1eI38nDvIkcOJIeKpA5XF eO6BepAnDyvuzhJH6olGugkf0r+SL0PV2Ly6W5K26G2D6Mtj1yeRsJP58SWuOGKvamBX 1jDgLn5/+I2kPgnKywPaOlz+jGjalcXvMtaOrQBtGvyOmZm04JXgs6/QwWbvuHFiG5pd Ef5vOcO7PVQk8sDgRfeffxTY8GKNFxSKdvrYJ4M2BDxH5ljVpNNWcoTuOQXbr2a7lCrS wivJbAW4neaB+QVoNVChMP7xKVlwuYZL0bznBU6HFzye30HOgQGxFRYa2586mHei/uKh UZjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=84LHDj8f/dP8RXuwJtBC7AF6jzkykaUMlcThpCoh8CU=; b=TWm1wgbe/Ts7UAnOeWySlbcq45pDHZYUfMzTwts5u0A0wE8IcjVqHQyDcpqRFn/EH7 RSolChpb5/ro9KawgJgavIKyoE8FnsFsEyuJyiACRX1to6uVwjanlVV0DLSxWUlf8GLC 72NUms5up3xoSwSOp2HjUPceTPZFW5Cub5ovrr6gDiv09ieh4m/b/JJNKl7ppESB6MZk YXo5BkxxbWCLFk3kAcCIrVlkXm1Fd6F9/3ldmGJPDaV9uOS4Shx7j1+pCuMcLuLC14Ay e/n+QsDndt8qZxBnTubN7Re0OLEkKxdOCFH+veZNqJBYbzlKQaaF/8uKMDmYSgT3ZqUK bdBg== X-Gm-Message-State: AOAM530Xtaija277D4qKvLZybb/YRL81Hp8MUBP+oc5FIZcgds+IccrF ZTM/HGMmpvF9hTNngENV3jX3iEwrNFf3AA== X-Google-Smtp-Source: ABdhPJytj7Dps8Flbi7R8wYlThg9DOgJz3bD7Mudy/kcu5mV2BLyOCsHklBSalknnWaTTU+6l//vLQ== X-Received: by 2002:a5d:56c3:: with SMTP id m3mr15750291wrw.419.1610362905363; Mon, 11 Jan 2021 03:01:45 -0800 (PST) Received: from localhost (host86-166-129-230.range86-166.btcentralplus.com. [86.166.129.230]) by smtp.gmail.com with ESMTPSA id g78sm21055433wme.33.2021.01.11.03.01.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 03:01:44 -0800 (PST) Date: Mon, 11 Jan 2021 11:01:43 +0000 From: Andrew Burgess To: Mike Frysinger Subject: Re: [PATCH] sim: cgen: move cgen_cpu_max_extra_bytes logic into the common code Message-ID: <20210111110143.GB1151657@embecosm.com> References: <20210110082503.20886-1-vapier@gentoo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210110082503.20886-1-vapier@gentoo.org> X-Operating-System: Linux/5.8.13-100.fc31.x86_64 (x86_64) X-Uptime: 11:00:19 up 33 days, 15:44, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" * Mike Frysinger via Gdb-patches [2021-01-10 03:25:03 -0500]: > Every arch handles this the same way, so move it to the common code. > This will also make unifying the sim_cpu structure easier. Please can you include the ChangeLog entries with the patch submissions. Could we not remove the `extra_bytes` parameter from sim_cpu_alloc_all now? As far as I can tell it is always passed as 0? Or have I missed something? Thanks, Andrew > --- > sim/arm/wrapper.c | 2 +- > sim/avr/interp.c | 2 +- > sim/bfin/interp.c | 2 +- > sim/bpf/sim-if.c | 3 +-- > sim/common/sim-cpu.c | 4 ++++ > sim/cr16/interp.c | 2 +- > sim/cris/sim-if.c | 2 +- > sim/d10v/interp.c | 2 +- > sim/frv/sim-if.c | 2 +- > sim/ft32/interp.c | 2 +- > sim/h8300/compile.c | 2 +- > sim/iq2000/sim-if.c | 2 +- > sim/lm32/sim-if.c | 2 +- > sim/m32r/sim-if.c | 2 +- > sim/m68hc11/interp.c | 2 +- > sim/mcore/interp.c | 2 +- > sim/microblaze/interp.c | 2 +- > sim/mips/interp.c | 2 +- > sim/mn10300/interp.c | 2 +- > sim/moxie/interp.c | 2 +- > sim/msp430/msp430-sim.c | 2 +- > sim/or1k/sim-if.c | 2 +- > sim/pru/interp.c | 2 +- > sim/sh/interp.c | 2 +- > sim/v850/interp.c | 2 +- > 25 files changed, 28 insertions(+), 25 deletions(-) > > diff --git a/sim/arm/wrapper.c b/sim/arm/wrapper.c > index 5fc753a71af2..7f0e1a5a35ef 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, 0) != SIM_RC_OK) > { > free_state (sd); > return 0; > diff --git a/sim/avr/interp.c b/sim/avr/interp.c > index deaf711e1040..837cca6181cd 100644 > --- a/sim/avr/interp.c > +++ b/sim/avr/interp.c > @@ -1685,7 +1685,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, 0) != SIM_RC_OK) > { > free_state (sd); > return 0; > diff --git a/sim/bfin/interp.c b/sim/bfin/interp.c > index e26a8221b20a..0470991a40e7 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, 0) != SIM_RC_OK) > { > free_state (sd); > return 0; > diff --git a/sim/bpf/sim-if.c b/sim/bpf/sim-if.c > index ad75ac4affa6..1d77c4f937d3 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, 0) != SIM_RC_OK) > goto error; > > if (sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK) > diff --git a/sim/common/sim-cpu.c b/sim/common/sim-cpu.c > index a00846cd4c6a..a7aa13e6fb2b 100644 > --- a/sim/common/sim-cpu.c > +++ b/sim/common/sim-cpu.c > @@ -43,6 +43,10 @@ sim_cpu_alloc_all (SIM_DESC sd, int ncpus, int extra_bytes) > sim_cpu * > sim_cpu_alloc (SIM_DESC sd, int extra_bytes) > { > +#ifdef CGEN_ARCH > + extra_bytes += cgen_cpu_max_extra_bytes (); > +#endif > + > return zalloc (sizeof (sim_cpu) + extra_bytes); > } > > diff --git a/sim/cr16/interp.c b/sim/cr16/interp.c > index cff7b8857189..fb63b1954cc1 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, 0) != SIM_RC_OK) > { > free_state (sd); > return 0; > diff --git a/sim/cris/sim-if.c b/sim/cris/sim-if.c > index b8c7cb2a96e7..3e1bff0de6c3 100644 > --- a/sim/cris/sim-if.c > +++ b/sim/cris/sim-if.c > @@ -661,7 +661,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, 0) != SIM_RC_OK) > { > free_state (sd); > return 0; > diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c > index 5c70b38d9d8f..d0272e816213 100644 > --- a/sim/d10v/interp.c > +++ b/sim/d10v/interp.c > @@ -760,7 +760,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, 0) != SIM_RC_OK) > { > free_state (sd); > return 0; > diff --git a/sim/frv/sim-if.c b/sim/frv/sim-if.c > index 2eb6e6da5f3f..da41f1e97608 100644 > --- a/sim/frv/sim-if.c > +++ b/sim/frv/sim-if.c > @@ -57,7 +57,7 @@ sim_open (kind, callback, abfd, argv) > 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, 0) != SIM_RC_OK) > { > free_state (sd); > return 0; > diff --git a/sim/ft32/interp.c b/sim/ft32/interp.c > index 1b3db9bc0082..ecf33054a17c 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, 0) != SIM_RC_OK) > { > free_state (sd); > return 0; > diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c > index 3a3b2e7241bb..644da035694e 100644 > --- a/sim/h8300/compile.c > +++ b/sim/h8300/compile.c > @@ -4712,7 +4712,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, 0) != SIM_RC_OK) > { > free_state (sd); > return 0; > diff --git a/sim/iq2000/sim-if.c b/sim/iq2000/sim-if.c > index 238ec97e47db..95796704081b 100644 > --- a/sim/iq2000/sim-if.c > +++ b/sim/iq2000/sim-if.c > @@ -61,7 +61,7 @@ sim_open (kind, callback, abfd, argv) > 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, 0) != SIM_RC_OK) > { > free_state (sd); > return 0; > diff --git a/sim/lm32/sim-if.c b/sim/lm32/sim-if.c > index cbe975113b3d..14d120545eb6 100644 > --- a/sim/lm32/sim-if.c > +++ b/sim/lm32/sim-if.c > @@ -94,7 +94,7 @@ sim_open (kind, callback, abfd, argv) > 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, 0) != SIM_RC_OK) > { > free_state (sd); > return 0; > diff --git a/sim/m32r/sim-if.c b/sim/m32r/sim-if.c > index c25d9a859c2c..3525259c328d 100644 > --- a/sim/m32r/sim-if.c > +++ b/sim/m32r/sim-if.c > @@ -63,7 +63,7 @@ sim_open (kind, callback, abfd, argv) > 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, 0) != SIM_RC_OK) > { > free_state (sd); > return 0; > diff --git a/sim/m68hc11/interp.c b/sim/m68hc11/interp.c > index 26f2d1527beb..93641b2a205a 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, 0) != SIM_RC_OK) > { > free_state (sd); > return 0; > diff --git a/sim/mcore/interp.c b/sim/mcore/interp.c > index 9981517e1e69..5f17bbd88a53 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, 0) != SIM_RC_OK) > { > free_state (sd); > return 0; > diff --git a/sim/microblaze/interp.c b/sim/microblaze/interp.c > index 5b125a64da27..b3d1a849db1a 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, 0) != SIM_RC_OK) > { > free_state (sd); > return 0; > diff --git a/sim/mips/interp.c b/sim/mips/interp.c > index 9dbac8c58fc7..13fe58645236 100644 > --- a/sim/mips/interp.c > +++ b/sim/mips/interp.c > @@ -357,7 +357,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, 0) != SIM_RC_OK) > return 0; > > cpu = STATE_CPU (sd, 0); /* FIXME */ > diff --git a/sim/mn10300/interp.c b/sim/mn10300/interp.c > index 7f0655f3f472..376243edf0e4 100644 > --- a/sim/mn10300/interp.c > +++ b/sim/mn10300/interp.c > @@ -103,7 +103,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, 0) != SIM_RC_OK) > return 0; > > /* for compatibility */ > diff --git a/sim/moxie/interp.c b/sim/moxie/interp.c > index f895af6f1bb4..7d04bd22d1e4 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, 0) != SIM_RC_OK) > { > free_state (sd); > return 0; > diff --git a/sim/msp430/msp430-sim.c b/sim/msp430/msp430-sim.c > index ea7a157231cf..982fc9fd5c0d 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, 0) != SIM_RC_OK) > { > sim_state_free (sd); > return 0; > diff --git a/sim/or1k/sim-if.c b/sim/or1k/sim-if.c > index 18f70387063f..e022c7eab61b 100644 > --- a/sim/or1k/sim-if.c > +++ b/sim/or1k/sim-if.c > @@ -166,7 +166,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, 0) != SIM_RC_OK) > { > free_state (sd); > return 0; > diff --git a/sim/pru/interp.c b/sim/pru/interp.c > index 2933075bd08f..090a28537d4b 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, 0) != SIM_RC_OK) > { > free_state (sd); > return 0; > diff --git a/sim/sh/interp.c b/sim/sh/interp.c > index c77cf3b1d3bf..2267bedfb8b8 100644 > --- a/sim/sh/interp.c > +++ b/sim/sh/interp.c > @@ -2373,7 +2373,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, 0) != SIM_RC_OK) > { > free_state (sd); > return 0; > diff --git a/sim/v850/interp.c b/sim/v850/interp.c > index daf961801768..7a9fabae2834 100644 > --- a/sim/v850/interp.c > +++ b/sim/v850/interp.c > @@ -204,7 +204,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, 0) != SIM_RC_OK) > return 0; > > /* for compatibility */ > -- > 2.28.0 >