Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[spec] Add note to instruction index #1528

Merged
merged 2 commits into from
Aug 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.