summaryrefslogtreecommitdiffstats
path: root/src/map/if
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-10-09 09:23:08 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2012-10-09 09:23:08 -0700
commit4ed89d00fed5a93a53bbd5ce168c7fd0b3295f54 (patch)
treee60a62749972a1b404e6e15bbfc4558c0cf6b23f /src/map/if
parent7b9f4a278df2d6bced4dd32d00f1b57f33117119 (diff)
downloadabc-4ed89d00fed5a93a53bbd5ce168c7fd0b3295f54.tar.gz
abc-4ed89d00fed5a93a53bbd5ce168c7fd0b3295f54.tar.bz2
abc-4ed89d00fed5a93a53bbd5ce168c7fd0b3295f54.zip
Making explicit cast to 64-bit unsigned in a few places.
Diffstat (limited to 'src/map/if')
-rw-r--r--src/map/if/ifDec07.c4
-rw-r--r--src/map/if/ifDec08.c8
-rw-r--r--src/map/if/ifDec10.c8
-rw-r--r--src/map/if/ifDec16.c8
4 files changed, 14 insertions, 14 deletions
diff --git a/src/map/if/ifDec07.c b/src/map/if/ifDec07.c
index f5a21884..8acd7402 100644
--- a/src/map/if/ifDec07.c
+++ b/src/map/if/ifDec07.c
@@ -108,7 +108,7 @@ static word If_Dec6ComposeLut4( int t, word f[4] )
{
if ( !((t >> m) & 1) )
continue;
- c = ~0;
+ c = ~(word)0;
for ( v = 0; v < 4; v++ )
c &= ((m >> v) & 1) ? f[v] : ~f[v];
r |= c;
@@ -152,7 +152,7 @@ static void If_Dec7ComposeLut4( int t, word f[4][2], word r[2] )
{
if ( !((t >> m) & 1) )
continue;
- c[0] = c[1] = ~0;
+ c[0] = c[1] = ~(word)0;
for ( v = 0; v < 4; v++ )
{
c[0] &= ((m >> v) & 1) ? f[v][0] : ~f[v][0];
diff --git a/src/map/if/ifDec08.c b/src/map/if/ifDec08.c
index 9731a825..80667690 100644
--- a/src/map/if/ifDec08.c
+++ b/src/map/if/ifDec08.c
@@ -113,7 +113,7 @@ static inline void If_Dec08ComposeLut4( int t, word ** pF, word * pR, int nVars
if ( !((t >> m) & 1) )
continue;
for ( w = 0; w < nWords; w++ )
- pC[w] = ~0;
+ pC[w] = ~(word)0;
for ( v = 0; v < 4; v++ )
for ( w = 0; w < nWords; w++ )
pC[w] &= ((m >> v) & 1) ? pF[v][w] : ~pF[v][w];
@@ -159,7 +159,7 @@ static inline int If_Dec08CofCount2( word * pF, int nVars )
int i;
assert( nVars >= 6 && nVars <= 8 );
// if ( nVars == 10 )
-// Mask = ~0;
+// Mask = ~(word)0;
for ( i = 1; i < 8; i++ )
{
iCof = (pF[(i * nShift) / 64] >> ((i * nShift) & 63)) & Mask;
@@ -179,7 +179,7 @@ static inline int If_Dec08CofCount( word * pF, int nVars )
word iCofs[16], iCof;
int i, c, nCofs = 1;
// if ( nVars == 10 )
-// Mask = ~0;
+// Mask = ~(word)0;
iCofs[0] = pF[0] & Mask;
for ( i = 1; i < 8; i++ )
{
@@ -270,7 +270,7 @@ static inline int If_Dec08DeriveCount2( word * pF, word * pRes, int nVars )
word iCof1 = pF[0] & Mask;
word iCof, * pCof0, * pCof1;
if ( nVars == 10 )
- Mask = ~0;
+ Mask = ~(word)0;
for ( i = 1; i < 16; i++ )
{
iCof = (pF[(i * nShift) / 64] >> ((i * nShift) & 63)) & Mask;
diff --git a/src/map/if/ifDec10.c b/src/map/if/ifDec10.c
index 29f926ad..570ee238 100644
--- a/src/map/if/ifDec10.c
+++ b/src/map/if/ifDec10.c
@@ -110,7 +110,7 @@ static inline void If_Dec10ComposeLut4( int t, word ** pF, word * pR, int nVars
if ( !((t >> m) & 1) )
continue;
for ( w = 0; w < nWords; w++ )
- pC[w] = ~0;
+ pC[w] = ~(word)0;
for ( v = 0; v < 4; v++ )
for ( w = 0; w < nWords; w++ )
pC[w] &= ((m >> v) & 1) ? pF[v][w] : ~pF[v][w];
@@ -156,7 +156,7 @@ static inline int If_Dec10CofCount2( word * pF, int nVars )
int i;
assert( nVars > 6 && nVars <= 10 );
if ( nVars == 10 )
- Mask = ~0;
+ Mask = ~(word)0;
for ( i = 1; i < 16; i++ )
{
iCof = (pF[(i * nShift) / 64] >> ((i * nShift) & 63)) & Mask;
@@ -176,7 +176,7 @@ static inline int If_Dec10CofCount( word * pF, int nVars )
word iCofs[16], iCof;
int i, c, nCofs = 1;
if ( nVars == 10 )
- Mask = ~0;
+ Mask = ~(word)0;
iCofs[0] = pF[0] & Mask;
for ( i = 1; i < 16; i++ )
{
@@ -267,7 +267,7 @@ static inline int If_Dec10DeriveCount2( word * pF, word * pRes, int nVars )
word iCof1 = pF[0] & Mask;
word iCof, * pCof0, * pCof1;
if ( nVars == 10 )
- Mask = ~0;
+ Mask = ~(word)0;
for ( i = 1; i < 16; i++ )
{
iCof = (pF[(i * nShift) / 64] >> ((i * nShift) & 63)) & Mask;
diff --git a/src/map/if/ifDec16.c b/src/map/if/ifDec16.c
index 1abf5fca..7c9a41f2 100644
--- a/src/map/if/ifDec16.c
+++ b/src/map/if/ifDec16.c
@@ -331,7 +331,7 @@ static inline void If_CluFill( word * pIn, int nVars )
{
int w, nWords = If_CluWordNum( nVars );
for ( w = 0; w < nWords; w++ )
- pIn[w] = ~0;
+ pIn[w] = ~(word)0;
}
static inline void If_CluCopy( word * pOut, word * pIn, int nVars )
{
@@ -610,7 +610,7 @@ void If_CluInitTruthTables()
TruthAll[i][k] = Truth6[i];
for ( i = 6; i < CLU_VAR_MAX; i++ )
for ( k = 0; k < CLU_WRD_MAX; k++ )
- TruthAll[i][k] = ((k >> (i-6)) & 1) ? ~0 : 0;
+ TruthAll[i][k] = ((k >> (i-6)) & 1) ? ~(word)0 : 0;
// Extra_PrintHex( stdout, TruthAll[6], 8 ); printf( "\n" );
// Extra_PrintHex( stdout, TruthAll[7], 8 ); printf( "\n" );
@@ -1081,11 +1081,11 @@ int If_CluDetectSpecialCaseCofs( word * pF, int nVars, int iVar )
if ( Cof0 == 0 )
State[0]++;
- else if ( Cof0 == ~0 )
+ else if ( Cof0 == ~(word)0 )
State[1]++;
else if ( Cof1 == 0 )
State[2]++;
- else if ( Cof1 == ~0 )
+ else if ( Cof1 == ~(word)0 )
State[3]++;
else if ( Cof0 == ~Cof1 )
State[4]++;