From e80c502023d332fb60866eb378e715ab3f158b72 Mon Sep 17 00:00:00 2001 From: Claudio Fontana Date: Tue, 17 Dec 2013 19:42:35 +0000 Subject: target-arm: A64: add support for 1-src CLS insn this patch adds support for the CLS instruction. Signed-off-by: Claudio Fontana Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target-arm/helper-a64.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'target-arm/helper-a64.c') diff --git a/target-arm/helper-a64.c b/target-arm/helper-a64.c index cccaac6230..d3f706754f 100644 --- a/target-arm/helper-a64.c +++ b/target-arm/helper-a64.c @@ -50,6 +50,16 @@ uint64_t HELPER(clz64)(uint64_t x) return clz64(x); } +uint64_t HELPER(cls64)(uint64_t x) +{ + return clrsb64(x); +} + +uint32_t HELPER(cls32)(uint32_t x) +{ + return clrsb32(x); +} + uint64_t HELPER(rbit64)(uint64_t x) { /* assign the correct byte position */ -- cgit v1.2.3