aboutsummaryrefslogtreecommitdiff
path: root/target-ppc/int_helper.c
diff options
context:
space:
mode:
authorNikunj A Dadhania <nikunj@linux.vnet.ibm.com>2016-07-26 17:28:33 +0530
committerDavid Gibson <david@gibson.dropbear.id.au>2016-09-07 09:52:14 +1000
commitb35344e4a0968fd1341ec1c1ed2e6b5c0d851542 (patch)
tree57a680bdf56b3a5145c9ad292cc5dea8446103e2 /target-ppc/int_helper.c
parente91d95b27703c6d67370cb3aa78ed5e4f8b03bbb (diff)
target-ppc: add cnttzw[.] instruction
Add ISA3.0: Count trailing zeros word instruction. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target-ppc/int_helper.c')
-rw-r--r--target-ppc/int_helper.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target-ppc/int_helper.c b/target-ppc/int_helper.c
index 93e8dfa1e7..02b6df3b66 100644
--- a/target-ppc/int_helper.c
+++ b/target-ppc/int_helper.c
@@ -145,6 +145,11 @@ target_ulong helper_cntlzw(target_ulong t)
return clz32(t);
}
+target_ulong helper_cnttzw(target_ulong t)
+{
+ return ctz32(t);
+}
+
#if defined(TARGET_PPC64)
target_ulong helper_cntlzd(target_ulong t)
{