Skip to content

Wrong opcodes for vector instructions in Index of Instructions #1473

@ictrobot

Description

@ictrobot

On https://webassembly.github.io/spec/core/appendix/index-instructions.html the opcodes for vector instructions are all two bytes, from 0xFD 0x00 -> 0xFD 0xFF, for example f64x2.convert_low_i32x4_u is listed as 0xFD 0xFF:

:math:`\F64X2.\VCONVERT\K{\_low\_i32x4\_u}` :math:`\hex{FD}~~\hex{FF}` :math:`[\V128] \to [\V128]` :ref:`validation <valid-vcvtop>` :ref:`execution <exec-vcvtop>`, :ref:`operator <op-convert_u>`

On https://webassembly.github.io/spec/core/binary/instructions.html#vector-instructions it states

They all have a one byte prefix, whereas the actual opcode is encoded by a variable-length unsigned integer

and f64x2.convert_low_i32x4_u is listed as 0xFD 255:u32, which I believe is effectively 0xFD 0xFF 0x01.

\hex{FD}~~255{:}\Bu32 &\Rightarrow& \F64X2.\VCONVERT\K{\_low\_i32x4\_u}\\ &&|&

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions