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:
Mike Frysinger 2015-04-18 04:08:56 -04:00
parent b9a7202de8
commit 7e83aa92f2
47 changed files with 101 additions and 54 deletions

View file

@ -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.

View file

@ -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))

View file

@ -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)