summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/eivc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/eivc.h')
-rw-r--r--src/osd/eivc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/osd/eivc.h b/src/osd/eivc.h
index 3fa34f51b3c..de4ea809a28 100644
--- a/src/osd/eivc.h
+++ b/src/osd/eivc.h
@@ -31,7 +31,7 @@
inline uint8_t _count_leading_zeros(uint32_t value)
{
unsigned long index;
- return _BitScanReverse(&index, value) ? (31U - index) : 32U;
+ return _BitScanReverse(&index, value) ? (index ^ 31) : 32;
}
#endif
@@ -46,7 +46,7 @@ inline uint8_t _count_leading_zeros(uint32_t value)
inline uint8_t _count_leading_ones(uint32_t value)
{
unsigned long index;
- return _BitScanReverse(&index, ~value) ? (31U - index) : 32U;
+ return _BitScanReverse(&index, ~value) ? (index ^ 31) : 32;
}
#endif
=retro' /> Fabio Priuli2009-12-111-0/+2 * Added save states and driver data struct to the following drivers: fromance.c... Fabio Priuli2009-12-091-38/+40 * Introduced a generic_pointers structure within machine that is Aaron Giles2009-11-261-1/+1 * Enforce a minimum tag length of 3 characters. This will enable Aaron Giles2009-11-151-7/+7 * Converted 6532riot to devcb interfaces Couriersud2009-09-221-8/+8 * Removed the MDRV_<devtype>_REMOVE macros. A simple DEVICE_REMOVE Aaron Giles2009-06-081-1/+1 * Removed second parameter from MDRV_CPU_PROGRAM_MAP, MDRV_CPU_DATA_MAP, Aaron Giles2009-05-091-3/+3 * number-to-tag conversions in CPU calls for most of drivers starting with 'G' Fabio Priuli2009-05-021-3/+3 * Added missing casts and made other tweaks. The entire project Aaron Giles2009-04-271-6/+6 * - I attempted to verify and simpliy the DIPs in an effort to add LOCATIONS Aaron Giles2009-03-271-355/+199 * Removed device types from device queries that use tags, under the Aaron Giles2009-03-021-12/+12 * Device tag renaming. Moving away from generic names like "main" Aaron Giles2009-02-251-20/+20 * Ok, this is The Big One. Aaron Giles2009-02-111-8/+8 * Made the 6522 VIA implementation use devcb