This commit was generated by cvs2svn to track changes on a CVS vendor
[binutils-gdb.git] / sim / common / sim-base.h
index c455f4143afa5e0db8a93a5dbf8855edbc9ac9d3..420b137b6b2d8a8f4fc4131435519f6159c64677 100644 (file)
@@ -93,6 +93,7 @@ typedef struct _sim_cpu sim_cpu;
 #ifdef SIM_HAVE_BREAKPOINTS
 #include "sim-break.h"
 #endif
+#include "sim-cpu.h"
 
 /* Global pointer to current state while sim_resume is running.
    On a machine with lots of registers, it might be possible to reserve
@@ -214,17 +215,6 @@ typedef struct {
 #define STATE_MEMOPT(sd) ((sd)->base.memopt)
   sim_memopt *memopt;
 
-/* start-sanitize-sky */
-#ifdef TARGET_SKY
-#ifdef SKY_FUNIT
-  /* Record of option for floating point implementation type. */
-#define STATE_FP_TYPE_OPT(sd) ((sd)->base.fp_type_opt)
-#define STATE_FP_TYPE_OPT_TARGET 0x80000000
-  int fp_type_opt;
-#endif
-#endif
-/* end-sanitize-sky */
-
   /* event handler */
 #define STATE_EVENTS(sd) (&(sd)->base.events)
   sim_events events;
@@ -241,13 +231,16 @@ typedef struct {
   struct sim_breakpoint *breakpoints;
 #define STATE_BREAKPOINTS(sd) ((sd)->base.breakpoints)
 
-  /* start-sanitize-am30 */
 #if WITH_HW
   struct sim_hw *hw;
 #define STATE_HW(sd) ((sd)->base.hw)
 #endif
 
-  /* end-sanitize-am30 */
+  /* Should image loads be performed using the LMA or VMA?  Older
+     simulators use the VMA while newer simulators prefer the LMA. */
+  int load_at_lma_p;
+#define STATE_LOAD_AT_LMA_P(SD) ((SD)->base.load_at_lma_p)
+
   /* Marker for those wanting to do sanity checks.
      This should remain the last member of this struct to help catch
      miscompilation errors.  */
@@ -256,77 +249,8 @@ typedef struct {
 #define STATE_MAGIC(sd) ((sd)->base.magic)
 } sim_state_base;
 
-
-/* Pseudo baseclass for each cpu.  */
-
-typedef struct {
-
-  /* Backlink to main state struct.  */
-  SIM_DESC state;
-#define CPU_STATE(cpu) ((cpu)->base.state)
-
-  /* Processor index within the SD_DESC */
-  int index;
-#define CPU_INDEX(cpu) ((cpu)->base.index)
-
-  /* The name of the cpu.  */
-  const char *name;
-#define CPU_NAME(cpu) ((cpu)->base.name)
-
-  /* Options specific to this cpu.  */
-  struct option_list *options;
-#define CPU_OPTIONS(cpu) ((cpu)->base.options)
-
-  /* Processor specific core data */
-  sim_cpu_core core;
-#define CPU_CORE(cpu) (& (cpu)->base.core)
-
-  /* Trace data.  See sim-trace.h.  */
-  TRACE_DATA trace_data;
-#define CPU_TRACE_DATA(cpu) (& (cpu)->base.trace_data)
-
-  /* Maximum number of debuggable entities.
-     This debugging is not intended for normal use.
-     It is only enabled when the simulator is configured with --with-debug
-     which shouldn't normally be specified.  */
-#ifndef MAX_DEBUG_VALUES
-#define MAX_DEBUG_VALUES 4
-#endif
-
-  /* Boolean array of specified debugging flags.  */
-  char debug_flags[MAX_DEBUG_VALUES];
-#define CPU_DEBUG_FLAGS(cpu) ((cpu)->base.debug_flags)
-  /* Standard values.  */
-#define DEBUG_INSN_IDX 0
-#define DEBUG_NEXT_IDX 2 /* simulator specific debug bits begin here */
-
-  /* Debugging output goes to this or stderr if NULL.
-     We can't store `stderr' here as stderr goes through a callback.  */
-  FILE *debug_file;
-#define CPU_DEBUG_FILE(cpu) ((cpu)->base.debug_file)
-
-  /* Profile data.  See sim-profile.h.  */
-  PROFILE_DATA profile_data;
-#define CPU_PROFILE_DATA(cpu) (& (cpu)->base.profile_data)
-
-#ifdef SIM_HAVE_MODEL
-  /* Machine tables for this cpu.  See sim-model.h.  */
-  const MACH *mach;
-#define CPU_MACH(cpu) ((cpu)->base.mach)
-  /* The selected model.  */
-  const MODEL *model;
-#define CPU_MODEL(cpu) ((cpu)->base.model)
-#endif
-
-} sim_cpu_base;
-
-
 /* Functions for allocating/freeing a sim_state.  */
 SIM_DESC sim_state_alloc PARAMS ((SIM_OPEN_KIND kind, host_callback *callback));
 void sim_state_free PARAMS ((SIM_DESC));
 
-/* Return a pointer to the cpu data for CPU_NAME, or NULL if not found.  */
-sim_cpu *sim_cpu_lookup (SIM_DESC sd, const char *cpu_name);
-
-
 #endif /* SIM_BASE_H */