Commit 927b60b7 by Scott Alfter

fix errors when compiling within Yosys: "ISO C++17 does not allow 'register'…

fix errors when compiling within Yosys: "ISO C++17 does not allow 'register' storage class specifier"
parent 9c2cac9e
...@@ -1203,8 +1203,8 @@ bddVarToCanonical( ...@@ -1203,8 +1203,8 @@ bddVarToCanonical(
unsigned int * topgp, unsigned int * topgp,
unsigned int * tophp) unsigned int * tophp)
{ {
register DdNode *F, *G, *H, *r, *f, *g, *h; DdNode *F, *G, *H, *r, *f, *g, *h;
register unsigned int topf, topg, toph; unsigned int topf, topg, toph;
DdNode *one = dd->one; DdNode *one = dd->one;
int comple, change; int comple, change;
...@@ -1305,7 +1305,7 @@ bddVarToCanonicalSimple( ...@@ -1305,7 +1305,7 @@ bddVarToCanonicalSimple(
unsigned int * topgp, unsigned int * topgp,
unsigned int * tophp) unsigned int * tophp)
{ {
register DdNode *r, *f, *g, *h; DdNode *r, *f, *g, *h;
int comple, change; int comple, change;
f = *fp; f = *fp;
......
...@@ -229,7 +229,7 @@ cuddCacheInsert( ...@@ -229,7 +229,7 @@ cuddCacheInsert(
{ {
int posn; int posn;
unsigned hash; unsigned hash;
register DdCache *entry; DdCache *entry;
ptruint uf, ug, uh; ptruint uf, ug, uh;
ptruint ufc, ugc, uhc; ptruint ufc, ugc, uhc;
...@@ -283,7 +283,7 @@ cuddCacheInsert2( ...@@ -283,7 +283,7 @@ cuddCacheInsert2(
{ {
int posn; int posn;
unsigned hash; unsigned hash;
register DdCache *entry; DdCache *entry;
hash = ddCHash2_(op,cuddF2L(f),cuddF2L(g)); hash = ddCHash2_(op,cuddF2L(f),cuddF2L(g));
// posn = ddCHash2(op,cuddF2L(f),cuddF2L(g),table->cacheShift); // posn = ddCHash2(op,cuddF2L(f),cuddF2L(g),table->cacheShift);
...@@ -328,7 +328,7 @@ cuddCacheInsert1( ...@@ -328,7 +328,7 @@ cuddCacheInsert1(
{ {
int posn; int posn;
unsigned hash; unsigned hash;
register DdCache *entry; DdCache *entry;
hash = ddCHash2_(op,cuddF2L(f),cuddF2L(f)); hash = ddCHash2_(op,cuddF2L(f),cuddF2L(f));
// posn = ddCHash2(op,cuddF2L(f),cuddF2L(f),table->cacheShift); // posn = ddCHash2(op,cuddF2L(f),cuddF2L(f),table->cacheShift);
......
...@@ -279,7 +279,7 @@ Cudd_LargestCube( ...@@ -279,7 +279,7 @@ Cudd_LargestCube(
DdNode * f, DdNode * f,
int * length) int * length)
{ {
register DdNode *F; DdNode *F;
st__table *visited; st__table *visited;
DdNode *sol; DdNode *sol;
cuddPathPair *rootPair; cuddPathPair *rootPair;
...@@ -351,7 +351,7 @@ Cudd_ShortestLength( ...@@ -351,7 +351,7 @@ Cudd_ShortestLength(
DdNode * f, DdNode * f,
int * weight) int * weight)
{ {
register DdNode *F; DdNode *F;
st__table *visited; st__table *visited;
cuddPathPair *my_pair; cuddPathPair *my_pair;
int complement, cost; int complement, cost;
......
...@@ -638,8 +638,8 @@ bddAnnotateMintermCount( ...@@ -638,8 +638,8 @@ bddAnnotateMintermCount(
{ {
DdNode *N,*Nv,*Nnv; DdNode *N,*Nv,*Nnv;
register double min_v,min_nv; double min_v,min_nv;
register double min_N; double min_N;
double *pmin; double *pmin;
double *dummy; double *dummy;
......
...@@ -190,15 +190,15 @@ void generateMTFValues ( EState* s ) ...@@ -190,15 +190,15 @@ void generateMTFValues ( EState* s )
zPend = 0; zPend = 0;
} }
{ {
register UChar rtmp; UChar rtmp;
register UChar* ryy_j; UChar* ryy_j;
register UChar rll_i; UChar rll_i;
rtmp = yy[1]; rtmp = yy[1];
yy[1] = yy[0]; yy[1] = yy[0];
ryy_j = &(yy[1]); ryy_j = &(yy[1]);
rll_i = ll_i; rll_i = ll_i;
while ( rll_i != rtmp ) { while ( rll_i != rtmp ) {
register UChar rtmp2; UChar rtmp2;
ryy_j++; ryy_j++;
rtmp2 = rtmp; rtmp2 = rtmp;
rtmp = *ryy_j; rtmp = *ryy_j;
...@@ -360,8 +360,8 @@ void sendMTFValues ( EState* s ) ...@@ -360,8 +360,8 @@ void sendMTFValues ( EState* s )
if (nGroups == 6 && 50 == ge-gs+1) { if (nGroups == 6 && 50 == ge-gs+1) {
/*--- fast track the common case ---*/ /*--- fast track the common case ---*/
register UInt32 cost01, cost23, cost45; UInt32 cost01, cost23, cost45;
register UInt16 icv; UInt16 icv;
cost01 = cost23 = cost45 = 0; cost01 = cost23 = cost45 = 0;
# define BZ_ITER(nn) \ # define BZ_ITER(nn) \
......
...@@ -97,8 +97,8 @@ void Extra_UtilGetoptReset() ...@@ -97,8 +97,8 @@ void Extra_UtilGetoptReset()
***********************************************************************/ ***********************************************************************/
int Extra_UtilGetopt( int argc, char *argv[], const char *optstring ) int Extra_UtilGetopt( int argc, char *argv[], const char *optstring )
{ {
register int c; int c;
register const char *place; const char *place;
globalUtilOptarg = NULL; globalUtilOptarg = NULL;
......
...@@ -269,8 +269,8 @@ unsigned long ZEXPORT crc32(unsigned long crc, const unsigned char FAR *buf, uIn ...@@ -269,8 +269,8 @@ unsigned long ZEXPORT crc32(unsigned long crc, const unsigned char FAR *buf, uIn
/* ========================================================================= */ /* ========================================================================= */
local unsigned long crc32_little(unsigned long crc, const unsigned char FAR *buf, unsigned len) local unsigned long crc32_little(unsigned long crc, const unsigned char FAR *buf, unsigned len)
{ {
register u4 c; u4 c;
register const u4 FAR *buf4; const u4 FAR *buf4;
c = (u4)crc; c = (u4)crc;
c = ~c; c = ~c;
...@@ -306,8 +306,8 @@ local unsigned long crc32_little(unsigned long crc, const unsigned char FAR *buf ...@@ -306,8 +306,8 @@ local unsigned long crc32_little(unsigned long crc, const unsigned char FAR *buf
/* ========================================================================= */ /* ========================================================================= */
local unsigned long crc32_big(unsigned long crc, const unsigned char FAR *buf, unsigned len) local unsigned long crc32_big(unsigned long crc, const unsigned char FAR *buf, unsigned len)
{ {
register u4 c; u4 c;
register const u4 FAR *buf4; const u4 FAR *buf4;
c = REV((u4)crc); c = REV((u4)crc);
c = ~c; c = ~c;
......
...@@ -1027,9 +1027,9 @@ local void lm_init (deflate_state *s) ...@@ -1027,9 +1027,9 @@ local void lm_init (deflate_state *s)
local uInt longest_match(deflate_state *s, IPos cur_match) local uInt longest_match(deflate_state *s, IPos cur_match)
{ {
unsigned chain_length = s->max_chain_length;/* max hash chain length */ unsigned chain_length = s->max_chain_length;/* max hash chain length */
register Bytef *scan = s->window + s->strstart; /* current string */ Bytef *scan = s->window + s->strstart; /* current string */
register Bytef *match; /* matched string */ Bytef *match; /* matched string */
register int len; /* length of current match */ int len; /* length of current match */
int best_len = s->prev_length; /* best match length so far */ int best_len = s->prev_length; /* best match length so far */
int nice_match = s->nice_match; /* stop if match long enough */ int nice_match = s->nice_match; /* stop if match long enough */
IPos limit = s->strstart > (IPos)MAX_DIST(s) ? IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
...@@ -1044,13 +1044,13 @@ local uInt longest_match(deflate_state *s, IPos cur_match) ...@@ -1044,13 +1044,13 @@ local uInt longest_match(deflate_state *s, IPos cur_match)
/* Compare two bytes at a time. Note: this is not always beneficial. /* Compare two bytes at a time. Note: this is not always beneficial.
* Try with and without -DUNALIGNED_OK to check. * Try with and without -DUNALIGNED_OK to check.
*/ */
register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
register ush scan_start = *(ushf*)scan; ush scan_start = *(ushf*)scan;
register ush scan_end = *(ushf*)(scan+best_len-1); ush scan_end = *(ushf*)(scan+best_len-1);
#else #else
register Bytef *strend = s->window + s->strstart + MAX_MATCH; Bytef *strend = s->window + s->strstart + MAX_MATCH;
register Byte scan_end1 = scan[best_len-1]; Byte scan_end1 = scan[best_len-1];
register Byte scan_end = scan[best_len]; Byte scan_end = scan[best_len];
#endif #endif
/* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
...@@ -1173,10 +1173,10 @@ local uInt longest_match(deflate_state *s, IPos cur_match) ...@@ -1173,10 +1173,10 @@ local uInt longest_match(deflate_state *s, IPos cur_match)
*/ */
local uInt longest_match(deflate_state *s, IPos cur_match) local uInt longest_match(deflate_state *s, IPos cur_match)
{ {
register Bytef *scan = s->window + s->strstart; /* current string */ Bytef *scan = s->window + s->strstart; /* current string */
register Bytef *match; /* matched string */ Bytef *match; /* matched string */
register int len; /* length of current match */ int len; /* length of current match */
register Bytef *strend = s->window + s->strstart + MAX_MATCH; Bytef *strend = s->window + s->strstart + MAX_MATCH;
/* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
* It is easy to get rid of this optimization if necessary. * It is easy to get rid of this optimization if necessary.
...@@ -1261,8 +1261,8 @@ local void check_match(deflate_state *s, IPos start, IPos match, int length) ...@@ -1261,8 +1261,8 @@ local void check_match(deflate_state *s, IPos start, IPos match, int length)
*/ */
local void fill_window(deflate_state *s) local void fill_window(deflate_state *s)
{ {
register unsigned n, m; unsigned n, m;
register Posf *p; Posf *p;
unsigned more; /* Amount of free space at the end of the window. */ unsigned more; /* Amount of free space at the end of the window. */
uInt wsize = s->w_size; uInt wsize = s->w_size;
......
...@@ -1144,7 +1144,7 @@ local int detect_data_type(deflate_state *s) ...@@ -1144,7 +1144,7 @@ local int detect_data_type(deflate_state *s)
*/ */
local unsigned bi_reverse(unsigned code, int len) local unsigned bi_reverse(unsigned code, int len)
{ {
register unsigned res = 0; unsigned res = 0;
do { do {
res |= code & 1; res |= code & 1;
code >>= 1, res <<= 1; code >>= 1, res <<= 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment