From e9f8bb47844cfae58b651d925f0c7317e118e59b Mon Sep 17 00:00:00 2001 From: rossberg-chromium Date: Sat, 5 Sep 2015 03:28:36 +0200 Subject: [PATCH] Consistent naming conventions for signedness, addendum This naming would fit nicely with the convention and is more informative. --- AstSemantics.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/AstSemantics.md b/AstSemantics.md index e0ff168e..77b9fc4f 100644 --- a/AstSemantics.md +++ b/AstSemantics.md @@ -382,8 +382,8 @@ results into the result type. * `int32.ior`: sign-agnostic inclusive or * `int32.xor`: sign-agnostic exclusive or * `int32.shl`: sign-agnostic shift left - * `int32.shr`: sign-agnostic logical shift right - * `int32.sar`: sign-agnostic arithmetic shift right + * `int32.shr_u`: zero-replicating (logical) shift right + * `int32.shr_s`: sign-replicating (arithmetic) shift right * `int32.eq`: sign-agnostic compare equal * `int32.ne`: sign-agnostic compare unequal * `int32.lt_s`: signed less than @@ -399,8 +399,8 @@ results into the result type. * `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 -`sar` produces `0` if the value being shifted is non-negative, and `-1` +count is at least the bitwidth of the shift, `shl` and `shr_u` produce `0`, and +`shr_s` produces `0` if the value being shifted is non-negative, and `-1` otherwise. All comparison operations yield 32-bit integer results with `1` representing