diff --git a/doc/simh.doc b/doc/simh.doc index 87369297..eb351337 100644 Binary files a/doc/simh.doc and b/doc/simh.doc differ diff --git a/scp.c b/scp.c index 6dc932e3..73817d4d 100644 --- a/scp.c +++ b/scp.c @@ -7671,7 +7671,6 @@ void put_rval (REG *rptr, uint32 idx, t_value val) { size_t sz; t_value mask; -t_value old_val; uint32 *ptr; #define PUT_RVAL(sz,rp,id,v,m) \ @@ -7679,8 +7678,6 @@ uint32 *ptr; (sz)((*(((sz *) rp->loc) + id) & \ ~((m) << (rp)->offset)) | ((v) << (rp)->offset)) -if (rptr->write_callback) - old_val = get_rval (rptr, idx); if (rptr == sim_PC) sim_brk_npc (0); sz = SZ_R (rptr); @@ -7733,9 +7730,6 @@ else PUT_RVAL (t_uint64, rptr, idx, val, mask); #else else PUT_RVAL (uint32, rptr, idx, val, mask); #endif -if ((rptr->write_callback) && (!(sim_switches & SIM_SW_REST))) - rptr->write_callback (old_val, rptr, idx); -return; } /* Examine address routine diff --git a/sim_defs.h b/sim_defs.h index 7e9dc836..e3d09f25 100644 --- a/sim_defs.h +++ b/sim_defs.h @@ -652,8 +652,6 @@ struct REG { BITFIELD *fields; /* bit fields */ uint32 qptr; /* circ q ptr */ 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 */ 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 /* Internal use ONLY (see below) Generic Register declaration for all fields */ -#define _REGDATANF(nm,loc,rdx,wd,off,dep,desc,flds,qptr,siz,cbak) \ - 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) #if defined (__STDC__) || defined (_WIN32) /* Variants which depend on how macro arguments are convered to strings */ /* Generic Register declaration for all fields. 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 */ #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) -#define REGDATAC(nm,loc,rdx,wd,off,dep,desc,flds,fl,qptr,siz,cbak) \ - _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) +#define REGDATAC(nm,loc,rdx,wd,off,dep,desc,flds,fl,qptr,siz) \ + _REGDATANF(#nm,&(loc),rdx,wd,off,dep,desc,flds,qptr,siz),(fl) /* Right Justified Octal Register Data */ #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) \ - _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) \ - _REGDATANF(#nm,&(loc),8,wd,0,1,desc,flds,0,0,NULL) -#define ORDATADFC(nm,loc,wd,desc,flds,cbk) \ - _REGDATANF(#nm,&(loc),8,wd,0,1,desc,flds,0,0,cbk) + _REGDATANF(#nm,&(loc),8,wd,0,1,desc,flds,0,0) /* Right Justified Decimal Register Data */ #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) \ - _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) \ - _REGDATANF(#nm,&(loc),10,wd,0,1,desc,flds,0,0,NULL) -#define DRDATADFC(nm,loc,wd,desc,flds,cbk) \ - _REGDATANF(#nm,&(loc),10,wd,0,1,desc,flds,0,0,cbk) + _REGDATANF(#nm,&(loc),10,wd,0,1,desc,flds,0,0) /* Right Justified Hexadecimal Register Data */ #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) \ - _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) \ - _REGDATANF(#nm,&(loc),16,wd,0,1,desc,flds,0,0,NULL) -#define HRDATADFC(nm,loc,wd,desc,flds,cbk) \ - _REGDATANF(#nm,&(loc),16,wd,0,1,desc,flds,0,0,cbk) + _REGDATANF(#nm,&(loc),16,wd,0,1,desc,flds,0,0) /* Right Justified Binary Register Data */ #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) \ - _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) \ - _REGDATANF(#nm,&(loc),2,wd,0,1,desc,flds,0,0,NULL) -#define BINRDATADFC(nm,loc,wd,desc,flds,cbk) \ - _REGDATANF(#nm,&(loc),2,wd,0,1,desc,flds,0,0,cbk) + _REGDATANF(#nm,&(loc),2,wd,0,1,desc,flds,0,0) /* One-bit binary flag at an arbitrary offset in a 32-bit word Register */ #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) \ - _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) \ - _REGDATANF(#nm,&(loc),2,1,pos,1,desc,flds,0,0,NULL) -#define FLDATADFC(nm,loc,pos,desc,flds,cbk) \ - _REGDATANF(#nm,&(loc),2,1,pos,1,desc,flds,0,0,cbk) + _REGDATANF(#nm,&(loc),2,1,pos,1,desc,flds,0,0) /* Arbitrary location and Radix Register */ #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) \ - _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) \ - _REGDATANF(#nm,&(loc),rdx,wd,pos,1,desc,flds,0,0,NULL) -#define GRDATADFC(nm,loc,rdx,wd,pos,desc,flds,cbk) \ - _REGDATANF(#nm,&(loc),rdx,wd,pos,1,desc,flds,0,0,cbk) + _REGDATANF(#nm,&(loc),rdx,wd,pos,1,desc,flds,0,0) /* Arrayed register whose data is kept in a standard C array Register */ #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) \ - _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) \ - _REGDATANF(#nm,loc,rdx,wd,0,dep,desc,flds,0,0,NULL) -#define BRDATADFC(nm,loc,rdx,wd,dep,desc,flds,cbk) \ - _REGDATANF(#nm,loc,rdx,wd,0,dep,desc,flds,0,0,cbk) + _REGDATANF(#nm,loc,rdx,wd,0,dep,desc,flds,0,0) /* Arrayed register whose data is part of the UNIT structure */ #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) \ - _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) \ - _REGDATANF(#nm,&(loc),rdx,wd,off,dep,desc,flds,0,0,NULL),((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) + _REGDATANF(#nm,&(loc),rdx,wd,off,dep,desc,flds,0,0),((fl) | REG_UNIT) /* Arrayed register whose data is part of an arbitrary structure */ #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) \ - _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) \ - _REGDATANF(#nm,&(loc),rdx,wd,off,dep,desc,flds,0,siz,NULL),((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) + _REGDATANF(#nm,&(loc),rdx,wd,off,dep,desc,flds,0,siz),((fl) | REG_STRUCT) #define BIT(nm) {#nm, 0xffffffff, 1} /* Single Bit definition */ #define BITNC {"", 0xffffffff, 1} /* Don't care Bit 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 new macro will be provided that populates the new register structure */ #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) -#define REGDATAC(nm,loc,rdx,wd,off,dep,desc,flds,fl,qptr,siz,cbak) \ - _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) +#define REGDATAC(nm,loc,rdx,wd,off,dep,desc,flds,fl,qptr,siz) \ + _REGDATANF("nm",&(loc),rdx,wd,off,dep,desc,flds,qptr,siz),(fl) /* Right Justified Octal Register Data */ #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) \ - _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) \ - _REGDATANF("nm",&(loc),8,wd,0,1,desc,flds,0,0,NULL) -#define ORDATADFC(nm,loc,wd,desc,flds,cbk) \ - _REGDATANF("nm",&(loc),8,wd,0,1,desc,flds,0,0,cbk) + _REGDATANF("nm",&(loc),8,wd,0,1,desc,flds,0,0) /* Right Justified Decimal Register Data */ #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) \ - _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) \ - _REGDATANF("nm",&(loc),10,wd,0,1,desc,flds,0,0,NULL) -#define DRDATADFC(nm,loc,wd,desc,flds,cbk) \ - _REGDATANF("nm",&(loc),10,wd,0,1,desc,flds,0,0,cbk) + _REGDATANF("nm",&(loc),10,wd,0,1,desc,flds,0,0) /* Right Justified Hexadecimal Register Data */ #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) \ - _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) \ - _REGDATANF("nm",&(loc),16,wd,0,1,desc,flds,0,0,NULL) -#define HRDATADFC(nm,loc,wd,desc,flds,cbk) \ - _REGDATANF("nm",&(loc),16,wd,0,1,desc,flds,0,0,cbk) + _REGDATANF("nm",&(loc),16,wd,0,1,desc,flds,0,0) /* Right Justified Binary Register Data */ #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) \ - _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) \ - _REGDATANF("nm",&(loc),2,wd,0,1,desc,flds,0,0,NULL) -#define BINRDATADFC(nm,loc,wd,desc,flds,cbk) \ - _REGDATANF("nm",&(loc),2,wd,0,1,desc,flds,0,0,cbk) + _REGDATANF("nm",&(loc),2,wd,0,1,desc,flds,0,0) /* One-bit binary flag at an arbitrary offset in a 32-bit word Register */ #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) \ - _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) \ - _REGDATANF("nm",&(loc),2,1,pos,1,desc,flds,0,0,NULL) -#define FLDATADFC(nm,loc,pos,desc,flds,cbk) \ - _REGDATANF("nm",&(loc),2,1,pos,1,desc,flds,0,0,cbk) + _REGDATANF("nm",&(loc),2,1,pos,1,desc,flds,0,0) /* Arbitrary location and Radix Register */ #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) \ - _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) \ - _REGDATANF("nm",&(loc),rdx,wd,pos,1,desc,flds,0,0,NULL) -#define GRDATADFC(nm,loc,rdx,wd,pos,desc,flds,cbk) \ - _REGDATANF("nm",&(loc),rdx,wd,pos,1,desc,flds,0,0,cbk) + _REGDATANF("nm",&(loc),rdx,wd,pos,1,desc,flds,0,0) /* Arrayed register whose data is kept in a standard C array Register */ #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) \ - _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) \ - _REGDATANF("nm",loc,rdx,wd,0,dep,desc,flds,0,0,NULL) -#define BRDATADFC(nm,loc,rdx,wd,dep,desc,flds,cbk) \ - _REGDATANF("nm",loc,rdx,wd,0,dep,desc,flds,0,0,cbk) + _REGDATANF("nm",loc,rdx,wd,0,dep,desc,flds,0,0) /* Arrayed register whose data is part of the UNIT structure */ #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) \ - _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) \ - _REGDATANF("nm",&(loc),rdx,wd,off,dep,desc,flds,0,0,NULL),((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) + _REGDATANF("nm",&(loc),rdx,wd,off,dep,desc,flds,0,0),((fl) | REG_UNIT) /* Arrayed register whose data is part of an arbitrary structure */ #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) \ - _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) \ - _REGDATANF("nm",&(loc),rdx,wd,off,dep,desc,flds,0,siz,NULL),((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) + _REGDATANF("nm",&(loc),rdx,wd,off,dep,desc,flds,0,siz),((fl) | REG_STRUCT) #define BIT(nm) {"nm", 0xffffffff, 1} /* Single Bit definition */ #define BITNC {"", 0xffffffff, 1} /* Don't care Bit definition */ #define BITF(nm,sz) {"nm", 0xffffffff, sz} /* Bit Field definition */