]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - sim/common/sim-model.h
sim: namespace sim_machs
[thirdparty/binutils-gdb.git] / sim / common / sim-model.h
index d6edf649d6e28cc27a3f6c72108ea0b51696e338..e735feb4b9ad2dddfdd914f60bfc08b52b370194 100644 (file)
@@ -48,8 +48,6 @@ typedef struct {
 #endif
 
 #ifndef WITH_DEFAULT_MODEL
-/* Just a stub for ports that do not define models.  */
-enum mach_attr { _MACH_NONE };
 # define WITH_DEFAULT_MODEL NULL
 # define WITH_MODEL_P 0
 #else
@@ -92,7 +90,7 @@ typedef struct {
   /* This is the argument to bfd_scan_arch.  */
   const char *bfd_name;
 #define MACH_BFD_NAME(m) ((m)->bfd_name)
-  enum mach_attr num;
+  int num;
 #define MACH_NUM(m) ((m)->num)
 
   int word_bitsize;
@@ -136,19 +134,13 @@ typedef struct model {
 #define MODEL_INIT(m) ((m)->init)
 } SIM_MODEL;
 
-/* Tables of supported machines.  */
-/* ??? In a simulator of multiple architectures, will need multiple copies of
-   this.  Have an `archs' array that contains a pointer to the machs array
-   for each (which in turn has a pointer to the models array for each).  */
-extern const SIM_MACH * const sim_machs[];
-
 /* Model module handlers.  */
 extern MODULE_INSTALL_FN sim_model_install;
 
 /* Support routines.  */
 extern void sim_model_set (SIM_DESC sd_, sim_cpu *cpu_, const SIM_MODEL *model_);
-extern const SIM_MODEL *sim_model_lookup (const char *name_);
-extern const SIM_MACH *sim_mach_lookup (const char *name_);
-extern const SIM_MACH *sim_mach_lookup_bfd_name (const char *bfd_name_);
+extern const SIM_MODEL *sim_model_lookup (SIM_DESC, const char *name_);
+extern const SIM_MACH *sim_mach_lookup (SIM_DESC, const char *name_);
+extern const SIM_MACH *sim_mach_lookup_bfd_name (SIM_DESC, const char *bfd_name_);
 
 #endif /* SIM_MODEL_H */