aboutsummaryrefslogtreecommitdiff
path: root/sim/cr16
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-12-25 00:53:25 -0500
committerMike Frysinger <vapier@gentoo.org>2022-12-25 02:10:46 -0500
commit883be197745c9a9ea626cf0671e8bb0109d21a36 (patch)
tree0c19d5fa5fb39952a439f495c29c32e5ea777738 /sim/cr16
parentfc9b04458287e58365b1de8eaf6b626ac11743c2 (diff)
downloadgdb-883be197745c9a9ea626cf0671e8bb0109d21a36.zip
gdb-883be197745c9a9ea626cf0671e8bb0109d21a36.tar.gz
gdb-883be197745c9a9ea626cf0671e8bb0109d21a36.tar.bz2
sim: cpu: change default init to handle all cpus
All the runtimes were only initializing a single CPU. When SMP is enabled, things quickly crash as none of the other CPU structs are setup. Change the default from 0 to the compile time value.
Diffstat (limited to 'sim/cr16')
-rw-r--r--sim/cr16/interp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sim/cr16/interp.c b/sim/cr16/interp.c
index 1830e34..fe1e24b 100644
--- a/sim/cr16/interp.c
+++ b/sim/cr16/interp.c
@@ -407,7 +407,7 @@ sim_open (SIM_OPEN_KIND kind, struct host_callback_struct *cb,
cb->syscall_map = cb_cr16_syscall_map;
/* The cpu data is kept in a separately allocated chunk of memory. */
- if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK)
+ if (sim_cpu_alloc_all (sd, 0) != SIM_RC_OK)
{
free_state (sd);
return 0;