sim: split sim-signal.h include out

The sim-basics.h is too big and includes too many things.  This leads
to some arch's sim-main.h having circular loop issues with defs, and
makes it hard to separate out common objects from arch-specific defs.
By splitting up sim-basics.h and killing off sim-main.h, it'll make
it easier to separate out the two.
This commit is contained in:
Mike Frysinger 2021-06-13 23:16:32 -04:00
parent 7039b29160
commit 1fef66b0dc
78 changed files with 169 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* cpustate.c: Include sim-signal.h.
* memory.c, simulator.c: Likewise.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -26,6 +26,7 @@
#include <math.h>
#include "sim-main.h"
#include "sim-signal.h"
#include "cpustate.h"
#include "simulator.h"
#include "libiberty.h"

View File

@ -33,6 +33,7 @@
#include "simulator.h"
#include "sim-core.h"
#include "sim-signal.h"
static inline void
mem_error (sim_cpu *cpu, const char *message, uint64_t addr)

View File

@ -34,6 +34,8 @@
#include "cpustate.h"
#include "memory.h"
#include "sim-signal.h"
#define NO_SP 0
#define SP_OK 1

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* interp.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -29,6 +29,7 @@
#include "sim-main.h"
#include "sim-base.h"
#include "sim-options.h"
#include "sim-signal.h"
/* As AVR is a 8/16 bits processor, define handy types. */
typedef unsigned short int word;

View File

@ -1,3 +1,8 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* dv-bfin_cec.c: Include sim-signal.h.
* sim-main.h: Delete sim-signal.h include.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -24,6 +24,7 @@
#include <strings.h>
#include "sim-main.h"
#include "sim-signal.h"
#include "devices.h"
#include "dv-bfin_cec.h"
#include "dv-bfin_evt.h"

View File

@ -22,7 +22,6 @@
#define _BFIN_MAIN_SIM_H_
#include "sim-basics.h"
#include "sim-signal.h"
#include "arch.h"
#include "sim-base.h"

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* bpf.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -24,6 +24,7 @@
#include "sim-main.h"
#include "sim-fpu.h"
#include "sim-signal.h"
#include "cgen-mem.h"
#include "cgen-ops.h"
#include "cpuall.h"

View File

@ -1,3 +1,10 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* cgen-run.c: Include sim-signal.h.
* cgen-utils.c, nrun.c, sim-core.c, sim-engine.c, sim-reason.c,
sim-resume.c, sim-signal.c, sim-stop.c, sim-watch.c: Likewise.
* sim-basics.h: Delete sim-signal.h include.
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* sim-basics.h: Delete libiberty.h include.

View File

@ -38,6 +38,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "sim-main.h"
#include "sim-assert.h"
#include "sim-signal.h"
#ifndef SIM_ENGINE_PREFIX_HOOK
#define SIM_ENGINE_PREFIX_HOOK(sd)

View File

@ -22,6 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "bfd.h"
#include "sim-main.h"
#include "sim-signal.h"
#include "dis-asm.h"
#define MEMOPS_DEFINE_INLINE

View File

@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <string.h>
#include "sim-main.h"
#include "sim-signal.h"
#include "sim/callback.h"
#include "bfd.h"

View File

