aboutsummaryrefslogtreecommitdiff
path: root/tcg-runtime.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2016-11-16 17:32:48 +0100
committerRichard Henderson <rth@twiddle.net>2017-01-10 08:47:48 -0800
commit086920c2c8008f125fd38781072fa25c3ad158ea (patch)
treee7b30c00856a3a1864667e3228e3910e66da8358 /tcg-runtime.c
parent4ac76910734209dab83ddd3795f08fc7889ef463 (diff)
tcg: Add helpers for clrsb
The number of actual invocations does not warrent an opcode, and the backends generating it. But at least we can eliminate redundant helpers. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'tcg-runtime.c')
-rw-r--r--tcg-runtime.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tcg-runtime.c b/tcg-runtime.c
index eb3bade7f6..c8b98dfd51 100644
--- a/tcg-runtime.c
+++ b/tcg-runtime.c
@@ -121,6 +121,16 @@ uint64_t HELPER(ctz_i64)(uint64_t arg, uint64_t zero_val)
return arg ? ctz64(arg) : zero_val;
}
+uint32_t HELPER(clrsb_i32)(uint32_t arg)
+{
+ return clrsb32(arg);
+}
+
+uint64_t HELPER(clrsb_i64)(uint64_t arg)
+{
+ return clrsb64(arg);
+}
+
void HELPER(exit_atomic)(CPUArchState *env)
{
cpu_loop_exit_atomic(ENV_GET_CPU(env), GETPC());