Skip to content

Commit

Permalink
chore: add __builtin_popcount for MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
coastalwhite committed Jul 26, 2024
1 parent fe3b5bf commit 849adb2
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/aig/gia/giaNf.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
#include "map/scl/sclCon.h"
#include "misc/tim/tim.h"

#ifdef _MSC_VER
# include <intrin.h>
# define __builtin_popcount __popcnt
#endif

ABC_NAMESPACE_IMPL_START

////////////////////////////////////////////////////////////////////////
Expand Down
5 changes: 5 additions & 0 deletions src/base/exor/exorBits.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@

#include "exor.h"

#ifdef _MSC_VER
# include <intrin.h>
# define __builtin_popcount __popcnt
#endif

ABC_NAMESPACE_IMPL_START

////////////////////////////////////////////////////////////////////////
Expand Down
5 changes: 5 additions & 0 deletions src/map/if/acd/ac_decomposition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
#include "kitty_operators.hpp"
#include "kitty_static_tt.hpp"

#ifdef _MSC_VER
# include <intrin.h>
# define __builtin_popcount __popcnt
#endif

ABC_NAMESPACE_CXX_HEADER_START

namespace acd
Expand Down
5 changes: 5 additions & 0 deletions src/map/if/acd/acd66.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
#include "kitty_operators.hpp"
#include "kitty_static_tt.hpp"

#ifdef _MSC_VER
# include <intrin.h>
# define __builtin_popcount __popcnt
#endif

ABC_NAMESPACE_CXX_HEADER_START

namespace acd
Expand Down
5 changes: 5 additions & 0 deletions src/map/if/acd/acdXX.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
#include "kitty_operators.hpp"
#include "kitty_static_tt.hpp"

#ifdef _MSC_VER
# include <intrin.h>
# define __builtin_popcount __popcnt
#endif

ABC_NAMESPACE_CXX_HEADER_START

namespace acd
Expand Down
5 changes: 5 additions & 0 deletions src/map/if/ifDec08.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
#include "misc/extra/extra.h"
#include "bool/kit/kit.h"

#ifdef _MSC_VER
# include <intrin.h>
# define __builtin_popcount __popcnt
#endif

ABC_NAMESPACE_IMPL_START


Expand Down
5 changes: 5 additions & 0 deletions src/map/if/ifDec10.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
#include "misc/extra/extra.h"
#include "bool/kit/kit.h"

#ifdef _MSC_VER
# include <intrin.h>
# define __builtin_popcount __popcnt
#endif

ABC_NAMESPACE_IMPL_START


Expand Down
5 changes: 5 additions & 0 deletions src/misc/util/utilTruth.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
/// INCLUDES ///
////////////////////////////////////////////////////////////////////////

#ifdef _MSC_VER
# include <intrin.h>
# define __builtin_popcount __popcnt
#endif

////////////////////////////////////////////////////////////////////////
/// PARAMETERS ///
////////////////////////////////////////////////////////////////////////
Expand Down
5 changes: 5 additions & 0 deletions src/opt/dau/dauCanon.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
#include "bool/lucky/lucky.h"
#include <math.h>

#ifdef _MSC_VER
# include <intrin.h>
# define __builtin_popcount __popcnt
#endif

ABC_NAMESPACE_IMPL_START

////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 849adb2

Please sign in to comment.