summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/drcbec.cpp
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2021-06-21 13:53:49 -0700
committer Aaron Giles <aaron@aarongiles.com>2021-06-21 13:53:49 -0700
commit32dbba7d2d4513774b2d877b4c88f2d0760bcf54 (patch)
treef9e6426cf8dc28413c456bdbcd450c85cb302422 /src/devices/cpu/drcbec.cpp
parent5522729235b3ce81c839f3932c1aadc14de59e2b (diff)
parent2709c0143a8c7009715242c135b28403eeffce8b (diff)
Merge branch 'master' into deprecateddeprecated
Diffstat (limited to 'src/devices/cpu/drcbec.cpp')
-rw-r--r--src/devices/cpu/drcbec.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/devices/cpu/drcbec.cpp b/src/devices/cpu/drcbec.cpp
index d8b30535d6e..f54e6416696 100644
--- a/src/devices/cpu/drcbec.cpp
+++ b/src/devices/cpu/drcbec.cpp
@@ -1062,11 +1062,11 @@ int drcbe_c::execute(code_handle &entry)
break;
case MAKE_OPCODE_SHORT(OP_LZCNT, 4, 0): // LZCNT dst,src
- PARAM0 = count_leading_zeros(PARAM1);
+ PARAM0 = count_leading_zeros_32(PARAM1);
break;
case MAKE_OPCODE_SHORT(OP_LZCNT, 4, 1):
- temp32 = count_leading_zeros(PARAM1);
+ temp32 = count_leading_zeros_32(PARAM1);
flags = FLAGS32_NZ(temp32);
PARAM0 = temp32;
break;
@@ -1675,17 +1675,11 @@ int drcbe_c::execute(code_handle &entry)
break;
case MAKE_OPCODE_SHORT(OP_LZCNT, 8, 0): // DLZCNT dst,src
- if ((uint32_t)(DPARAM1 >> 32) != 0)
- DPARAM0 = count_leading_zeros(DPARAM1 >> 32);
- else
- DPARAM0 = 32 + count_leading_zeros(DPARAM1);
+ DPARAM0 = count_leading_zeros_64(DPARAM1);
break;
case MAKE_OPCODE_SHORT(OP_LZCNT, 8, 1):
- if ((uint32_t)(DPARAM1 >> 32) != 0)
- temp64 = count_leading_zeros(DPARAM1 >> 32);
- else
- temp64 = 32 + count_leading_zeros(DPARAM1);
+ temp64 = count_leading_zeros_64(DPARAM1);
flags = FLAGS64_NZ(temp64);
DPARAM0 = temp64;
break;