summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-02-10 17:18:52 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2014-02-10 17:18:52 -0800
commitd8b4d8dfbb4abcf773a812d8daede4543d95f6b3 (patch)
treea883c8e3323d1be5f7d310e7b02428c1960bf6c5 /src
parent3e212582853b0abc567682c4c8b9e4ae9ab91de9 (diff)
downloadabc-d8b4d8dfbb4abcf773a812d8daede4543d95f6b3.tar.gz
abc-d8b4d8dfbb4abcf773a812d8daede4543d95f6b3.tar.bz2
abc-d8b4d8dfbb4abcf773a812d8daede4543d95f6b3.zip
Fix in represneting constants in a platform-independent way.
Diffstat (limited to 'src')
-rw-r--r--src/misc/util/utilTruth.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/misc/util/utilTruth.h b/src/misc/util/utilTruth.h
index 28646fc4..c6937b40 100644
--- a/src/misc/util/utilTruth.h
+++ b/src/misc/util/utilTruth.h
@@ -1261,24 +1261,24 @@ static inline int Abc_Tt6FirstBit( word t )
{
int n = 0;
if ( t == 0 ) return -1;
- if ( (t & 0x00000000FFFFFFFF) == 0 ) { n += 32; t >>= 32; }
- if ( (t & 0x000000000000FFFF) == 0 ) { n += 16; t >>= 16; }
- if ( (t & 0x00000000000000FF) == 0 ) { n += 8; t >>= 8; }
- if ( (t & 0x000000000000000F) == 0 ) { n += 4; t >>= 4; }
- if ( (t & 0x0000000000000003) == 0 ) { n += 2; t >>= 2; }
- if ( (t & 0x0000000000000001) == 0 ) { n++; }
+ if ( (t & ABC_CONST(0x00000000FFFFFFFF)) == 0 ) { n += 32; t >>= 32; }
+ if ( (t & ABC_CONST(0x000000000000FFFF)) == 0 ) { n += 16; t >>= 16; }
+ if ( (t & ABC_CONST(0x00000000000000FF)) == 0 ) { n += 8; t >>= 8; }
+ if ( (t & ABC_CONST(0x000000000000000F)) == 0 ) { n += 4; t >>= 4; }
+ if ( (t & ABC_CONST(0x0000000000000003)) == 0 ) { n += 2; t >>= 2; }
+ if ( (t & ABC_CONST(0x0000000000000001)) == 0 ) { n++; }
return n;
}
static inline int Abc_Tt6LastBit( word t )
{
int n = 0;
if ( t == 0 ) return -1;
- if ( (t & 0xFFFFFFFF00000000) == 0 ) { n += 32; t <<= 32; }
- if ( (t & 0xFFFF000000000000) == 0 ) { n += 16; t <<= 16; }
- if ( (t & 0xFF00000000000000) == 0 ) { n += 8; t <<= 8; }
- if ( (t & 0xF000000000000000) == 0 ) { n += 4; t <<= 4; }
- if ( (t & 0xC000000000000000) == 0 ) { n += 2; t <<= 2; }
- if ( (t & 0x8000000000000000) == 0 ) { n++; }
+ if ( (t & ABC_CONST(0xFFFFFFFF00000000)) == 0 ) { n += 32; t <<= 32; }
+ if ( (t & ABC_CONST(0xFFFF000000000000)) == 0 ) { n += 16; t <<= 16; }
+ if ( (t & ABC_CONST(0xFF00000000000000)) == 0 ) { n += 8; t <<= 8; }
+ if ( (t & ABC_CONST(0xF000000000000000)) == 0 ) { n += 4; t <<= 4; }
+ if ( (t & ABC_CONST(0xC000000000000000)) == 0 ) { n += 2; t <<= 2; }
+ if ( (t & ABC_CONST(0x8000000000000000)) == 0 ) { n++; }
return 63-n;
}
static inline int Abc_TtFindFirstBit( word * pIn, int nVars )