/*
* sparc sim.h
*
* The integer instruction side of this emulator is portable if sizeof(long) >= 4
* Floating point emulation however is not. Assumptions made are:
* sizeof(ulong) == sizeof(float)
* sizeof(ulong)*2 == sizeof(double)
* bits of floating point in memory may be reversed lsw/msw
* unions of double & 2*float & 2*long have no padding
*/
#include "/sparc/include/ureg.h"
#define USERADDR 0xC0000000
#define UREGADDR (USERADDR+BY2PG-4-0xA0)
#define USER_REG(x) (UREGADDR+(ulong)(x))
#define REGOFF(x) (USER_REG(&((struct Ureg *) 0)->x))
struct Breakpoint
{
int type; /* Instruction/Read/Access/Write/Equal */
ulong addr; /* Place at address */
int count; /* To execute count times or value */
int done; /* How many times passed through */
Breakpoint *next; /* Link to next one */
};
struct Icache
{
int on; /* Turned on */
int linesize; /* Line size in bytes */
int stall; /* Cache stalls */
int *lines; /* Tag array */
int* (*hash)(ulong); /* Hash function */
char *hashtext; /* What the function looks like */
};
struct Inst
{
void (*func)(ulong);
char *name;
int type;
int count;
int taken;
int useddelay;
};