summaryrefslogtreecommitdiffstats
path: root/src/misc/util
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2020-03-28 18:45:48 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2020-03-28 18:45:48 -0700
commit8654192586079916c614dc3a4c62a1cdfd459fee (patch)
tree71dd8647cd6a762b515e8749dbb21f3acb3cca96 /src/misc/util
parenta277d450bf7c624392d41739788f115f1d655556 (diff)
downloadabc-8654192586079916c614dc3a4c62a1cdfd459fee.tar.gz
abc-8654192586079916c614dc3a4c62a1cdfd459fee.tar.bz2
abc-8654192586079916c614dc3a4c62a1cdfd459fee.zip
Various changes.
Diffstat (limited to 'src/misc/util')
-rw-r--r--src/misc/util/utilTruth.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/misc/util/utilTruth.h b/src/misc/util/utilTruth.h
index 18bae556..e0ee1720 100644
--- a/src/misc/util/utilTruth.h
+++ b/src/misc/util/utilTruth.h
@@ -326,6 +326,16 @@ static inline void Abc_TtXor( word * pOut, word * pIn1, word * pIn2, int nWords,
for ( w = 0; w < nWords; w++ )
pOut[w] = pIn1[w] ^ pIn2[w];
}
+static inline void Abc_TtXorMask( word * pOut, word * pIn1, word * pIn2, word * pMask, int nWords, int fCompl )
+{
+ int w;
+ if ( fCompl )
+ for ( w = 0; w < nWords; w++ )
+ pOut[w] = (pIn1[w] ^ pIn2[w]) & ~pMask[w];
+ else
+ for ( w = 0; w < nWords; w++ )
+ pOut[w] = (pIn1[w] ^ pIn2[w]) & pMask[w];
+}
static inline void Abc_TtMux( word * pOut, word * pCtrl, word * pIn1, word * pIn0, int nWords )
{
int w;