From 8fc02a3883ac7fa73b7fbb7115cb2820b45c994e Mon Sep 17 00:00:00 2001 From: George Kuan Date: Thu, 6 Aug 2015 10:19:34 -0700 Subject: Minor clarification of int bit operations Clarify zero/one bit semantics especially in the immediate vicinity of the mentions of int value 0. --- AstSemantics.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AstSemantics.md b/AstSemantics.md index f44a68b..2c55705 100644 --- a/AstSemantics.md +++ b/AstSemantics.md @@ -367,9 +367,9 @@ results into the result type. * `int32.sge`: signed greater than or equal * `int32.ugt`: unsigned greater than * `int32.uge`: unsigned greater than or equal - * `int32.clz`: sign-agnostic count leading zeroes (defined for all values, including zero) - * `int32.ctz`: sign-agnostic count trailing zeroes (defined for all values, including zero) - * `int32.popcnt`: sign-agnostic count number of ones + * `int32.clz`: sign-agnostic count leading zero bits (defined for all values, including zero) + * `int32.ctz`: sign-agnostic count trailing zero bits (defined for all values, including zero) + * `int32.popcnt`: sign-agnostic count number of one bits Shifts interpret their shift count operand as an unsigned value. When the shift count is at least the bitwidth of the shift, `shl` and `shr` produce `0`, and -- cgit v1.2.3