aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Wagner <mail@lukewagner.name>2015-09-11 14:14:47 -0500
committerLuke Wagner <mail@lukewagner.name>2015-09-14 13:33:59 -0500
commit0890341ab5e32a430e489ecc337a6feb549efca0 (patch)
tree77489b7ce70869ce2912d56f1a620b1fa922a83d
parent82be13a5a049bc1fb4fed8e74f7d6a362a132e85 (diff)
downloadnanowasm-design-0890341ab5e32a430e489ecc337a6feb549efca0.tar.gz
Mention opcode name syntax for alignment
-rw-r--r--AstSemantics.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/AstSemantics.md b/AstSemantics.md
index 03dbb48..6f09a2c 100644
--- a/AstSemantics.md
+++ b/AstSemantics.md
@@ -149,6 +149,12 @@ Each linear memory access operation also has an immediate positive integer power
of 2 alignment attribute. An alignment value which is the same as the memory
attribute size is considered to be a *natural* alignment.
+The linear memory operation names listed above specify natural alignment.
+To specify unnatural alignment, the opcode name can be suffixed with `/n` for
+`n` any integer power of 2. For example, `float64.load/2` specifies a `float32`
+load with 2-byte alignment; `int32.load16_s/1` specifies a signed 2-byte load
+that is unaligned (1-byte aligned).
+
The alignment applies to the effective address and not merely the address operand,
i.e. the immediate offset is taken into account when considering alignment.