Skip to content

Commit

Permalink
[spec] Add note to instruction index (#1528)
Browse files Browse the repository at this point in the history
  • Loading branch information
rossberg authored Aug 25, 2022
1 parent 429b2e3 commit 550e79d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions document/core/appendix/gen-index-instructions.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@
---------------------
"""

FOOTER = """\
.. note::
Multi-byte opcodes are given with the shortest possible encoding in the table.
However, what is following the first byte is actually a :ref:`u32 <binary-uint>` with variable-length encoding
and consequently has multiple possible representations.\
"""

COLUMNS = [
'Instruction',
'Binary Opcode',
Expand Down Expand Up @@ -591,3 +599,4 @@ def Row(columns):
print(Row(instr), file=f)

print(DIVIDER, file=f)
print(FOOTER, file=f)
5 changes: 5 additions & 0 deletions document/core/appendix/index-instructions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -516,3 +516,8 @@ Instruction Binary Opcode
:math:`\F64X2.\VCONVERT\K{\_low\_i32x4\_s}` :math:`\hex{FD}~~\hex{FE}~~\hex{01}` :math:`[\V128] \to [\V128]` :ref:`validation <valid-vcvtop>` :ref:`execution <exec-vcvtop>`, :ref:`operator <op-convert_s>`
:math:`\F64X2.\VCONVERT\K{\_low\_i32x4\_u}` :math:`\hex{FD}~~\hex{FF}~~\hex{01}` :math:`[\V128] \to [\V128]` :ref:`validation <valid-vcvtop>` :ref:`execution <exec-vcvtop>`, :ref:`operator <op-convert_u>`
================================================= ==================================== ============================================= ============================================= ==================================================================

.. note::
Multi-byte opcodes are given with the shortest possible encoding in the table.
However, what is following the first byte is actually a :ref:`u32 <binary-uint>` with variable-length encoding
and consequently has multiple possible representations.

0 comments on commit 550e79d

Please sign in to comment.