+2016-01-02 Mike Frysinger <vapier@gentoo.org>
+
+ * cgen-defs.h (current_state): Delete.
+ * sim-base.h (CURRENT_STATE_REG, CURRENT_STATE): Delete.
+ * sim-utils.c (current_state): Delete.
+
2015-12-30 Mike Frysinger <vapier@gentoo.org>
* sim-module.c (sim_pre_argv_init): Change STATE_MY_NAME assignment
\f
/* Simulator state. */
-/* Records simulator descriptor so utilities like @cpu@_dump_regs can be
- called from gdb. */
-extern SIM_DESC current_state;
-
-/* Simulator state. */
-
/* CGEN_STATE contains additional state information not present in
sim_state_base. */
#include "sim-memopt.h"
#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
- one of them for current_state. However on a machine with few registers
- current_state can't permanently live in one and indirecting through it
- will be slower [in which case one can have sim_resume set globals from
- current_state for faster access].
- If CURRENT_STATE_REG is defined, it means current_state is living in
- a global register. */
-
-
-#ifdef CURRENT_STATE_REG
-/* FIXME: wip */
-#else
-extern struct sim_state *current_state;
-#endif
-
-
-/* The simulator may provide different (and faster) definition. */
-#ifndef CURRENT_STATE
-#define CURRENT_STATE current_state
-#endif
-
/* We require all sims to dynamically allocate cpus. See comment up top about
struct sim_state. */
#include "bfd.h"
#include "sim-utils.h"
-/* Global pointer to all state data.
- Set by sim_resume. */
-struct sim_state *current_state;
-
/* Allocate zero filled memory with xcalloc - xcalloc aborts if the
allocation fails. */
+2016-01-02 Mike Frysinger <vapier@gentoo.org>
+
+ * sim-if.c (current_state): Delete.
+ (sim_open): Delete current_state assignment.
+
2015-12-30 Mike Frysinger <vapier@gentoo.org>
* sim-if.c (sim_open): Delete current_target_byte_order assignment.
enum cris_unknown_syscall_action_type cris_unknown_syscall_action
= CRIS_USYSC_MSG_STOP;
-/* Records simulator descriptor so utilities like cris_dump_regs can be
- called from gdb. */
-SIM_DESC current_state;
-
/* CRIS-specific options. */
typedef enum {
OPTION_CRIS_STATS = OPTION_START,
Must be done after cris_cgen_cpu_open. */
cgen_init (sd);
- /* Store in a global so things like cris_dump_regs can be invoked
- from the gdb command line. */
- current_state = sd;
-
cris_set_callbacks (callback);
return sd;
+2016-01-02 Mike Frysinger <vapier@gentoo.org>
+
+ * reset.c (frv_term): Change current_state to sd.
+ * sim-if.c (current_state): Delete.
+ (sim_open): Delete current_state assignment.
+
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
then turn it off again. This is the only place we can currently gain
control to do this. */
if (frv_interrupt_state.timer.enabled && ! frv_save_profile_model_p)
- sim_profile_set_option (current_state, "-model", PROFILE_MODEL_IDX, "0");
+ sim_profile_set_option (sd, "-model", PROFILE_MODEL_IDX, "0");
}
/* Perform a power on reset. */
static void free_state (SIM_DESC);
static void print_frv_misc_cpu (SIM_CPU *cpu, int verbose);
-
-/* Records simulator descriptor so utilities like frv_dump_regs can be
- called from gdb. */
-SIM_DESC current_state;
\f
/* Cover function of sim_state_free to free the cpu buffers as well. */
frv_initialize (cpu, sd);
}
- /* Store in a global so things like sparc32_dump_regs can be invoked
- from the gdb command line. */
- current_state = sd;
-
return sd;
}
+2016-01-02 Mike Frysinger <vapier@gentoo.org>
+
+ * sim-if.c (current_state): Delete.
+ (sim_open): Delete current_state assignment.
+
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
#include "bfd.h"
static void free_state (SIM_DESC);
-
-/* Records simulator descriptor so utilities like iq2000_dump_regs can be
- called from gdb. */
-SIM_DESC current_state;
\f
/* Cover function for sim_cgen_disassemble_insn. */
Must be done after iq2000_cgen_cpu_open. */
cgen_init (sd);
- /* Store in a global so things like sparc32_dump_regs can be invoked
- from the gdb command line. */
- current_state = sd;
-
return sd;
}
\f
+2016-01-02 Mike Frysinger <vapier@gentoo.org>
+
+ * sim-if.c (current_state): Delete.
+ (sim_open): Delete current_state assignment.
+
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
lm32_option_handler},
{{NULL, no_argument, NULL, 0}, '\0', NULL, NULL, NULL}
};
-
-/* Records simulator descriptor so utilities like lm32_dump_regs can be
- called from gdb. */
-SIM_DESC current_state;
\f
/* Cover function of sim_state_free to free the cpu buffers as well. */
Must be done after lm32_cgen_cpu_open. */
cgen_init (sd);
- /* Store in a global so things like lm32_dump_regs can be invoked
- from the gdb command line. */
- current_state = sd;
-
return sd;
}
\f
+2016-01-02 Mike Frysinger <vapier@gentoo.org>
+
+ * sim-if.c (current_state): Delete.
+ (sim_open): Delete current_state assignment.
+
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
static void free_state (SIM_DESC);
static void print_m32r_misc_cpu (SIM_CPU *cpu, int verbose);
-
-/* Records simulator descriptor so utilities like m32r_dump_regs can be
- called from gdb. */
-SIM_DESC current_state;
\f
/* Cover function of sim_state_free to free the cpu buffers as well. */
= print_m32r_misc_cpu;
}
- /* Store in a global so things like sparc32_dump_regs can be invoked
- from the gdb command line. */
- current_state = sd;
-
return sd;
}
\f
+2016-01-02 Mike Frysinger <vapier@gentoo.org>
+
+ * dv-tx3904cpu.c (CPU, SD): Delete.
+
2015-12-30 Mike Frysinger <vapier@gentoo.org>
* wrapper.c (mips_reg_store, mips_reg_fetch): Define.
sim_cpu *cpu = STATE_CPU (sd, 0); /* NB: fix CPU 0. */
address_word cia = CPU_PC_GET (cpu);
-#define CPU cpu
-#define SD current_state
-
if (controller->pending_reset)
{
controller->pending_reset = 0;
}
} /* interrupt set */
}
-#undef CPU cpu
-#undef SD current_state
}
+2016-01-02 Mike Frysinger <vapier@gentoo.org>
+
+ * sim-if.c (current_state): Delete.
+ (sim_open): Delete current_state assignment.
+
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
/* Since we don't build the cgen-opcode table, we use a wrapper around
the existing disassembler from libopcodes. */
static CGEN_DISASSEMBLER sh64_disassemble_insn;
-
-/* Records simulator descriptor so utilities like sh5_dump_regs can be
- called from gdb. */
-SIM_DESC current_state;
\f
/* Cover function of sim_state_free to free the cpu buffers as well. */
Must be done after sh_cgen_cpu_open. */
cgen_init (sd);
- /* Store in a global so things like sparc32_dump_regs can be invoked
- from the gdb command line. */
- current_state = sd;
-
return sd;
}
\f