]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: enable common sim_cpu usage everywhere
authorMike Frysinger <vapier@gentoo.org>
Mon, 31 Oct 2022 17:54:51 +0000 (23:39 +0545)
committerMike Frysinger <vapier@gentoo.org>
Wed, 21 Dec 2022 05:00:18 +0000 (00:00 -0500)
All ports should be migrated now.  Drop the SIM_HAVE_COMMON_SIM_CPU
knob and require it be used everywhere now.

29 files changed:
sim/aarch64/sim-main.h
sim/arm/sim-main.h
sim/avr/sim-main.h
sim/bfin/sim-main.h
sim/bpf/sim-main.h
sim/common/sim-cpu.c
sim/common/sim-cpu.h
sim/cr16/sim-main.h
sim/cris/sim-main.h
sim/d10v/sim-main.h
sim/example-synacor/sim-main.h
sim/frv/sim-main.h
sim/ft32/sim-main.h
sim/h8300/sim-main.h
sim/iq2000/sim-main.h
sim/lm32/sim-main.h
sim/m32r/sim-main.h
sim/m68hc11/sim-main.h
sim/mcore/sim-main.h
sim/microblaze/sim-main.h
sim/mips/sim-main.h
sim/mn10300/sim-main.h
sim/moxie/sim-main.h
sim/msp430/sim-main.h
sim/or1k/sim-main.h
sim/pru/sim-main.h
sim/riscv/sim-main.h
sim/sh/sim-main.h
sim/v850/sim-main.h

index 0da730d3a3ecb8c9fd9f4cc9c7feb84bec9224f5..211685f8864b133f11737735b66d600d7fabf415 100644 (file)
@@ -22,8 +22,6 @@
 #ifndef _SIM_MAIN_H
 #define _SIM_MAIN_H
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 #include "sim-basics.h"
 #include "sim-types.h"
 #include "sim-base.h"
index ba44314927a2e777731d8883045041166a246219..bdc5019a3033f021c782774a2e6c8a7b0465a496 100644 (file)
@@ -19,8 +19,6 @@
 #ifndef SIM_MAIN_H
 #define SIM_MAIN_H
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 #include "sim-basics.h"
 #include "sim-base.h"
 #include "bfd.h"
index 63f43dded5fcdafef853d6f43d9a35acfb48f0f9..97129ec9183630b4f0a3ef62515ec993e75b289c 100644 (file)
@@ -19,8 +19,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifndef SIM_MAIN_H
 #define SIM_MAIN_H
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 #include "sim-basics.h"
 
 #include "sim-base.h"
index 48e54c8c8e13dbab6cce5cf13a73c4e89fb208ef..a3855f3ded63a013ab1af71d4d0d786a0a87ae82 100644 (file)
@@ -21,8 +21,6 @@
 #ifndef _BFIN_MAIN_SIM_H_
 #define _BFIN_MAIN_SIM_H_
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 #include "sim-basics.h"
 #include "arch.h"
 #include "sim-base.h"
index 5a29360e389e9e82649df9c6c419e9b5ffd43f65..0de4d4125ae4ca43c9928fc7caf4508929aba98a 100644 (file)
@@ -19,8 +19,6 @@
 #ifndef SIM_MAIN_H
 #define SIM_MAIN_H
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 #include "sim-basics.h"
 #include "cgen-types.h"
 #include "bpf-desc.h"
index 951e9378f2220dfc0c5938235663ce0636b2dfdc..024bd050ab3da8fd68ba0e9abc7cf0fc9e995957 100644 (file)
@@ -46,20 +46,14 @@ sim_cpu_alloc_all_extra (SIM_DESC sd, int ncpus, size_t extra_bytes)
 sim_cpu *
 sim_cpu_alloc_extra (SIM_DESC sd, size_t extra_bytes)
 {
-  sim_cpu *cpu;
+  sim_cpu *cpu = zalloc (sizeof (*cpu));
 
 #ifndef CGEN_ARCH
 # define cgen_cpu_max_extra_bytes(sd) 0
 #endif
-#ifdef SIM_HAVE_COMMON_SIM_CPU
-  cpu = zalloc (sizeof (*cpu));
-
   extra_bytes += cgen_cpu_max_extra_bytes (sd);
   if (extra_bytes)
     CPU_ARCH_DATA (cpu) = zalloc (extra_bytes);
-#else
-  cpu = zalloc (sizeof (*cpu) + cgen_cpu_max_extra_bytes (sd));
-#endif
 
   return cpu;
 }
