summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2017-10-24 09:43:07 -0400
committer AJR <ajrhacker@users.noreply.github.com>2017-10-24 09:43:07 -0400
commit0853bb469b58cb6553b4ea606832989559d76ffe (patch)
tree2a4a53fd19a60fe132844ab966fd2785a86b0dd3 /src/osd
parent2cbe3d3d4d4d7ffebe12bc8bddd06baa9e4ef4fd (diff)
Merge popcount implementation in emucore.h with the new eminline (nw)
Diffstat (limited to 'src/osd')
-rw-r--r--src/osd/eminline.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/osd/eminline.h b/src/osd/eminline.h
index 5a5000460f3..685df59abae 100644
--- a/src/osd/eminline.h
+++ b/src/osd/eminline.h
@@ -301,6 +301,9 @@ inline uint8_t count_leading_ones(uint32_t val)
-------------------------------------------------*/
#ifndef population_count_32
+#if defined(__NetBSD__)
+#define population_count_32 popcount32
+#else
inline unsigned population_count_32(uint32_t val)
{
#if defined(__GNUC__)
@@ -320,6 +323,7 @@ inline unsigned population_count_32(uint32_t val)
#endif
}
#endif
+#endif
/*-------------------------------------------------
@@ -328,6 +332,9 @@ inline unsigned population_count_32(uint32_t val)
-------------------------------------------------*/
#ifndef population_count_64
+#if defined(__NetBSD__)
+#define population_count_64 popcount64
+#else
inline unsigned population_count_64(uint64_t val)
{
#if defined(__GNUC__)
@@ -356,6 +363,7 @@ inline unsigned population_count_64(uint64_t val)
#endif
}
#endif
+#endif
/***************************************************************************