From c0b82b9adf8eb54ba5c7513ad57146d0a1cc8054 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Sun, 8 Sep 2013 17:27:17 -0700 Subject: [PATCH] SCP: Add comments describing the various REG initialization macros. --- sim_defs.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sim_defs.h b/sim_defs.h index b2e25b81..c81f6bc0 100644 --- a/sim_defs.h +++ b/sim_defs.h @@ -635,14 +635,22 @@ struct sim_fileref { #define UDATA(act,fl,cap) NULL,act,NULL,NULL,NULL,0,0,(fl),0,(cap),0,NULL,0,0 #if defined (__STDC__) || defined (_WIN32) +/* Right Justified Octal Register Data */ #define ORDATA(nm,loc,wd) #nm, &(loc), 8, (wd), 0, 1, NULL, NULL +/* Right Justified Decimal Register Data */ #define DRDATA(nm,loc,wd) #nm, &(loc), 10, (wd), 0, 1, NULL, NULL +/* Right Justified Hexadecimal Register Data */ #define HRDATA(nm,loc,wd) #nm, &(loc), 16, (wd), 0, 1, NULL, NULL +/* One-bit binary flag at an arbitrary offset in a 32-bit word Register */ #define FLDATA(nm,loc,pos) #nm, &(loc), 2, 1, (pos), 1, NULL, NULL +/* Arbitrary location and Radix Register */ #define GRDATA(nm,loc,rdx,wd,pos) #nm, &(loc), (rdx), (wd), (pos), 1, NULL, NULL +/* Arrayed register whose data is kept in a standard C array Register */ #define BRDATA(nm,loc,rdx,wd,dep) #nm, (loc), (rdx), (wd), 0, (dep), NULL, NULL +/* Arrayed register whose data is part of the UNIT structure */ #define URDATA(nm,loc,rdx,wd,off,dep,fl) \ #nm, &(loc), (rdx), (wd), (off), (dep), NULL, NULL, ((fl) | REG_UNIT) +/* Same as above, but with additional description initializer */ #define ORDATAD(nm,loc,wd,desc) #nm, &(loc), 8, (wd), 0, 1, (desc), NULL #define DRDATAD(nm,loc,wd,desc) #nm, &(loc), 10, (wd), 0, 1, (desc), NULL #define HRDATAD(nm,loc,wd,desc) #nm, &(loc), 16, (wd), 0, 1, (desc), NULL @@ -651,6 +659,7 @@ struct sim_fileref { #define BRDATAD(nm,loc,rdx,wd,dep,desc) #nm, (loc), (rdx), (wd), 0, (dep), (desc), NULL #define URDATAD(nm,loc,rdx,wd,off,dep,fl,desc) \ #nm, &(loc), (rdx), (wd), (off), (dep), (desc), NULL, ((fl) | REG_UNIT) +/* Same as above, but with additional description initializer, and bitfields */ #define ORDATADF(nm,loc,wd,desc,flds) #nm, &(loc), 8, (wd), 0, 1, (desc), (flds) #define DRDATADF(nm,loc,wd,desc,flds) #nm, &(loc), 10, (wd), 0, 1, (desc), (flds) #define HRDATADF(nm,loc,wd,desc,flds) #nm, &(loc), 16, (wd), 0, 1, (desc), (flds)