aboutsummaryrefslogtreecommitdiff
path: root/AstSemantics.md
diff options
context:
space:
mode:
authormbodart <mitch.l.bodart@intel.com>2015-11-12 13:13:57 -0800
committermbodart <mitch.l.bodart@intel.com>2015-11-12 13:13:57 -0800
commit18da0d7f629be0d95e0cb7d1053fcf1fda2dd943 (patch)
treef9910628e1b56a9e97c50848242691ec39e00a47 /AstSemantics.md
parentce4dd7ea362e570ae07597f000fca9ea760233a0 (diff)
downloadnanowasm-design-18da0d7f629be0d95e0cb7d1053fcf1fda2dd943.tar.gz
Move rotate instructions from FutureFeatures to AstSemantics.
Diffstat (limited to 'AstSemantics.md')
-rw-r--r--AstSemantics.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/AstSemantics.md b/AstSemantics.md
index 4c02d9c..c55ed48 100644
--- a/AstSemantics.md
+++ b/AstSemantics.md
@@ -369,6 +369,8 @@ results into the result type.
* `i32.shl`: sign-agnostic shift left
* `i32.shr_u`: zero-replicating (logical) shift right
* `i32.shr_s`: sign-replicating (arithmetic) shift right
+ * `i32.rotl`: sign-agnostic rotate left
+ * `i32.rotr`: sign-agnostic rotate right
* `i32.eq`: sign-agnostic compare equal
* `i32.ne`: sign-agnostic compare unequal
* `i32.lt_s`: signed less than
@@ -388,6 +390,11 @@ in the value to be shifted, as an unsigned quantity. For example, in a 32-bit
shift, only the least 5 significant bits of the count affect the result. In a
64-bit shift, only the least 6 significant bits of the count affect the result.
+Rotate counts are treated as unsigned. A count value greater than or equal
+to the number of bits in the value to be rotated yields the same result as
+if the count was wrapped to its least significant N bits, where N is 5 for
+an i32 value or 6 for an i64 value.
+
All comparison operators yield 32-bit integer results with `1` representing
`true` and `0` representing `false`.