[PATCH] tcg: Document ctpop opcodes

Richard Henderson posted 1 patch 2 years, 6 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20211110122015.189655-1-richard.henderson@linaro.org
Maintainers: Richard Henderson <richard.henderson@linaro.org>
tcg/README | 6 ++++++
1 file changed, 6 insertions(+)
[PATCH] tcg: Document ctpop opcodes
Posted by Richard Henderson 2 years, 6 months ago
Fixes: a768e4e99247
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/658
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 tcg/README | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tcg/README b/tcg/README
index c2e7762a37..391f4d1e80 100644
--- a/tcg/README
+++ b/tcg/README
@@ -254,6 +254,12 @@ t0 = t1 ? clz(t1) : t2
 
 t0 = t1 ? ctz(t1) : t2
 
+* ctpop_i32/i64 t0, t1
+
+t0 = number of bits set in t1
+With "ctpop" short for "count popultation", matching
+the function name used in include/qemu/host-utils.h.
+
 ********* Shifts/Rotates
 
 * shl_i32/i64 t0, t1, t2
-- 
2.25.1


Re: [PATCH] tcg: Document ctpop opcodes
Posted by Philippe Mathieu-Daudé 2 years, 6 months ago

On 11/10/21 13:20, Richard Henderson wrote:
> Fixes: a768e4e99247
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/658
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  tcg/README | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/tcg/README b/tcg/README
> index c2e7762a37..391f4d1e80 100644
> --- a/tcg/README
> +++ b/tcg/README
> @@ -254,6 +254,12 @@ t0 = t1 ? clz(t1) : t2
>  
>  t0 = t1 ? ctz(t1) : t2
>  
> +* ctpop_i32/i64 t0, t1
> +
> +t0 = number of bits set in t1
> +With "ctpop" short for "count popultation", matching

Typo "population".

> +the function name used in include/qemu/host-utils.h.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>