@@ -81,10 +75,7 @@ sim_cpu_free_all (SIM_DESC sd)
 void
 sim_cpu_free (sim_cpu *cpu)
 {
-#ifdef SIM_HAVE_COMMON_SIM_CPU
   free (CPU_ARCH_DATA (cpu));
-#endif
-
   free (cpu);
 }
 \f
index e895664c2efb7d35bc0776e1d5e0d26a88713164..83244e09c9eaed79de8427d10444d9426c73e76c 100644 (file)
@@ -126,7 +126,6 @@ typedef struct {
 
 } sim_cpu_base;
 
-#ifdef SIM_HAVE_COMMON_SIM_CPU
 struct _sim_cpu {
   /* All the common state.  */
   sim_cpu_base base;
@@ -142,7 +141,6 @@ struct _sim_cpu {
   void *arch_data;
 #define CPU_ARCH_DATA(cpu) ((cpu)->arch_data)
 };
-#endif
 
 /* Create all cpus.  */
 extern SIM_RC sim_cpu_alloc_all_extra (SIM_DESC, int, size_t);
index 7ac6bd2c0de5d184f2cff7c24a4721407550247f..667db199ea12dea5f30519e6a9b0a93baa5096bc 100644 (file)
@@ -19,8 +19,6 @@
 #ifndef SIM_MAIN_H
 #define SIM_MAIN_H
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 #include "sim-basics.h"
 
 typedef long int           word;
index f60c454ddc4cd1820c866ed5c969b9e00b870d0b..e946489cfc20622231ab35d2480af0455b04c444 100644 (file)
@@ -24,8 +24,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifndef SIM_MAIN_H
 #define SIM_MAIN_H
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 /* This is a global setting.  Different cpu families can't mix-n-match -scache
    and -pbb.  However some cpu families may use -simple while others use
    one of -scache/-pbb.  */
index 5327e7ec3d02abee0f3ec713d35da3a57e1ba695..3d7b73231838848a05015bbb42ede2a801485601 100644 (file)
@@ -19,8 +19,6 @@
 #ifndef SIM_MAIN_H
 #define SIM_MAIN_H
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 #include "sim-basics.h"
 
 typedef long int           word;
index 11566d2c6b9fc829bc06a51d5e03fc6a63f337a3..258d61879cc9108d9e6714f26e428ebddd3c09e4 100644 (file)
@@ -21,8 +21,6 @@
 #ifndef SIM_MAIN_H
 #define SIM_MAIN_H
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 #include "sim-basics.h"
 #include "sim-base.h"
 
index 3e40bd52ab3820b2d39e90c62fa3496cf224aaa5..5fbf94d1f61354df478339038c15d02c23855360 100644 (file)
@@ -22,8 +22,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* Main header for the frv.  */
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 /* This is a global setting.  Different cpu families can't mix-n-match -scache
    and -pbb.  However some cpu families may use -simple while others use
    one of -scache/-pbb. ???? */
index 3a002efd359b9a36eebe099cd47ef6d199d7dc42..e160a12880dd974e6942aa87777e85cb0283a23f 100644 (file)
@@ -21,8 +21,6 @@
 #ifndef SIM_MAIN_H
 #define SIM_MAIN_H
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 #include "sim-basics.h"
 #include "sim-base.h"
 #include "bfd.h"
index d0a04f5fa46a5df1cc03e5cf192b6a95b42ed988..84bb346a9a95eb15f381f990ec3db14f39c1569d 100644 (file)
@@ -5,8 +5,6 @@
 #ifndef SIM_MAIN_H
 #define SIM_MAIN_H
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 #define DEBUG
 
 /* These define the size of main memory for the simulator.
index bb927fcf57c5ef65c58fd6443bd277b87bbdfad6..ccc3fc877b9d6a74399a973081e542551664df86 100644 (file)
@@ -4,8 +4,6 @@
 #ifndef SIM_MAIN_H
 #define SIM_MAIN_H
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 /* This is a global setting.  Different cpu families can't mix-n-match -scache
    and -pbb.  However some cpu families may use -simple while others use
    one of -scache/-pbb. ???? */
index 17c817cb1f69efca3bb8797ae8932e58c51e9912..6ae757f089b5d18e3f9b1f17059710ec508c65f8 100644 (file)
@@ -23,8 +23,6 @@
 #ifndef SIM_MAIN_H
 #define SIM_MAIN_H
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 #define WITH_SCACHE_PBB 1
 
 #include "symcat.h"
index fcde7feb61ccdf2cb174b742ca70939153b79bb4..6d69ecf52a00c093d7ba4a52ef82705b29e96d6f 100644 (file)
@@ -3,8 +3,6 @@
 #ifndef SIM_MAIN_H
 #define SIM_MAIN_H
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 /* This is a global setting.  Different cpu families can't mix-n-match -scache
    and -pbb.  However some cpu families may use -simple while others use
    one of -scache/-pbb.  */
index 26293bc654f09ce57a0c51e0b5cc61b503efa643..e47bd83f9b9a5a301b53ca8c52d2ba93c31ce56d 100644 (file)
@@ -20,8 +20,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifndef _SIM_MAIN_H
 #define _SIM_MAIN_H
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 #include "sim-basics.h"
 #include "sim-base.h"
 
index 82a720b1e51857ddf7c945012b791c0b5cf48b8d..fc4625ba8ec2d86f2be143ce00276200e91c47f2 100644 (file)
@@ -19,8 +19,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifndef SIM_MAIN_H
 #define SIM_MAIN_H
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 #include "sim-basics.h"
 
 typedef long int           word;
index df85a6f1e23262e428a2f321032037ba6e9cc2be..160f10156fff862d6a1173e196ed59407f8fc0cd 100644 (file)
@@ -18,8 +18,6 @@
 #ifndef MICROBLAZE_SIM_MAIN
 #define MICROBLAZE_SIM_MAIN
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 #include "microblaze.h"
 #include "sim-basics.h"
 #include "sim-base.h"
index d4e6a2f4a547f065c811e1ae87aa3094ff2bdc6b..ea203c4a68862bf5943d942b45bd9f69c217f132 100644 (file)
@@ -20,8 +20,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifndef SIM_MAIN_H
 #define SIM_MAIN_H
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 #define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
 mips_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), (TRANSFER), (ERROR))
 
