From 9c45fb4b0933970912966786a036cbf787e69ae6 Mon Sep 17 00:00:00 2001 From: rpkak Date: Sun, 28 Jul 2024 13:00:20 +0200 Subject: [PATCH] langref: correct return type of comptime known bitcount ops --- doc/langref.html.in | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/doc/langref.html.in b/doc/langref.html.in index f6f47d1225..b6e5b9435c 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -4522,9 +4522,7 @@ comptime { Counts the number of most-significant (leading in a big-endian sense) zeroes in an integer - "count leading zeroes".

- If {#syntax#}operand{#endsyntax#} is a {#link|comptime#}-known integer, - the return type is {#syntax#}comptime_int{#endsyntax#}. - Otherwise, the return type is an unsigned integer or vector of unsigned integers with the minimum number + The return type is an unsigned integer or vector of unsigned integers with the minimum number of bits that can represent the bit count of the integer type.

@@ -4635,9 +4633,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val Counts the number of least-significant (trailing in a big-endian sense) zeroes in an integer - "count trailing zeroes".

- If {#syntax#}operand{#endsyntax#} is a {#link|comptime#}-known integer, - the return type is {#syntax#}comptime_int{#endsyntax#}. - Otherwise, the return type is an unsigned integer or vector of unsigned integers with the minimum number + The return type is an unsigned integer or vector of unsigned integers with the minimum number of bits that can represent the bit count of the integer type.

@@ -5176,9 +5172,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val Counts the number of bits set in an integer - "population count".

- If {#syntax#}operand{#endsyntax#} is a {#link|comptime#}-known integer, - the return type is {#syntax#}comptime_int{#endsyntax#}. - Otherwise, the return type is an unsigned integer or vector of unsigned integers with the minimum number + The return type is an unsigned integer or vector of unsigned integers with the minimum number of bits that can represent the bit count of the integer type.

{#see_also|@ctz|@clz#}