Skip to content

Commit

Permalink
Merge pull request #354 from WebAssembly/jfbastien-patch-3
Browse files Browse the repository at this point in the history
Limit immediate address and alignment
  • Loading branch information
jfbastien committed Sep 15, 2015
2 parents 1f05c4c + 73ef22f commit 51cdb75
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions AstSemantics.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,10 @@ reproduce their value operand, with no conversion applied.
### Addressing

Each linear memory access operation also has an address operand and an immediate
integer byte offset attribute. The infinite-precision sum of the address
operand's value with the byte offset attribute's value is called the
*effective address*, which is interpreted as an unsigned byte index.
integer byte offset attribute. The immediate is the same type as the address'
index. The infinite-precision sum of the address operand's value with the byte
offset attribute's value is called the *effective address*, which is interpreted
as an unsigned byte index.

Linear memory accesses access the bytes starting at the location in the linear
memory storage indexed by the effective address, and extending for the number
Expand Down Expand Up @@ -150,8 +151,9 @@ will add support for wasm64 and thus
### Alignment

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.
of 2 alignment attribute, which is the same type as the address' index. 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
Expand Down

0 comments on commit 51cdb75

Please sign in to comment.