SCP: Fix details missed when merging update REGister macros from v3.12-2

This commit is contained in:
J. David Bryan 2022-08-14 21:23:21 -07:00 committed by Mark Pizzolato
parent 24260f0613
commit d862d024ea
3 changed files with 22 additions and 22 deletions

View file

@ -162,12 +162,12 @@
These additional register definition macros are used to define:
FBDATA -- a one-bit flag in an arrayed register
SRDATA -- an array of bytes large enough to hold a structure
SVDATA -- a register only used for SAVE/RESTORE
YRDATA -- a binary register
The FBDATA macro defines a flag that is replicated in the same bit position
in each element of an array; the array element size is assumed to be the
minimum necessary to hold the bit at the given offset. The SRDATA macro is
minimum necessary to hold the bit at the given offset. The SVDATA macro is
used solely to SAVE data stored in a structure so that it may be RESTOREd
later. The YRDATA macro extends the functionality of the ORDATA, DRDATA, and
HRDATA macros to registers with binary (base 2) representation.
@ -199,24 +199,24 @@
#undef REGMAP
#if (SIM_MAJOR >= 4)
#define REGMAP(nm,loc,rdx,wd,off,dep,fl) \
REGDATA (nm, loc, rdx, wd, off, dep, NULL, NULL, fl, 0, 0)
#define REGMAP(nm,loc,rdx,wd,off,dep,fl,siz) \
REGDATA (nm, loc, rdx, wd, off, dep, NULL, NULL, fl, 0, siz)
#elif defined (__STDC__) || defined (_WIN32)
#define REGMAP(nm,loc,rdx,wd,off,dep,fl) \
#define REGMAP(nm,loc,rdx,wd,off,dep,fl,siz) \
#nm, &(loc), (rdx), (wd), (off), (dep), (fl), 0
#else
#define REGMAP(nm,loc,rdx,wd,off,dep,fl) \
#define REGMAP(nm,loc,rdx,wd,off,dep,fl,siz) \
"nm", &(loc), (rdx), (wd), (off), (dep), (fl), 0
#endif
/* Macro name loc radix width offset depth flags */
/* ------------------------- ---- ------ ----- ----- ------ ---------- ----- */
#define FBDATA(nm,loc,ofs,dep,fl) REGMAP (nm, (loc), 2, 1, (ofs), (dep), (fl) )
#define SRDATA(nm,loc,fl) REGMAP (nm, (loc), 8, 8, 0, sizeof loc, (fl) )
#define YRDATA(nm,loc,wid,fl) REGMAP (nm, (loc), 2, (wid), 0, 1, (fl) )
/* Macro name loc radix width offset depth flags size */
/* ------------------------- ---- ------ ----- ----- ------ ---------- ----- -------------- */
#define FBDATA(nm,loc,ofs,dep,fl) REGMAP (nm, (loc), 2, 1, (ofs), (dep), (fl), sizeof *(loc))
#define SVDATA(nm,loc) SAVEDATA (nm, (loc))
#define YRDATA(nm,loc,wid,fl) BINRDATA (nm, (loc), (wid)), (fl)
/* Debugging and console output.

View file

@ -441,7 +441,7 @@ static REG ds_reg [] = {
{ ORDATA (STATUS, status_word, 16), REG_FIT | PV_RZRO },
{ DRDATA (RETRY, retry_counter, 4), REG_FIT | PV_LEFT },
{ SRDATA (DIAG, overrides, REG_HRO) },
{ SVDATA (DIAG, overrides) },
DIB_REGS (ds_dib),

View file

@ -1067,26 +1067,26 @@ struct MEMFILE {
_RegCheck(#nm,&(loc),rdx,wd,pos,1,desc,flds,0,0,sizeof((loc)),GRDATADF)
/* Arrayed register whose data is kept in a standard C array Register */
#define BRDATA(nm,aloc,rdx,wd,dep) \
_RegCheck(#nm,aloc,rdx,wd,0,dep,NULL,NULL,0,0,sizeof(*(aloc)),BRDATA)
_RegCheck(#nm,aloc,rdx,wd,0,dep,NULL,NULL,0,sizeof(*(aloc)),sizeof(*(aloc)),BRDATA)
#define BRDATAD(nm,aloc,rdx,wd,dep,desc) \
_RegCheck(#nm,aloc,rdx,wd,0,dep,desc,NULL,0,0,sizeof(*(aloc)),BRDATAD)
_RegCheck(#nm,aloc,rdx,wd,0,dep,desc,NULL,0,sizeof(*(aloc)),sizeof(*(aloc)),BRDATAD)
#define BRDATADF(nm,aloc,rdx,wd,dep,desc,flds) \
_RegCheck(#nm,aloc,rdx,wd,0,dep,desc,flds,0,0,sizeof(*(aloc)),BRDATADF)
/* Arrayed register whose data is kept in a standard C array Register */
_RegCheck(#nm,aloc,rdx,wd,0,dep,desc,flds,0,sizeof(*(aloc)),sizeof(*(aloc)),BRDATADF)
/* Arrayed register whose data is kept in a standard C two dimensional array Register */
#define CRDATA(nm,aloc,rdx,wd,dep) \
_RegCheck(#nm,aloc,rdx,wd,0,dep,NULL,NULL,0,0,sizeof(**(aloc)),CRDATA)
_RegCheck(#nm,&(aloc),rdx,wd,0,dep,NULL,NULL,0,sizeof(**(aloc)),sizeof(**(aloc)),CRDATA)
#define CRDATAD(nm,aloc,rdx,wd,dep,desc) \
_RegCheck(#nm,aloc,rdx,wd,0,dep,desc,NULL,0,0,sizeof(**(aloc)),CRDATAD)
_RegCheck(#nm,&(aloc),rdx,wd,0,dep,desc,NULL,0,sizeof(**(aloc)),sizeof(**(aloc)),CRDATAD)
#define CRDATADF(nm,aloc,rdx,wd,dep,desc,flds) \
_RegCheck(#nm,aloc,rdx,wd,0,dep,desc,flds,0,0,sizeof(**(aloc)),CRDATADF)
_RegCheck(#nm,&(aloc),rdx,wd,0,dep,desc,flds,0,sizeof(**(aloc)),sizeof(**(aloc)),CRDATADF)
/* Range of memory whose data is successive scalar values accessed like an array Register */
#define VBRDATA(nm,loc,rdx,wd,dep) \
_RegCheck(#nm,&(loc),rdx,wd,0,dep,NULL,NULL,0,0,sizeof(loc),VBRDATA)
_RegCheck(#nm,&(loc),rdx,wd,0,dep,NULL,NULL,0,wd/8,sizeof(loc),VBRDATA)
#define VBRDATAD(nm,loc,rdx,wd,dep,desc) \
_RegCheck(#nm,&(loc),rdx,wd,0,dep,desc,NULL,0,0,sizeof(loc),VBRDATAD)
_RegCheck(#nm,&(loc),rdx,wd,0,dep,desc,NULL,0,wd/8,sizeof(loc),VBRDATAD)
#define VBRDATADF(nm,loc,rdx,wd,dep,desc,flds) \
_RegCheck(#nm,&(loc),rdx,wd,0,dep,desc,flds,0,0,sizeof(loc),VBRDATADF)
_RegCheck(#nm,&(loc),rdx,wd,0,dep,desc,flds,0,wd/8,sizeof(loc),VBRDATADF)
/* Arrayed register whose data is part of the UNIT structure */
#define URDATA(nm,loc,rdx,wd,off,dep,fl) \
_RegCheck(#nm,&(loc),rdx,wd,off,dep,NULL,NULL,0,sizeof(UNIT),sizeof((loc)),URDATA),(fl)