index 37e5ce011b5fe19115af24c77c3e88be72f961c0..77a7ba8ea0d4f488014c88cc978c3011a92ddc16 100644 (file)
@@ -22,8 +22,6 @@
 #ifndef SIM_MAIN_H
 #define SIM_MAIN_H
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 #define SIM_ENGINE_HALT_HOOK(SD,LAST_CPU,CIA) /* disable this hook */
 
 #include "sim-basics.h"
index 7db12e01498b26a0f41e4841b87f3f37a5e4a42d..c4be80e39d26a9e48b36bca929da5888e697b240 100644 (file)
@@ -20,8 +20,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifndef SIM_MAIN_H
 #define SIM_MAIN_H
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 #include "sim-basics.h"
 #include "sim-base.h"
 #include "bfd.h"
index 9d5a7b33072b733ae59ad7bc07f62a39ea67f7d5..5603d411df7b0e82beca9679494d1312c3bfa318 100644 (file)
@@ -21,8 +21,6 @@
 #ifndef _MSP430_MAIN_SIM_H_
 #define _MSP430_MAIN_SIM_H_
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 #include "sim-basics.h"
 #include "msp430-sim.h"
 #include "sim-base.h"
index bf3558ddfef1fba89800d0814db518c441ca08cd..1b6939dfbc980370098af59f7543aa5acf151d8d 100644 (file)
@@ -19,8 +19,6 @@
 #ifndef SIM_MAIN_H
 #define SIM_MAIN_H
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 #define WITH_SCACHE_PBB 1
 
 #include "ansidecl.h"
index a217eee576a18da87d1f8a43d6ec83c6bbbfdd5b..ada1e3886278041b33ed96aed44a4f3a6fe9d38b 100644 (file)
@@ -19,8 +19,6 @@
 #ifndef PRU_SIM_MAIN
 #define PRU_SIM_MAIN
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 #include <stdint.h>
 #include <stddef.h>
 #include "pru.h"
index aeeb0ad788f80046b5facd6729701a0f57cd72e0..48ea452fb0b18ae8a39e23fee7f35f8c8845e812 100644 (file)
@@ -21,8 +21,6 @@
 #ifndef SIM_MAIN_H
 #define SIM_MAIN_H
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 #include "sim-basics.h"
 #include "machs.h"
 #include "sim-base.h"
index 5504ad2410994068db8c15482c6932168dc53c4a..6008b6997129c89d06c59c43e2316ca05f90d3e6 100644 (file)
@@ -19,8 +19,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifndef SIM_MAIN_H
 #define SIM_MAIN_H
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 #include "sim-basics.h"
 #include "sim-base.h"
 
index 970a1486ea122653ac163f4d2a5ed4fb92e9f8f8..abf2ed78febc510e3bee27f66c10f26020370423 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef SIM_MAIN_H
 #define SIM_MAIN_H
 
-#define SIM_HAVE_COMMON_SIM_CPU
-
 /* The v850 has 32bit words, numbered 31 (MSB) to 0 (LSB) */
 
 #define WITH_TARGET_WORD_MSB 31