Skip to content

Commit c1fbcfa

Browse files
author
Casey Carter
authored
Update popcnt16-popcnt-popcnt64.md
* "16-, 32-, or 64-byte" is an obvious typo. * "The size of the value that the `popcnt` instruction returns is the same as the size of its argument." is a clear case of "parameter" vs. "argument" confusion. The size / type of the return value does not change to reflect the size/type of the expression passed to the function at a callsite - this sentence means "parameter." (Although honestly, this sentence adds little value - we should consider striking it.)
1 parent 1557d60 commit c1fbcfa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎docs/intrinsics/popcnt16-popcnt-popcnt64.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.assetid: e525b236-adc8-42df-9b9b-8b7d8c245d3b
99

1010
**Microsoft Specific**
1111

12-
Counts the number of one bits (population count) in a 16-, 32-, or 64-byte unsigned integer.
12+
Counts the number of one bits (population count) in a 16-, 32-, or 64-bit unsigned integer.
1313

1414
## Syntax
1515

@@ -46,7 +46,7 @@ The number of one bits in the `value` parameter.
4646

4747
## Remarks
4848

49-
Each of these intrinsics generates the `popcnt` instruction. The size of the value that the `popcnt` instruction returns is the same as the size of its argument. In 32-bit mode there are no 64-bit general-purpose registers, hence no 64-bit `popcnt`.
49+
Each of these intrinsics generates the `popcnt` instruction. The size of the value that the `popcnt` instruction returns is the same as the size of its parameter. In 32-bit mode there are no 64-bit general-purpose registers, hence no 64-bit `popcnt`.
5050

5151
To determine hardware support for the `popcnt` instruction, call the `__cpuid` intrinsic with `InfoType=0x00000001` and check bit 23 of `CPUInfo[2] (ECX)`. This bit is 1 if the instruction is supported, and 0 otherwise. If you run code that uses this intrinsic on hardware that does not support the `popcnt` instruction, the results are unpredictable.
5252

0 commit comments

Comments
 (0)