summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2021-06-12 03:00:21 +1000
committer Vas Crabb <cuavas@users.noreply.github.com>2021-06-13 09:38:01 +1000
commit73d97b7dc492871d3dcf4ee919fc443dd2308dec (patch)
treec394cccb9d6514a5b8e69f054d5d27ecc50a5d58 /src/emu
parent27b93b23486533747d9ba185ff54da860223a463 (diff)
Added helpers for 64-bit count leading zeroes/ones.
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/emumem_mview.cpp2
-rw-r--r--src/emu/validity.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/emu/emumem_mview.cpp b/src/emu/emumem_mview.cpp
index d6750ad2e23..f132809615a 100644
--- a/src/emu/emumem_mview.cpp
+++ b/src/emu/emumem_mview.cpp
@@ -788,7 +788,7 @@ std::pair<handler_entry *, handler_entry *> memory_view::make_handlers(address_s
m_space = &space;
offs_t span = addrstart ^ addrend;
- u32 awidth = 32 - count_leading_zeros(span);
+ u32 awidth = 32 - count_leading_zeros_32(span);
h_make(awidth, m_config->data_width(), m_config->addr_shift(), m_config->endianness(), space, *this, m_handler_read, m_handler_write);
m_handler_read->ref();
diff --git a/src/emu/validity.cpp b/src/emu/validity.cpp
index ba928a5acfa..de5321f5347 100644
--- a/src/emu/validity.cpp
+++ b/src/emu/validity.cpp
@@ -519,14 +519,14 @@ void validity_checker::validate_inlines()
for (int i = 0; i <= 32; i++)
{
u32 t = i < 32 ? (1 << (31 - i) | testu32a >> i) : 0;
- u8 resultu8 = count_leading_zeros(t);
+ u8 resultu8 = count_leading_zeros_32(t);
if (resultu8 != i)
- osd_printf_error("Error testing count_leading_zeros %08x=%02x (expected %02x)\n", t, resultu8, i);
+ osd_printf_error("Error testing count_leading_zeros_32 %08x=%02x (expected %02x)\n", t, resultu8, i);
t ^= 0xffffffff;
- resultu8 = count_leading_ones(t);
+ resultu8 = count_leading_ones_32(t);
if (resultu8 != i)
- osd_printf_error("Error testing count_leading_ones %08x=%02x (expected %02x)\n", t, resultu8, i);
+ osd_printf_error("Error testing count_leading_ones_32 %08x=%02x (expected %02x)\n", t, resultu8, i);
}
}