Skip to content

Commit

Permalink
docs(yellowpaper): update cast instruction description with truncat…
Browse files Browse the repository at this point in the history
…ion operation (#3621)

Simple docs update
  • Loading branch information
dbanks12 authored Dec 7, 2023
1 parent cdd9259 commit 2cede41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion yellow-paper/docs/public-vm/gen/_InstructionSet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ Type cast
- **aOffset**: memory offset of word to cast
- **dstOffset**: memory offset specifying where to store operation's result
- **Expression**: `M[dstOffset] = cast<dst-tag>(M[aOffset])`
- **Details**: Cast a word in memory based on the `dst-tag` specified in the bytecode. Truncates when casting to a smaller type, left-zero-pads when casting to a larger type. See [here](./state-model#cast-and-tag-conversions) for more details.
- **Details**: Cast a word in memory based on the `dst-tag` specified in the bytecode. Truncates (`M[dstOffset] = M[aOffset] mod 2^dstsize`) when casting to a smaller type, left-zero-pads when casting to a larger type. See [here](./state-model#cast-and-tag-conversions) for more details.
- **Tag updates**: `T[dstOffset] = dst-tag`
- **Bit-size**: 96

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ const INSTRUCTION_SET_RAW = [
],
"Expression": "`M[dstOffset] = cast<dst-tag>(M[aOffset])`",
"Summary": "Type cast",
"Details": "Cast a word in memory based on the `dst-tag` specified in the bytecode. Truncates when casting to a smaller type, left-zero-pads when casting to a larger type. See [here](./state-model#cast-and-tag-conversions) for more details.",
"Details": "Cast a word in memory based on the `dst-tag` specified in the bytecode. Truncates (`M[dstOffset] = M[aOffset] mod 2^dstsize`) when casting to a smaller type, left-zero-pads when casting to a larger type. See [here](./state-model#cast-and-tag-conversions) for more details.",
"Tag checks": "",
"Tag updates": "`T[dstOffset] = dst-tag`",
},
Expand Down

0 comments on commit 2cede41

Please sign in to comment.