aboutsummaryrefslogtreecommitdiff
path: root/tcg-runtime.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2016-11-21 11:13:39 +0100
committerRichard Henderson <rth@twiddle.net>2017-01-10 08:48:56 -0800
commita768e4e99247911f00c5c0267c12d4e207d5f6cc (patch)
tree050f67bd90c849c64c774361c76020896efaf433 /tcg-runtime.c
parent3946c6aa3d402614140f2c6a044abcdfb439217a (diff)
tcg: Add opcode for ctpop
The number of actual invocations of ctpop itself does not warrent an opcode, but it is very helpful for POWER7 to use in generating an expansion for ctz. 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 c8b98dfd51..4c60c96658 100644
--- a/tcg-runtime.c
+++ b/tcg-runtime.c
@@ -131,6 +131,16 @@ uint64_t HELPER(clrsb_i64)(uint64_t arg)
return clrsb64(arg);
}
+uint32_t HELPER(ctpop_i32)(uint32_t arg)
+{
+ return ctpop32(arg);
+}
+
+uint64_t HELPER(ctpop_i64)(uint64_t arg)
+{
+ return ctpop64(arg);
+}
+
void HELPER(exit_atomic)(CPUArchState *env)
{
cpu_loop_exit_atomic(ENV_GET_CPU(env), GETPC());