sim: unify sim_cia definition
Almost every target defines sim_cia the same way -- either using the address_word type directly, or a type of equivalent size. The only odd one out is sh64 (who has 32bit address_word and 64bit cia), and even that case doesn't seem to make sense. We'll put off clean up though of sh64 and at least set up a sensible default for everyone.
This commit is contained in:
parent
b9a7202de8
commit
7e83aa92f2
47 changed files with 101 additions and 54 deletions
|
@ -1,3 +1,7 @@
|
|||
2015-04-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (sim_cia): Delete.
|
||||
|
||||
2015-04-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (CIA_GET, CIA_SET): Delete.
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
|
||||
#include "sim-basics.h"
|
||||
|
||||
typedef address_word sim_cia;
|
||||
|
||||
typedef struct _sim_cpu SIM_CPU;
|
||||
|
||||
#include "sim-base.h"
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2015-04-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (sim_cia): Delete.
|
||||
|
||||
2015-04-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (CIA_GET, CIA_SET): Delete.
|
||||
|
|
|
@ -21,7 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||
|
||||
#include "sim-basics.h"
|
||||
|
||||
typedef address_word sim_cia;
|
||||
extern unsigned int pc;
|
||||
|
||||
typedef struct _sim_cpu SIM_CPU;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2015-04-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (sim_cia): Delete.
|
||||
|
||||
2015-04-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (CIA_GET, CIA_SET): Delete.
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
#include "sim-basics.h"
|
||||
#include "sim-signal.h"
|
||||
|
||||
typedef unsigned32 sim_cia;
|
||||
|
||||
typedef struct _sim_cpu SIM_CPU;
|
||||
|
||||
#include "bfin-sim.h"
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2015-04-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* cgen-engine.h (CIA_ADDR): Delete.
|
||||
* sim-base.h: Update sim_cia example.
|
||||
[!CIA_ADDR] (sim_cia): New typedef.
|
||||
|
||||
2015-04-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* cgen-utils.c (cgen_rtx_error): Change CIA_GET to CPU_PC_GET.
|
||||
|
|
|
@ -186,8 +186,6 @@ do { \
|
|||
|
||||
#if WITH_SCACHE
|
||||
|
||||
#define CIA_ADDR(cia) (cia)
|
||||
|
||||
#if WITH_SCACHE_PBB
|
||||
|
||||
/* Return the scache pointer of the current insn. */
|
||||
|
@ -280,8 +278,6 @@ do { \
|
|||
|
||||
/* This is the "simple" engine case. */
|
||||
|
||||
#define CIA_ADDR(cia) (cia)
|
||||
|
||||
#define SEM_SEM_ARG(vpc, sc) (sc)
|
||||
|
||||
#define SEM_NEXT_VPC(sem_arg, pc, len) ((pc) + (len))
|
||||
|
|
|
@ -28,9 +28,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||
information), include ``sim-base.h'':
|
||||
|
||||
#include "sim-basics.h"
|
||||
typedef address_word sim_cia;
|
||||
/-* If `sim_cia' is not an integral value (e.g. a struct), define
|
||||
CIA_ADDR to return the integral value. *-/
|
||||
/-* typedef struct {...} sim_cia; *-/
|
||||
/-* #define CIA_ADDR(cia) (...) *-/
|
||||
#include "sim-base.h"
|
||||
|
||||
|
@ -66,6 +66,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||
(e.g. for delay slot handling). */
|
||||
#ifndef CIA_ADDR
|
||||
#define CIA_ADDR(cia) (cia)
|
||||
typedef address_word sim_cia;
|
||||
#endif
|
||||
#ifndef INVALID_INSTRUCTION_ADDRESS
|
||||
#define INVALID_INSTRUCTION_ADDRESS ((address_word)0 - 1)
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2015-04-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (sim_cia): Delete.
|
||||
|
||||
2015-04-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (CIA_GET, CIA_SET): Delete.
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include "sim-basics.h"
|
||||
|
||||
typedef address_word sim_cia;
|
||||
typedef long int word;
|
||||
typedef unsigned long int uword;
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2015-04-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (sim_cia): Delete.
|
||||
|
||||
2015-04-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* crisv10f.c (deliver_interrupt): Change CIA_GET to CPU_PC_GET.
|
||||
|
|
|
@ -36,9 +36,6 @@ typedef struct _sim_cpu SIM_CPU;
|
|||
#include "cris-opc.h"
|
||||
#include "arch.h"
|
||||
|
||||
/* These must be defined before sim-base.h. */
|
||||
typedef USI sim_cia;
|
||||
|
||||
#define SIM_ENGINE_HALT_HOOK(sd, cpu, cia) \
|
||||
do { \
|
||||
if (cpu) /* Null if ctrl-c. */ \
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2015-04-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (sim_cia): Delete.
|
||||
|
||||
2015-04-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (CIA_GET, CIA_SET): Delete.
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include "sim-basics.h"
|
||||
|
||||
typedef address_word sim_cia;
|
||||
typedef long int word;
|
||||
typedef unsigned long int uword;
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2015-04-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (sim_cia): Delete.
|
||||
(frv_sim_engine_halt_hook): Move below includes.
|
||||
|
||||
2015-04-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (CIA_GET, CIA_SET): Delete.
|
||||
|
|
|
@ -40,10 +40,6 @@ typedef struct _sim_cpu SIM_CPU;
|
|||
#include "frv-opc.h"
|
||||
#include "arch.h"
|
||||
|
||||
/* These must be defined before sim-base.h. */
|
||||
typedef USI sim_cia;
|
||||
|
||||
void frv_sim_engine_halt_hook (SIM_DESC, SIM_CPU *, sim_cia);
|
||||
#define SIM_ENGINE_HALT_HOOK(SD, LAST_CPU, CIA) \
|
||||
frv_sim_engine_halt_hook ((SD), (LAST_CPU), (CIA))
|
||||
|
||||
|
@ -55,6 +51,8 @@ void frv_sim_engine_halt_hook (SIM_DESC, SIM_CPU *, sim_cia);
|
|||
#include "cache.h"
|
||||
#include "registers.h"
|
||||
#include "profile.h"
|
||||
|
||||
void frv_sim_engine_halt_hook (SIM_DESC, SIM_CPU *, sim_cia);
|
||||
|
||||
/* The _sim_cpu struct. */
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2015-04-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (sim_cia): Delete.
|
||||
|
||||
2015-04-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* interp.c (ft32_read_item): Change CIA_GET to CPU_PC_GET.
|
||||
|
|
|
@ -22,9 +22,6 @@
|
|||
#define SIM_MAIN_H
|
||||
|
||||
#include "sim-basics.h"
|
||||
|
||||
typedef address_word sim_cia;
|
||||
|
||||
#include "sim-base.h"
|
||||
#include "bfd.h"
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2015-04-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (sim_cia): Delete.
|
||||
|
||||
2015-04-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (CIA_GET, CIA_SET): Delete.
|
||||
|
|
|
@ -88,9 +88,6 @@ enum h8_typecodes {
|
|||
|
||||
#include "sim-basics.h"
|
||||
|
||||
/* Define sim_cia. */
|
||||
typedef unsigned32 sim_cia;
|
||||
|
||||
typedef struct _sim_cpu SIM_CPU;
|
||||
|
||||
#include "sim-base.h"
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2015-04-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (sim_cia): Delete.
|
||||
|
||||
2015-04-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (CIA_GET, CIA_SET): Delete.
|
||||
|
|
|
@ -23,9 +23,6 @@ typedef struct _sim_cpu SIM_CPU;
|
|||
/* Pull in IQ2000_{DATA,INSN}_{MASK,VALUE}. */
|
||||
#include "elf/iq2000.h"
|
||||
|
||||
/* These must be defined before sim-base.h. */
|
||||
typedef USI sim_cia;
|
||||
|
||||
#include "sim-base.h"
|
||||
#include "cgen-sim.h"
|
||||
#include "iq2000-sim.h"
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2015-04-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (sim_cia): Delete.
|
||||
|
||||
2015-04-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* dv-lm32cpu.c (deliver_lm32cpu_interrupt): Change CIA_GET to
|
||||
|
|
|
@ -35,9 +35,6 @@ typedef struct _sim_cpu SIM_CPU;
|
|||
#include "lm32-opc.h"
|
||||
#include "arch.h"
|
||||
|
||||
/* These must be defined before sim-base.h. */
|
||||
typedef USI sim_cia;
|
||||
|
||||
#define SIM_ENGINE_HALT_HOOK(sd, cpu, cia) \
|
||||
do { \
|
||||
if (cpu) /* null if ctrl-c */ \
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2015-04-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (sim_cia): Delete.
|
||||
|
||||
2015-04-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (CIA_GET, CIA_SET): Delete.
|
||||
|
|
|
@ -15,9 +15,6 @@ typedef struct _sim_cpu SIM_CPU;
|
|||
#include "m32r-opc.h"
|
||||
#include "arch.h"
|
||||
|
||||
/* These must be defined before sim-base.h. */
|
||||
typedef USI sim_cia;
|
||||
|
||||
#define SIM_ENGINE_HALT_HOOK(sd, cpu, cia) \
|
||||
do { \
|
||||
if (cpu) /* null if ctrl-c */ \
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2015-04-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (sim_cia): Delete.
|
||||
|
||||
2015-04-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (CIA_GET, CIA_SET): Delete.
|
||||
|
|
|
@ -26,8 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||
|
||||
#include "sim-basics.h"
|
||||
|
||||
typedef address_word sim_cia;
|
||||
|
||||
typedef struct _sim_cpu SIM_CPU;
|
||||
|
||||
#include "sim-signal.h"
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2015-04-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (sim_cia): Delete.
|
||||
|
||||
2015-04-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* interp.c (set_initial_gprs): Change CIA_SET to CPU_PC_SET.
|
||||
|
|
|
@ -21,7 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||
|
||||
#include "sim-basics.h"
|
||||
|
||||
typedef address_word sim_cia;
|
||||
typedef long int word;
|
||||
typedef unsigned long int uword;
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2015-04-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (sim_cia): Delete.
|
||||
|
||||
2015-04-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* interp.c (issue_messages, wbat, wlat, what, rbat, rlat, rhat,
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
#include "microblaze.h"
|
||||
#include "sim-basics.h"
|
||||
|
||||
typedef address_word sim_cia;
|
||||
|
||||
typedef struct _sim_cpu SIM_CPU;
|
||||
|
||||
#include "sim-base.h"
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2015-04-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (sim_cia): Delete.
|
||||
|
||||
2015-04-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* dv-tx3904cpu.c (deliver_tx3904cpu_interrupt): Change CIA_GET to
|
||||
|
|
|
@ -34,8 +34,6 @@ mips_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), (TRANSFER), (ER
|
|||
|
||||
#include "sim-basics.h"
|
||||
|
||||
typedef address_word sim_cia;
|
||||
|
||||
typedef struct _sim_cpu SIM_CPU;
|
||||
|
||||
#include "sim-base.h"
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2015-04-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (sim_cia): Delete.
|
||||
(SIM_ADDR): Delete comment.
|
||||
|
||||
2015-04-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* dv-mn103cpu.c (deliver_mn103cpu_interrupt): Change CIA_GET to
|
||||
|
|
|
@ -42,13 +42,8 @@
|
|||
#include "itable.h"
|
||||
#include "idecode.h"
|
||||
|
||||
typedef instruction_address sim_cia;
|
||||
typedef struct _sim_cpu SIM_CPU;
|
||||
|
||||
/* FIXME: Perhaps igen should generate access macros for
|
||||
`instruction_address' that we could use. */
|
||||
/*#define CIA_ADDR(cia) ((cia).ip) doesn't work for mn10300*/
|
||||
|
||||
#define WITH_WATCHPOINTS 1
|
||||
|
||||
#define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2015-04-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (sim_cia): Delete.
|
||||
|
||||
2015-04-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* interp.c (wbat, wsat, wlat, rsat, rbat, rlat, sim_engine_run):
|
||||
|
|
|
@ -22,8 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||
|
||||
#include "sim-basics.h"
|
||||
|
||||
typedef address_word sim_cia;
|
||||
|
||||
typedef struct _sim_cpu SIM_CPU;
|
||||
|
||||
#include "sim-base.h"
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2015-04-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (sim_cia): Delete.
|
||||
|
||||
2015-04-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (CIA_GET, CIA_SET): Delete.
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
#include "sim-basics.h"
|
||||
#include "sim-signal.h"
|
||||
|
||||
typedef unsigned32 sim_cia;
|
||||
|
||||
typedef struct _sim_cpu SIM_CPU;
|
||||
|
||||
#include "msp430-sim.h"
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2015-04-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (sim_cia): Delete.
|
||||
|
||||
2015-04-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (CIA_GET, CIA_SET): Delete.
|
||||
|
|
|
@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||
|
||||
#include "sim-basics.h"
|
||||
|
||||
typedef address_word sim_cia;
|
||||
|
||||
typedef struct _sim_cpu SIM_CPU;
|
||||
|
||||
#include "sim-base.h"
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2015-04-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (CIA_ADDR): Define.
|
||||
|
||||
2015-04-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (CIA_GET, CIA_SET): Delete.
|
||||
|
|
|
@ -21,6 +21,7 @@ typedef struct _sim_cpu SIM_CPU;
|
|||
|
||||
/* These must be defined before sim-base.h. */
|
||||
typedef UDI sim_cia;
|
||||
#define CIA_ADDR(cia) (cia)
|
||||
|
||||
#include "sim-base.h"
|
||||
#include "cgen-sim.h"
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2015-04-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (sim_cia): Delete.
|
||||
|
||||
2015-04-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.h (CIA_GET, CIA_SET): Delete.
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
#include "sim-signal.h"
|
||||
#include "sim-fpu.h"
|
||||
|
||||
typedef address_word sim_cia;
|
||||
|
||||
typedef struct _sim_cpu SIM_CPU;
|
||||
|
||||
#include "sim-base.h"
|
||||
|
|
Loading…
Reference in a new issue