SCP: Remove optional write_callback in the REGister structure

The REG structure exists to serve SCP's various activities.  It is
does not exist to provide capabilities to a VM.
This commit is contained in:
Mark Pizzolato 2017-12-09 02:54:10 -08:00
parent b4c3fa1656
commit 9b1f44f787
3 changed files with 62 additions and 106 deletions

Binary file not shown.

6
scp.c
View file

@ -7671,7 +7671,6 @@ void put_rval (REG *rptr, uint32 idx, t_value val)
{ {
size_t sz; size_t sz;
t_value mask; t_value mask;
t_value old_val;
uint32 *ptr; uint32 *ptr;
#define PUT_RVAL(sz,rp,id,v,m) \ #define PUT_RVAL(sz,rp,id,v,m) \
@ -7679,8 +7678,6 @@ uint32 *ptr;
(sz)((*(((sz *) rp->loc) + id) & \ (sz)((*(((sz *) rp->loc) + id) & \
~((m) << (rp)->offset)) | ((v) << (rp)->offset)) ~((m) << (rp)->offset)) | ((v) << (rp)->offset))
if (rptr->write_callback)
old_val = get_rval (rptr, idx);
if (rptr == sim_PC) if (rptr == sim_PC)
sim_brk_npc (0); sim_brk_npc (0);
sz = SZ_R (rptr); sz = SZ_R (rptr);
@ -7733,9 +7730,6 @@ else PUT_RVAL (t_uint64, rptr, idx, val, mask);
#else #else
else PUT_RVAL (uint32, rptr, idx, val, mask); else PUT_RVAL (uint32, rptr, idx, val, mask);
#endif #endif
if ((rptr->write_callback) && (!(sim_switches & SIM_SW_REST)))
rptr->write_callback (old_val, rptr, idx);
return;
} }
/* Examine address routine /* Examine address routine

View file

@ -652,8 +652,6 @@ struct REG {
BITFIELD *fields; /* bit fields */ BITFIELD *fields; /* bit fields */
uint32 qptr; /* circ q ptr */ uint32 qptr; /* circ q ptr */
size_t str_size; /* structure size */ size_t str_size; /* structure size */
void (*write_callback)(t_value old_value, REG *rptr, int idx);
/* called during DEPOSIT */
/* NOTE: Flags MUST always be last since it is initialized outside of macro definitions */ /* NOTE: Flags MUST always be last since it is initialized outside of macro definitions */
uint32 flags; /* flags */ uint32 flags; /* flags */
}; };
@ -861,98 +859,80 @@ struct MEMFILE {
#define UDATA(act,fl,cap) NULL,act,NULL,NULL,NULL,0,0,(fl),0,(cap),0,NULL,0,0 #define UDATA(act,fl,cap) NULL,act,NULL,NULL,NULL,0,0,(fl),0,(cap),0,NULL,0,0
/* Internal use ONLY (see below) Generic Register declaration for all fields */ /* Internal use ONLY (see below) Generic Register declaration for all fields */
#define _REGDATANF(nm,loc,rdx,wd,off,dep,desc,flds,qptr,siz,cbak) \ #define _REGDATANF(nm,loc,rdx,wd,off,dep,desc,flds,qptr,siz) \
nm, (loc), (rdx), (wd), (off), (dep), (desc), (flds), (qptr), (siz), (cbak) nm, (loc), (rdx), (wd), (off), (dep), (desc), (flds), (qptr), (siz)
#if defined (__STDC__) || defined (_WIN32) /* Variants which depend on how macro arguments are convered to strings */ #if defined (__STDC__) || defined (_WIN32) /* Variants which depend on how macro arguments are convered to strings */
/* Generic Register declaration for all fields. /* Generic Register declaration for all fields.
If the register structure is extended, this macro will be retained and a If the register structure is extended, this macro will be retained and a
new internal macro will be provided that populates the new register structure */ new internal macro will be provided that populates the new register structure */
#define REGDATA(nm,loc,rdx,wd,off,dep,desc,flds,fl,qptr,siz) \ #define REGDATA(nm,loc,rdx,wd,off,dep,desc,flds,fl,qptr,siz) \
_REGDATANF(#nm,&(loc),rdx,wd,off,dep,desc,flds,qptr,siz,NULL),(fl) _REGDATANF(#nm,&(loc),rdx,wd,off,dep,desc,flds,qptr,siz),(fl)
#define REGDATAC(nm,loc,rdx,wd,off,dep,desc,flds,fl,qptr,siz,cbak) \ #define REGDATAC(nm,loc,rdx,wd,off,dep,desc,flds,fl,qptr,siz) \
_REGDATANF(#nm,&(loc),rdx,wd,off,dep,desc,flds,qptr,siz,cbak),(fl) _REGDATANF(#nm,&(loc),rdx,wd,off,dep,desc,flds,qptr,siz),(fl)
/* Right Justified Octal Register Data */ /* Right Justified Octal Register Data */
#define ORDATA(nm,loc,wd) \ #define ORDATA(nm,loc,wd) \
_REGDATANF(#nm,&(loc),8,wd,0,1,NULL,NULL,0,0,NULL) _REGDATANF(#nm,&(loc),8,wd,0,1,NULL,NULL,0,0)
#define ORDATAD(nm,loc,wd,desc) \ #define ORDATAD(nm,loc,wd,desc) \
_REGDATANF(#nm,&(loc),8,wd,0,1,desc,NULL,0,0,NULL) _REGDATANF(#nm,&(loc),8,wd,0,1,desc,NULL,0,0)
#define ORDATADF(nm,loc,wd,desc,flds) \ #define ORDATADF(nm,loc,wd,desc,flds) \
_REGDATANF(#nm,&(loc),8,wd,0,1,desc,flds,0,0,NULL) _REGDATANF(#nm,&(loc),8,wd,0,1,desc,flds,0,0)
#define ORDATADFC(nm,loc,wd,desc,flds,cbk) \
_REGDATANF(#nm,&(loc),8,wd,0,1,desc,flds,0,0,cbk)
/* Right Justified Decimal Register Data */ /* Right Justified Decimal Register Data */
#define DRDATA(nm,loc,wd) \ #define DRDATA(nm,loc,wd) \
_REGDATANF(#nm,&(loc),10,wd,0,1,NULL,NULL,0,0,NULL) _REGDATANF(#nm,&(loc),10,wd,0,1,NULL,NULL,0,0)
#define DRDATAD(nm,loc,wd,desc) \ #define DRDATAD(nm,loc,wd,desc) \
_REGDATANF(#nm,&(loc),10,wd,0,1,desc,NULL,0,0,NULL) _REGDATANF(#nm,&(loc),10,wd,0,1,desc,NULL,0,0)
#define DRDATADF(nm,loc,wd,desc,flds) \ #define DRDATADF(nm,loc,wd,desc,flds) \
_REGDATANF(#nm,&(loc),10,wd,0,1,desc,flds,0,0,NULL) _REGDATANF(#nm,&(loc),10,wd,0,1,desc,flds,0,0)
#define DRDATADFC(nm,loc,wd,desc,flds,cbk) \
_REGDATANF(#nm,&(loc),10,wd,0,1,desc,flds,0,0,cbk)
/* Right Justified Hexadecimal Register Data */ /* Right Justified Hexadecimal Register Data */
#define HRDATA(nm,loc,wd) \ #define HRDATA(nm,loc,wd) \
_REGDATANF(#nm,&(loc),16,wd,0,1,NULL,NULL,0,0,NULL) _REGDATANF(#nm,&(loc),16,wd,0,1,NULL,NULL,0,0)
#define HRDATAD(nm,loc,wd,desc) \ #define HRDATAD(nm,loc,wd,desc) \
_REGDATANF(#nm,&(loc),16,wd,0,1,desc,NULL,0,0,NULL) _REGDATANF(#nm,&(loc),16,wd,0,1,desc,NULL,0,0)
#define HRDATADF(nm,loc,wd,desc,flds) \ #define HRDATADF(nm,loc,wd,desc,flds) \
_REGDATANF(#nm,&(loc),16,wd,0,1,desc,flds,0,0,NULL) _REGDATANF(#nm,&(loc),16,wd,0,1,desc,flds,0,0)
#define HRDATADFC(nm,loc,wd,desc,flds,cbk) \
_REGDATANF(#nm,&(loc),16,wd,0,1,desc,flds,0,0,cbk)
/* Right Justified Binary Register Data */ /* Right Justified Binary Register Data */
#define BINRDATA(nm,loc,wd) \ #define BINRDATA(nm,loc,wd) \
_REGDATANF(#nm,&(loc),2,wd,0,1,NULL,NULL,0,0,NULL) _REGDATANF(#nm,&(loc),2,wd,0,1,NULL,NULL,0,0)
#define BINRDATAD(nm,loc,wd,desc) \ #define BINRDATAD(nm,loc,wd,desc) \
_REGDATANF(#nm,&(loc),2,wd,0,1,desc,NULL,0,0,NULL) _REGDATANF(#nm,&(loc),2,wd,0,1,desc,NULL,0,0)
#define BINRDATADF(nm,loc,wd,desc,flds) \ #define BINRDATADF(nm,loc,wd,desc,flds) \
_REGDATANF(#nm,&(loc),2,wd,0,1,desc,flds,0,0,NULL) _REGDATANF(#nm,&(loc),2,wd,0,1,desc,flds,0,0)
#define BINRDATADFC(nm,loc,wd,desc,flds,cbk) \
_REGDATANF(#nm,&(loc),2,wd,0,1,desc,flds,0,0,cbk)
/* One-bit binary flag at an arbitrary offset in a 32-bit word Register */ /* One-bit binary flag at an arbitrary offset in a 32-bit word Register */
#define FLDATA(nm,loc,pos) \ #define FLDATA(nm,loc,pos) \
_REGDATANF(#nm,&(loc),2,1,pos,1,NULL,NULL,0,0,NULL) _REGDATANF(#nm,&(loc),2,1,pos,1,NULL,NULL,0,0)
#define FLDATAD(nm,loc,pos,desc) \ #define FLDATAD(nm,loc,pos,desc) \
_REGDATANF(#nm,&(loc),2,1,pos,1,desc,NULL,0,0,NULL) _REGDATANF(#nm,&(loc),2,1,pos,1,desc,NULL,0,0)
#define FLDATADF(nm,loc,pos,desc,flds) \ #define FLDATADF(nm,loc,pos,desc,flds) \
_REGDATANF(#nm,&(loc),2,1,pos,1,desc,flds,0,0,NULL) _REGDATANF(#nm,&(loc),2,1,pos,1,desc,flds,0,0)
#define FLDATADFC(nm,loc,pos,desc,flds,cbk) \
_REGDATANF(#nm,&(loc),2,1,pos,1,desc,flds,0,0,cbk)
/* Arbitrary location and Radix Register */ /* Arbitrary location and Radix Register */
#define GRDATA(nm,loc,rdx,wd,pos) \ #define GRDATA(nm,loc,rdx,wd,pos) \
_REGDATANF(#nm,&(loc),rdx,wd,pos,1,NULL,NULL,0,0,NULL) _REGDATANF(#nm,&(loc),rdx,wd,pos,1,NULL,NULL,0,0)
#define GRDATAD(nm,loc,rdx,wd,pos,desc) \ #define GRDATAD(nm,loc,rdx,wd,pos,desc) \
_REGDATANF(#nm,&(loc),rdx,wd,pos,1,desc,NULL,0,0,NULL) _REGDATANF(#nm,&(loc),rdx,wd,pos,1,desc,NULL,0,0)
#define GRDATADF(nm,loc,rdx,wd,pos,desc,flds) \ #define GRDATADF(nm,loc,rdx,wd,pos,desc,flds) \
_REGDATANF(#nm,&(loc),rdx,wd,pos,1,desc,flds,0,0,NULL) _REGDATANF(#nm,&(loc),rdx,wd,pos,1,desc,flds,0,0)
#define GRDATADFC(nm,loc,rdx,wd,pos,desc,flds,cbk) \
_REGDATANF(#nm,&(loc),rdx,wd,pos,1,desc,flds,0,0,cbk)
/* Arrayed register whose data is kept in a standard C array Register */ /* Arrayed register whose data is kept in a standard C array Register */
#define BRDATA(nm,loc,rdx,wd,dep) \ #define BRDATA(nm,loc,rdx,wd,dep) \
_REGDATANF(#nm,loc,rdx,wd,0,dep,NULL,NULL,0,0,NULL) _REGDATANF(#nm,loc,rdx,wd,0,dep,NULL,NULL,0,0)
#define BRDATAD(nm,loc,rdx,wd,dep,desc) \ #define BRDATAD(nm,loc,rdx,wd,dep,desc) \
_REGDATANF(#nm,loc,rdx,wd,0,dep,desc,NULL,0,0,NULL) _REGDATANF(#nm,loc,rdx,wd,0,dep,desc,NULL,0,0)
#define BRDATADF(nm,loc,rdx,wd,dep,desc,flds) \ #define BRDATADF(nm,loc,rdx,wd,dep,desc,flds) \
_REGDATANF(#nm,loc,rdx,wd,0,dep,desc,flds,0,0,NULL) _REGDATANF(#nm,loc,rdx,wd,0,dep,desc,flds,0,0)
#define BRDATADFC(nm,loc,rdx,wd,dep,desc,flds,cbk) \
_REGDATANF(#nm,loc,rdx,wd,0,dep,desc,flds,0,0,cbk)
/* Arrayed register whose data is part of the UNIT structure */ /* Arrayed register whose data is part of the UNIT structure */
#define URDATA(nm,loc,rdx,wd,off,dep,fl) \ #define URDATA(nm,loc,rdx,wd,off,dep,fl) \
_REGDATANF(#nm,&(loc),rdx,wd,off,dep,NULL,NULL,0,0,NULL),((fl) | REG_UNIT) _REGDATANF(#nm,&(loc),rdx,wd,off,dep,NULL,NULL,0,0),((fl) | REG_UNIT)
#define URDATAD(nm,loc,rdx,wd,off,dep,fl,desc) \ #define URDATAD(nm,loc,rdx,wd,off,dep,fl,desc) \
_REGDATANF(#nm,&(loc),rdx,wd,off,dep,desc,NULL,0,0,NULL),((fl) | REG_UNIT) _REGDATANF(#nm,&(loc),rdx,wd,off,dep,desc,NULL,0,0),((fl) | REG_UNIT)
#define URDATADF(nm,loc,rdx,wd,off,dep,fl,desc,flds) \ #define URDATADF(nm,loc,rdx,wd,off,dep,fl,desc,flds) \
_REGDATANF(#nm,&(loc),rdx,wd,off,dep,desc,flds,0,0,NULL),((fl) | REG_UNIT) _REGDATANF(#nm,&(loc),rdx,wd,off,dep,desc,flds,0,0),((fl) | REG_UNIT)
#define URDATADFC(nm,loc,rdx,wd,off,dep,fl,desc,flds,cbk) \
_REGDATANF(#nm,&(loc),rdx,wd,off,dep,desc,flds,0,0,cbk),((fl) | REG_UNIT)
/* Arrayed register whose data is part of an arbitrary structure */ /* Arrayed register whose data is part of an arbitrary structure */
#define STRDATA(nm,loc,rdx,wd,off,dep,siz,fl) \ #define STRDATA(nm,loc,rdx,wd,off,dep,siz,fl) \
_REGDATANF(#nm,&(loc),rdx,wd,off,dep,NULL,NULL,0,siz,NULL),((fl) | REG_STRUCT) _REGDATANF(#nm,&(loc),rdx,wd,off,dep,NULL,NULL,0,siz),((fl) | REG_STRUCT)
#define STRDATAD(nm,loc,rdx,wd,off,dep,siz,fl,desc) \ #define STRDATAD(nm,loc,rdx,wd,off,dep,siz,fl,desc) \
_REGDATANF(#nm,&(loc),rdx,wd,off,dep,desc,NULL,0,siz,NULL),((fl) | REG_STRUCT) _REGDATANF(#nm,&(loc),rdx,wd,off,dep,desc,NULL,0,siz),((fl) | REG_STRUCT)
#define STRDATADF(nm,loc,rdx,wd,off,dep,siz,fl,desc,flds) \ #define STRDATADF(nm,loc,rdx,wd,off,dep,siz,fl,desc,flds) \
_REGDATANF(#nm,&(loc),rdx,wd,off,dep,desc,flds,0,siz,NULL),((fl) | REG_STRUCT) _REGDATANF(#nm,&(loc),rdx,wd,off,dep,desc,flds,0,siz),((fl) | REG_STRUCT)
#define STRDATADFC(nm,loc,rdx,wd,off,dep,siz,fl,desc,flds,cbk) \
_REGDATANF(#nm,&(loc),rdx,wd,off,dep,desc,flds,0,siz,cbk),((fl) | REG_STRUCT)
#define BIT(nm) {#nm, 0xffffffff, 1} /* Single Bit definition */ #define BIT(nm) {#nm, 0xffffffff, 1} /* Single Bit definition */
#define BITNC {"", 0xffffffff, 1} /* Don't care Bit definition */ #define BITNC {"", 0xffffffff, 1} /* Don't care Bit definition */
#define BITF(nm,sz) {#nm, 0xffffffff, sz} /* Bit Field definition */ #define BITF(nm,sz) {#nm, 0xffffffff, sz} /* Bit Field definition */
@ -964,90 +944,72 @@ struct MEMFILE {
If the register structure is extended, this macro will be retained and a If the register structure is extended, this macro will be retained and a
new macro will be provided that populates the new register structure */ new macro will be provided that populates the new register structure */
#define REGDATA(nm,loc,rdx,wd,off,dep,desc,flds,fl,qptr,siz) \ #define REGDATA(nm,loc,rdx,wd,off,dep,desc,flds,fl,qptr,siz) \
_REGDATANF("nm",&(loc),rdx,wd,off,dep,desc,flds,qptr,siz,NULL),(fl) _REGDATANF("nm",&(loc),rdx,wd,off,dep,desc,flds,qptr,siz),(fl)
#define REGDATAC(nm,loc,rdx,wd,off,dep,desc,flds,fl,qptr,siz,cbak) \ #define REGDATAC(nm,loc,rdx,wd,off,dep,desc,flds,fl,qptr,siz) \
_REGDATANF("nm",&(loc),rdx,wd,off,dep,desc,flds,qptr,siz,cbak),(fl) _REGDATANF("nm",&(loc),rdx,wd,off,dep,desc,flds,qptr,siz),(fl)
/* Right Justified Octal Register Data */ /* Right Justified Octal Register Data */
#define ORDATA(nm,loc,wd) \ #define ORDATA(nm,loc,wd) \
_REGDATANF("nm",&(loc),8,wd,0,1,NULL,NULL,0,0,NULL) _REGDATANF("nm",&(loc),8,wd,0,1,NULL,NULL,0,0)
#define ORDATAD(nm,loc,wd,desc) \ #define ORDATAD(nm,loc,wd,desc) \
_REGDATANF("nm",&(loc),8,wd,0,1,desc,NULL,0,0,NULL) _REGDATANF("nm",&(loc),8,wd,0,1,desc,NULL,0,0)
#define ORDATADF(nm,loc,wd,desc,flds) \ #define ORDATADF(nm,loc,wd,desc,flds) \
_REGDATANF("nm",&(loc),8,wd,0,1,desc,flds,0,0,NULL) _REGDATANF("nm",&(loc),8,wd,0,1,desc,flds,0,0)
#define ORDATADFC(nm,loc,wd,desc,flds,cbk) \
_REGDATANF("nm",&(loc),8,wd,0,1,desc,flds,0,0,cbk)
/* Right Justified Decimal Register Data */ /* Right Justified Decimal Register Data */
#define DRDATA(nm,loc,wd) \ #define DRDATA(nm,loc,wd) \
_REGDATANF("nm",&(loc),10,wd,0,1,NULL,NULL,0,0,NULL) _REGDATANF("nm",&(loc),10,wd,0,1,NULL,NULL,0,0)
#define DRDATAD(nm,loc,wd,desc) \ #define DRDATAD(nm,loc,wd,desc) \
_REGDATANF("nm",&(loc),10,wd,0,1,desc,NULL,0,0,NULL) _REGDATANF("nm",&(loc),10,wd,0,1,desc,NULL,0,0)
#define DRDATADF(nm,loc,wd,desc,flds) \ #define DRDATADF(nm,loc,wd,desc,flds) \
_REGDATANF("nm",&(loc),10,wd,0,1,desc,flds,0,0,NULL) _REGDATANF("nm",&(loc),10,wd,0,1,desc,flds,0,0)
#define DRDATADFC(nm,loc,wd,desc,flds,cbk) \
_REGDATANF("nm",&(loc),10,wd,0,1,desc,flds,0,0,cbk)
/* Right Justified Hexadecimal Register Data */ /* Right Justified Hexadecimal Register Data */
#define HRDATA(nm,loc,wd) \ #define HRDATA(nm,loc,wd) \
_REGDATANF("nm",&(loc),16,wd,0,1,NULL,NULL,0,0,NULL) _REGDATANF("nm",&(loc),16,wd,0,1,NULL,NULL,0,0)
#define HRDATAD(nm,loc,wd,desc) \ #define HRDATAD(nm,loc,wd,desc) \
_REGDATANF("nm",&(loc),16,wd,0,1,desc,NULL,0,0,NULL) _REGDATANF("nm",&(loc),16,wd,0,1,desc,NULL,0,0)
#define HRDATADF(nm,loc,wd,desc,flds) \ #define HRDATADF(nm,loc,wd,desc,flds) \
_REGDATANF("nm",&(loc),16,wd,0,1,desc,flds,0,0,NULL) _REGDATANF("nm",&(loc),16,wd,0,1,desc,flds,0,0)
#define HRDATADFC(nm,loc,wd,desc,flds,cbk) \
_REGDATANF("nm",&(loc),16,wd,0,1,desc,flds,0,0,cbk)
/* Right Justified Binary Register Data */ /* Right Justified Binary Register Data */
#define BINRDATA(nm,loc,wd) \ #define BINRDATA(nm,loc,wd) \
_REGDATANF("nm",&(loc),2,wd,0,1,NULL,NULL,0,0,NULL) _REGDATANF("nm",&(loc),2,wd,0,1,NULL,NULL,0,0)
#define BINRDATAD(nm,loc,wd,desc) \ #define BINRDATAD(nm,loc,wd,desc) \
_REGDATANF("nm",&(loc),2,wd,0,1,desc,NULL,0,0,NULL) _REGDATANF("nm",&(loc),2,wd,0,1,desc,NULL,0,0)
#define BINRDATADF(nm,loc,wd,desc,flds) \ #define BINRDATADF(nm,loc,wd,desc,flds) \
_REGDATANF("nm",&(loc),2,wd,0,1,desc,flds,0,0,NULL) _REGDATANF("nm",&(loc),2,wd,0,1,desc,flds,0,0)
#define BINRDATADFC(nm,loc,wd,desc,flds,cbk) \
_REGDATANF("nm",&(loc),2,wd,0,1,desc,flds,0,0,cbk)
/* One-bit binary flag at an arbitrary offset in a 32-bit word Register */ /* One-bit binary flag at an arbitrary offset in a 32-bit word Register */
#define FLDATA(nm,loc,pos) \ #define FLDATA(nm,loc,pos) \
_REGDATANF("nm",&(loc),2,1,pos,1,NULL,NULL,0,0,NULL) _REGDATANF("nm",&(loc),2,1,pos,1,NULL,NULL,0,0)
#define FLDATAD(nm,loc,pos,desc) \ #define FLDATAD(nm,loc,pos,desc) \
_REGDATANF("nm",&(loc),2,1,pos,1,desc,NULL,0,0,NULL) _REGDATANF("nm",&(loc),2,1,pos,1,desc,NULL,0,0)
#define FLDATADF(nm,loc,pos,desc,flds) \ #define FLDATADF(nm,loc,pos,desc,flds) \
_REGDATANF("nm",&(loc),2,1,pos,1,desc,flds,0,0,NULL) _REGDATANF("nm",&(loc),2,1,pos,1,desc,flds,0,0)
#define FLDATADFC(nm,loc,pos,desc,flds,cbk) \
_REGDATANF("nm",&(loc),2,1,pos,1,desc,flds,0,0,cbk)
/* Arbitrary location and Radix Register */ /* Arbitrary location and Radix Register */
#define GRDATA(nm,loc,rdx,wd,pos) \ #define GRDATA(nm,loc,rdx,wd,pos) \
_REGDATANF("nm",&(loc),rdx,wd,pos,1,NULL,NULL,0,0,NULL) _REGDATANF("nm",&(loc),rdx,wd,pos,1,NULL,NULL,0,0)
#define GRDATAD(nm,loc,rdx,wd,pos,desc) \ #define GRDATAD(nm,loc,rdx,wd,pos,desc) \
_REGDATANF("nm",&(loc),rdx,wd,pos,1,desc,NULL,0,0,NULL) _REGDATANF("nm",&(loc),rdx,wd,pos,1,desc,NULL,0,0)
#define GRDATADF(nm,loc,rdx,wd,pos,desc,flds) \ #define GRDATADF(nm,loc,rdx,wd,pos,desc,flds) \
_REGDATANF("nm",&(loc),rdx,wd,pos,1,desc,flds,0,0,NULL) _REGDATANF("nm",&(loc),rdx,wd,pos,1,desc,flds,0,0)
#define GRDATADFC(nm,loc,rdx,wd,pos,desc,flds,cbk) \
_REGDATANF("nm",&(loc),rdx,wd,pos,1,desc,flds,0,0,cbk)
/* Arrayed register whose data is kept in a standard C array Register */ /* Arrayed register whose data is kept in a standard C array Register */
#define BRDATA(nm,loc,rdx,wd,dep) \ #define BRDATA(nm,loc,rdx,wd,dep) \
_REGDATANF("nm",loc,rdx,wd,0,dep,NULL,NULL,0,0,NULL) _REGDATANF("nm",loc,rdx,wd,0,dep,NULL,NULL,0,0)
#define BRDATAD(nm,loc,rdx,wd,dep,desc) \ #define BRDATAD(nm,loc,rdx,wd,dep,desc) \
_REGDATANF("nm",loc,rdx,wd,0,dep,desc,NULL,0,0,NULL) _REGDATANF("nm",loc,rdx,wd,0,dep,desc,NULL,0,0)
#define BRDATADF(nm,loc,rdx,wd,dep,desc,flds) \ #define BRDATADF(nm,loc,rdx,wd,dep,desc,flds) \
_REGDATANF("nm",loc,rdx,wd,0,dep,desc,flds,0,0,NULL) _REGDATANF("nm",loc,rdx,wd,0,dep,desc,flds,0,0)
#define BRDATADFC(nm,loc,rdx,wd,dep,desc,flds,cbk) \
_REGDATANF("nm",loc,rdx,wd,0,dep,desc,flds,0,0,cbk)
/* Arrayed register whose data is part of the UNIT structure */ /* Arrayed register whose data is part of the UNIT structure */
#define URDATA(nm,loc,rdx,wd,off,dep,fl) \ #define URDATA(nm,loc,rdx,wd,off,dep,fl) \
_REGDATANF("nm",&(loc),rdx,wd,off,dep,NULL,NULL,0,0,NULL),((fl) | REG_UNIT) _REGDATANF("nm",&(loc),rdx,wd,off,dep,NULL,NULL,0,0),((fl) | REG_UNIT)
#define URDATAD(nm,loc,rdx,wd,off,dep,fl,desc) \ #define URDATAD(nm,loc,rdx,wd,off,dep,fl,desc) \
_REGDATANF("nm",&(loc),rdx,wd,off,dep,desc,NULL,0,0,NULL),((fl) | REG_UNIT) _REGDATANF("nm",&(loc),rdx,wd,off,dep,desc,NULL,0,0),((fl) | REG_UNIT)
#define URDATADF(nm,loc,rdx,wd,off,dep,fl,desc,flds) \ #define URDATADF(nm,loc,rdx,wd,off,dep,fl,desc,flds) \
_REGDATANF("nm",&(loc),rdx,wd,off,dep,desc,flds,0,0,NULL),((fl) | REG_UNIT) _REGDATANF("nm",&(loc),rdx,wd,off,dep,desc,flds,0,0),((fl) | REG_UNIT)
#define URDATADFC(nm,loc,rdx,wd,off,dep,fl,desc,flds,cbk) \
_REGDATANF("nm",&(loc),rdx,wd,off,dep,desc,flds,0,0,cbk),((fl) | REG_UNIT)
/* Arrayed register whose data is part of an arbitrary structure */ /* Arrayed register whose data is part of an arbitrary structure */
#define STRDATA(nm,loc,rdx,wd,off,dep,siz,fl) \ #define STRDATA(nm,loc,rdx,wd,off,dep,siz,fl) \
_REGDATANF("nm",&(loc),rdx,wd,off,dep,NULL,NULL,0,siz,NULL),((fl) | REG_STRUCT) _REGDATANF("nm",&(loc),rdx,wd,off,dep,NULL,NULL,0,siz),((fl) | REG_STRUCT)
#define STRDATAD(nm,loc,rdx,wd,off,dep,siz,fl,desc) \ #define STRDATAD(nm,loc,rdx,wd,off,dep,siz,fl,desc) \
_REGDATANF("nm",&(loc),rdx,wd,off,dep,desc,NULL,0,siz,NULL),((fl) | REG_STRUCT) _REGDATANF("nm",&(loc),rdx,wd,off,dep,desc,NULL,0,siz),((fl) | REG_STRUCT)
#define STRDATADF(nm,loc,rdx,wd,off,dep,siz,fl,desc,flds) \ #define STRDATADF(nm,loc,rdx,wd,off,dep,siz,fl,desc,flds) \
_REGDATANF("nm",&(loc),rdx,wd,off,dep,desc,flds,0,siz,NULL),((fl) | REG_STRUCT) _REGDATANF("nm",&(loc),rdx,wd,off,dep,desc,flds,0,siz),((fl) | REG_STRUCT)
#define STRDATADFC(nm,loc,rdx,wd,off,dep,siz,fl,desc,flds,cbk) \
_REGDATANF("nm",&(loc),rdx,wd,off,dep,desc,flds,0,siz,cbk),((fl) | REG_STRUCT)
#define BIT(nm) {"nm", 0xffffffff, 1} /* Single Bit definition */ #define BIT(nm) {"nm", 0xffffffff, 1} /* Single Bit definition */
#define BITNC {"", 0xffffffff, 1} /* Don't care Bit definition */ #define BITNC {"", 0xffffffff, 1} /* Don't care Bit definition */
#define BITF(nm,sz) {"nm", 0xffffffff, sz} /* Bit Field definition */ #define BITF(nm,sz) {"nm", 0xffffffff, sz} /* Bit Field definition */