]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - sim/m32r/sim-if.c
sim: m32r: invert sim_cpu storage
[thirdparty/binutils-gdb.git] / sim / m32r / sim-if.c
index 878a0d5f576412578c6feabf83601f50b3579d9b..401d1020d7049be412c6e23cce174a8292029c83 100644 (file)
@@ -66,7 +66,8 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd,
   current_target_byte_order = BFD_ENDIAN_BIG;
 
   /* 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_extra (sd, 1, sizeof (struct m32r_sim_cpu))
+      != SIM_RC_OK)
     {
       free_state (sd);
       return 0;