aboutsummaryrefslogtreecommitdiffstats
path: root/common/bits.h
diff options
context:
space:
mode:
authorDavid Corrigan <47994662+davidcorrigan714@users.noreply.github.com>2021-04-30 21:42:25 -0500
committerGitHub <noreply@github.com>2021-04-30 21:42:25 -0500
commitf5c2547952889bc9cbc64a058a2bb4354f6115a0 (patch)
treec7f587490e716a562279bb36724df412bd464a53 /common/bits.h
parent4bdf4582f0778d4a24fa188699c7e1696d0dee31 (diff)
downloadnextpnr-f5c2547952889bc9cbc64a058a2bb4354f6115a0.tar.gz
nextpnr-f5c2547952889bc9cbc64a058a2bb4354f6115a0.tar.bz2
nextpnr-f5c2547952889bc9cbc64a058a2bb4354f6115a0.zip
Update bits.h
Fixed the variable name for windows MSVC builds.
Diffstat (limited to 'common/bits.h')
-rw-r--r--common/bits.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/bits.h b/common/bits.h
index 1d6bb8be..04b25b74 100644
--- a/common/bits.h
+++ b/common/bits.h
@@ -51,7 +51,7 @@ struct Bits
#if defined(__GNUC__) || defined(__clang__)
return __builtin_popcount(x);
#elif defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86))
- return __popcnt(v);
+ return __popcnt(x);
#else
return generic_popcount(x);
#endif
@@ -63,7 +63,7 @@ struct Bits
return __builtin_ctz(x);
#elif defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86))
unsigned long result;
- _BitScanForward(&result, v);
+ _BitScanForward(&result, x);
return result;
#else
return generic_ctz(x);