@ -121,7 +121,6 @@ typedef enum {
#include "sim-types.h"
#include "sim-bits.h"
#include "sim-endian.h"
#include "sim-signal.h"
#include "sim-utils.h"

View File

@ -28,6 +28,7 @@
#include "sim-main.h"
#include "sim-assert.h"
#include "sim-signal.h"
#include "libiberty.h"
#if (WITH_HW)

View File

@ -22,6 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "sim-main.h"
#include "sim-assert.h"
#include "sim-signal.h"
#include <stdio.h>
#include <stdlib.h>

View File

@ -22,6 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "sim-main.h"
#include "sim-assert.h"
#include "sim-signal.h"
#include <stdlib.h>

View File

@ -22,6 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "sim-main.h"
#include "sim-assert.h"
#include "sim-signal.h"
/* Halt the simulator after just one instruction */

View File

@ -22,6 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <signal.h>
#include "sim-main.h"
#include "sim-signal.h"
/* Convert SIM_SIGFOO to SIGFOO.
What to do when the host doesn't have SIGFOO is handled on a case by case

View File

@ -22,6 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "sim-main.h"
#include "sim-assert.h"
#include "sim-signal.h"
/* Generic implementation of sim_stop. */

View File

@ -22,6 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "sim-main.h"
#include "sim-options.h"
#include "sim-signal.h"
#include "libiberty.h"
#include "sim-assert.h"

View File

@ -1,3 +1,8 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* interp.c: Include sim-signal.h.
* simops.c: Likewise.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -30,6 +30,7 @@
#include "sim-main.h"
#include "sim-options.h"
#include "sim-signal.h"
#include "gdb/sim-cr16.h"
#include "gdb/signals.h"

View File

@ -32,6 +32,7 @@
#include <sys/time.h>
#include "sim-main.h"
#include "sim-signal.h"
#include "simops.h"
#include "targ-vals.h"

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* traps.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -24,6 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "sim-main.h"
#include "sim-syscall.h"
#include "sim-options.h"
#include "sim-signal.h"
#include "sim/callback.h"
#include "bfd.h"
/* FIXME: get rid of targ-vals.h usage everywhere else. */

View File

@ -1,3 +1,8 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* interp.c: Include sim-signal.h.
* simops.c: Likewise.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -9,6 +9,7 @@
#include "sim-main.h"
#include "sim-options.h"
#include "sim-signal.h"
#include "gdb/sim-d10v.h"
#include "gdb/signals.h"

View File

@ -11,6 +11,7 @@
#include <string.h>
#include "sim-main.h"
#include "sim-signal.h"
#include "simops.h"
#include "targ-vals.h"

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* sim-main.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -25,6 +25,7 @@
#include "defs.h"
#include "sim-main.h"
#include "sim-signal.h"
/* Get the register number from the number. */
static unsigned16

View File

@ -1,3 +1,8 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* interrupts.c: Include sim-signal.h.
* traps.c: Likewise.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -24,6 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#define WANT_CPU_FRVBF
#include "sim-main.h"
#include "sim-signal.h"
#include "bfd.h"
#include <stdlib.h>

View File

@ -28,6 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "cgen-engine.h"
#include "cgen-par.h"
#include "sim-fpu.h"
#include "sim-signal.h"
#include "sim/callback.h"
#include "bfd.h"

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* interp.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -33,6 +33,7 @@
#include "sim-main.h"
#include "sim-options.h"
#include "sim-signal.h"
#include "opcode/ft32.h"

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* compile.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* compile.c (sim_open): Set current_target_byte_order.

View File

@ -33,6 +33,7 @@
#include "sys/stat.h"
#include "sys/types.h"
#include "sim-options.h"
#include "sim-signal.h"
#include "sim/callback.h"
#ifndef SIGTRAP

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* iq2000.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -24,6 +24,7 @@
#define WANT_CPU_IQ2000BF
#include "sim-main.h"
#include "sim-signal.h"
#include "cgen-mem.h"
#include "cgen-ops.h"
#include "targ-vals.h"

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* traps.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -25,6 +25,7 @@
#define WANT_CPU_LM32BF
#include "sim-main.h"
#include "sim-signal.h"
#include "sim-syscall.h"
#include "lm32-sim.h"
#include "targ-vals.h"

View File

@ -1,3 +1,8 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* traps-linux.c: Include sim-signal.h.
* traps.c:
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -22,6 +22,7 @@
#include "portability.h"
#include "sim-main.h"
#include "sim-signal.h"
#include "sim-syscall.h"
#include "syscall.h"
#include "targ-vals.h"

View File

@ -21,6 +21,7 @@
#include "defs.h"
#include "sim-main.h"
#include "sim-signal.h"
#include "sim-syscall.h"
#include "targ-vals.h"
#include <stdlib.h>

View File

@ -1,3 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* dv-m68hc11eepr.c: Include sim-signal.h.
* interrupts.c, m68hc11_sim.c: Likewise.
* sim-main.h: Delete sim-signal.h include.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -25,6 +25,7 @@
#include "hw-main.h"
#include "sim-assert.h"
#include "sim-events.h"
#include "sim-signal.h"
#include <unistd.h>
#include <fcntl.h>

View File

@ -22,6 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "sim-main.h"
#include "sim-options.h"
#include "sim-signal.h"
static const char *interrupt_names[] = {
"R1",

View File

@ -24,6 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "sim-assert.h"
#include "sim-module.h"
#include "sim-options.h"
#include "sim-signal.h"
#include <stdlib.h>

View File

@ -21,7 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#define _SIM_MAIN_H
#include "sim-basics.h"
#include "sim-signal.h"
#include "sim-base.h"
#include "bfd.h"
@ -30,6 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "sim/sim.h"
#include "opcode/m68hc11.h"
#include "sim-signal.h"
#include "sim-types.h"
typedef unsigned8 uint8;

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* interp.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -32,6 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "sim-main.h"
#include "sim-base.h"
#include "sim-signal.h"
#include "sim-syscall.h"
#include "sim-options.h"

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* interp.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -30,6 +30,7 @@
#include "sim-main.h"
#include "sim-options.h"
#include "sim-signal.h"
#include "sim-syscall.h"
#include "microblaze-dis.h"

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* interp.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -31,6 +31,7 @@ code on the hardware.
#include "sim-options.h"
#include "sim-assert.h"
#include "sim-hw.h"
#include "sim-signal.h"
#include "itable.h"

View File

@ -1,3 +1,9 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* interp.c: Include sim-signal.h.
* op_utils.c, sim-main.h: Likewise.
* mn10300_sim.h: Delete sim-signal.h include.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -9,6 +9,7 @@
#include "bfd.h"
#include "sim-assert.h"
#include "sim-signal.h"
#include <stdlib.h>
#include <string.h>

View File

@ -7,6 +7,7 @@
#include "sim/sim.h"
#include "bfd.h"
#include "sim-fpu.h"
#include "sim-signal.h"
extern SIM_DESC simulator;

View File

@ -2,6 +2,7 @@
#include "defs.h"
#include "sim-main.h"
#include "sim-signal.h"
#include "sim-syscall.h"
#include "targ-vals.h"

View File

@ -25,7 +25,6 @@
#define SIM_ENGINE_HALT_HOOK(SD,LAST_CPU,CIA) /* disable this hook */
#include "sim-basics.h"
#include "sim-signal.h"
#include <signal.h> /* For kill() in insns:do_trap */

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* interp.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -34,6 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "sim-base.h"
#include "sim-options.h"
#include "sim-io.h"
#include "sim-signal.h"
#include "targ-vals.h"
typedef int word;

View File

@ -1,3 +1,8 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* msp430-sim.c: Include sim-signal.h.
* sim-main.h: Delete sim-signal.h include.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -30,6 +30,7 @@
#include <assert.h>
#include "opcode/msp430-decode.h"
#include "sim-main.h"
#include "sim-signal.h"
#include "sim-syscall.h"
#include "targ-vals.h"

View File

@ -22,7 +22,6 @@
#define _MSP430_MAIN_SIM_H_
#include "sim-basics.h"
#include "sim-signal.h"
#include "msp430-sim.h"
#include "sim-base.h"

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* traps.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -23,6 +23,7 @@
#define WANT_CPU
#include "sim-main.h"
#include "sim-signal.h"
#include "cgen-ops.h"
/* Implement the sim invalid instruction function. This will set the error

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* sim-main.h: Delete sim-signal.h include.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (ENDIAN_CFLAGS): Delete.

View File

@ -1,5 +1,4 @@
#include "sim-basics.h"
#include "sim-signal.h"
typedef unsigned32 sim_cia;

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* interp.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -31,6 +31,7 @@
#include "sim-main.h"
#include "sim-assert.h"
#include "sim-options.h"
#include "sim-signal.h"
#include "sim-syscall.h"
#include "pru.h"

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* sim-main.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -28,6 +28,7 @@
#include <time.h>
#include "sim-main.h"
#include "sim-signal.h"
#include "sim-syscall.h"
#include "opcode/riscv.h"

View File

@ -1,3 +1,7 @@
2021-06-18 Mike Frysinger <vapier@gentoo.org>
* simops.c: Include sim-signal.h.
2021-06-17 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Delete SIM_AC_OPTION_ENDIAN call.

View File

@ -2,6 +2,7 @@
#include "defs.h"
#include "sim-main.h"
#include "sim-signal.h"
#include "v850_sim.h"
#include "simops.h"