diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-01-30 16:15:53 +0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-01-30 16:15:53 +0700 |
commit | 7e598cd23144ea2997a272384fb5d1788bd4b0fd (patch) | |
tree | 624b748428bd929aac84c8780890a380883f1567 /src/map/if/ifDec07.c | |
parent | aaacf57304b74b37617fcd669f1c1314afebc913 (diff) | |
download | abc-7e598cd23144ea2997a272384fb5d1788bd4b0fd.tar.gz abc-7e598cd23144ea2997a272384fb5d1788bd4b0fd.tar.bz2 abc-7e598cd23144ea2997a272384fb5d1788bd4b0fd.zip |
Fixing compilation problems on Linux-32 related to constants of type unsigned long long.
Diffstat (limited to 'src/map/if/ifDec07.c')
-rw-r--r-- | src/map/if/ifDec07.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/map/if/ifDec07.c b/src/map/if/ifDec07.c index 8acd7402..6d454a96 100644 --- a/src/map/if/ifDec07.c +++ b/src/map/if/ifDec07.c @@ -42,29 +42,29 @@ static int BitCount8[256] = { }; // variable swapping code static word PMasks[5][3] = { - { 0x9999999999999999, 0x2222222222222222, 0x4444444444444444 }, - { 0xC3C3C3C3C3C3C3C3, 0x0C0C0C0C0C0C0C0C, 0x3030303030303030 }, - { 0xF00FF00FF00FF00F, 0x00F000F000F000F0, 0x0F000F000F000F00 }, - { 0xFF0000FFFF0000FF, 0x0000FF000000FF00, 0x00FF000000FF0000 }, - { 0xFFFF00000000FFFF, 0x00000000FFFF0000, 0x0000FFFF00000000 } + { ABC_CONST(0x9999999999999999), ABC_CONST(0x2222222222222222), ABC_CONST(0x4444444444444444) }, + { ABC_CONST(0xC3C3C3C3C3C3C3C3), ABC_CONST(0x0C0C0C0C0C0C0C0C), ABC_CONST(0x3030303030303030) }, + { ABC_CONST(0xF00FF00FF00FF00F), ABC_CONST(0x00F000F000F000F0), ABC_CONST(0x0F000F000F000F00) }, + { ABC_CONST(0xFF0000FFFF0000FF), ABC_CONST(0x0000FF000000FF00), ABC_CONST(0x00FF000000FF0000) }, + { ABC_CONST(0xFFFF00000000FFFF), ABC_CONST(0x00000000FFFF0000), ABC_CONST(0x0000FFFF00000000) } }; // elementary truth tables static word Truth6[6] = { - 0xAAAAAAAAAAAAAAAA, - 0xCCCCCCCCCCCCCCCC, - 0xF0F0F0F0F0F0F0F0, - 0xFF00FF00FF00FF00, - 0xFFFF0000FFFF0000, - 0xFFFFFFFF00000000 + ABC_CONST(0xAAAAAAAAAAAAAAAA), + ABC_CONST(0xCCCCCCCCCCCCCCCC), + ABC_CONST(0xF0F0F0F0F0F0F0F0), + ABC_CONST(0xFF00FF00FF00FF00), + ABC_CONST(0xFFFF0000FFFF0000), + ABC_CONST(0xFFFFFFFF00000000) }; static word Truth7[7][2] = { - {0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA}, - {0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC}, - {0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0}, - {0xFF00FF00FF00FF00,0xFF00FF00FF00FF00}, - {0xFFFF0000FFFF0000,0xFFFF0000FFFF0000}, - {0xFFFFFFFF00000000,0xFFFFFFFF00000000}, - {0x0000000000000000,0xFFFFFFFFFFFFFFFF} + {ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA)}, + {ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC)}, + {ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0)}, + {ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00)}, + {ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000)}, + {ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000)}, + {ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF)} }; extern void Kit_DsdPrintFromTruth( unsigned * pTruth, int nVars ); @@ -382,12 +382,12 @@ static word If_Dec7DeriveDisjoint( word t[2], int Pla2Var[7], int Var2Pla[7] ) static inline int If_Dec6CountOnes( word t ) { - t = (t & 0x5555555555555555) + ((t>> 1) & 0x5555555555555555); - t = (t & 0x3333333333333333) + ((t>> 2) & 0x3333333333333333); - t = (t & 0x0F0F0F0F0F0F0F0F) + ((t>> 4) & 0x0F0F0F0F0F0F0F0F); - t = (t & 0x00FF00FF00FF00FF) + ((t>> 8) & 0x00FF00FF00FF00FF); - t = (t & 0x0000FFFF0000FFFF) + ((t>>16) & 0x0000FFFF0000FFFF); - return (t & 0x00000000FFFFFFFF) + (t>>32); + t = (t & ABC_CONST(0x5555555555555555)) + ((t>> 1) & ABC_CONST(0x5555555555555555)); + t = (t & ABC_CONST(0x3333333333333333)) + ((t>> 2) & ABC_CONST(0x3333333333333333)); + t = (t & ABC_CONST(0x0F0F0F0F0F0F0F0F)) + ((t>> 4) & ABC_CONST(0x0F0F0F0F0F0F0F0F)); + t = (t & ABC_CONST(0x00FF00FF00FF00FF)) + ((t>> 8) & ABC_CONST(0x00FF00FF00FF00FF)); + t = (t & ABC_CONST(0x0000FFFF0000FFFF)) + ((t>>16) & ABC_CONST(0x0000FFFF0000FFFF)); + return (t & ABC_CONST(0x00000000FFFFFFFF)) + (t>>32); } static inline int If_Dec6HasVar( word t, int v ) { |