@@ -411,7 +411,7 @@ SIMD Instructions
411411~~~~~~~~~~~~~~~~~~~~
412412
413413All variants of :ref: `SIMD instructions <syntax-instr-simd >` are represented by separate byte codes.
414- The all have a one byte prefix, whereas the actual opcode is encoded by a variable-length :ref: `unsigned integer <binary-uint >`.
414+ They all have a one byte prefix, whereas the actual opcode is encoded by a variable-length :ref: `unsigned integer <binary-uint >`.
415415
416416SIMD loads and stores are followed by the encoding of their |memarg | immediate.
417417
@@ -442,34 +442,37 @@ The |VCONST| instruction is followed by 16 immediate bytes, which are converted
442442 \end {array}
443443
444444 .. _binary-vternop :
445+ .. _binary-laneidx :
445446
446- The |SHUFFLE | instruction is also followed by 16 immediate bytes:
447+ The |SHUFFLE | instruction is also followed by the encoding of 16 | laneidx | immediates.
447448
448449.. math ::
449450 \begin {array}{llclll}
451+ \production {lane index} & \Blaneidx &::=&
452+ l{:}\Bu8 &\Rightarrow & l \\
450453 \production {instruction} & \Binstr &::=& \dots \\&&|&
451- \hex {FD}~~13 {:}\Bu32 ~~(b {:}\Bbyte )^{16 } &\Rightarrow & \I8 X16 .\SHUFFLE ~b ^{16 } \\
454+ \hex {FD}~~13 {:}\Bu32 ~~(l {:}\Blaneidx )^{16 } &\Rightarrow & \I8 X16 .\SHUFFLE ~l ^{16 } \\
452455 \end {array}
453456
454- |EXTRACTLANE | and |REPLACELANE | instructions are followed by 1 immediate byte .
457+ |EXTRACTLANE | and |REPLACELANE | instructions are followed by the encoding of a | laneidx | immediate .
455458
456459.. math ::
457460 \begin {array}{llclll}
458461 \production {instruction} & \Binstr &::=& \dots \\&&|&
459- \hex {FD}~~21 {:}\Bu32 ~~b {:}\Bbyte &\Rightarrow & \I8 X16 .\EXTRACTLANE\K {\_s}~b \\ &&|&
460- \hex {FD}~~22 {:}\Bu32 ~~b {:}\Bbyte &\Rightarrow & \I8 X16 .\EXTRACTLANE\K {\_u}~b \\ &&|&
461- \hex {FD}~~23 {:}\Bu32 ~~b {:}\Bbyte &\Rightarrow & \I8 X16 .\REPLACELANE ~b \\ &&|&
462- \hex {FD}~~24 {:}\Bu32 ~~b {:}\Bbyte &\Rightarrow & \I16 X8 .\EXTRACTLANE\K {\_s}~b \\ &&|&
463- \hex {FD}~~25 {:}\Bu32 ~~b {:}\Bbyte &\Rightarrow & \I16 X8 .\EXTRACTLANE\K {\_u}~b \\ &&|&
464- \hex {FD}~~26 {:}\Bu32 ~~b {:}\Bbyte &\Rightarrow & \I16 X8 .\REPLACELANE ~b \\ &&|&
465- \hex {FD}~~27 {:}\Bu32 ~~b {:}\Bbyte &\Rightarrow & \I32 X4 .\EXTRACTLANE ~b \\ &&|&
466- \hex {FD}~~28 {:}\Bu32 ~~b {:}\Bbyte &\Rightarrow & \I32 X4 .\REPLACELANE ~b \\ &&|&
467- \hex {FD}~~29 {:}\Bu32 ~~b {:}\Bbyte &\Rightarrow & \I64 X2 .\EXTRACTLANE ~b \\ &&|&
468- \hex {FD}~~30 {:}\Bu32 ~~b {:}\Bbyte &\Rightarrow & \I64 X2 .\REPLACELANE ~b \\ &&|&
469- \hex {FD}~~31 {:}\Bu32 ~~b {:}\Bbyte &\Rightarrow & \F32 X4 .\EXTRACTLANE ~b \\ &&|&
470- \hex {FD}~~32 {:}\Bu32 ~~b {:}\Bbyte &\Rightarrow & \F32 X4 .\REPLACELANE ~b \\ &&|&
471- \hex {FD}~~33 {:}\Bu32 ~~b {:}\Bbyte &\Rightarrow & \F64 X2 .\EXTRACTLANE ~b \\ &&|&
472- \hex {FD}~~34 {:}\Bu32 ~~b {:}\Bbyte &\Rightarrow & \F64 X2 .\REPLACELANE ~b \\
462+ \hex {FD}~~21 {:}\Bu32 ~~l {:}\Blaneidx &\Rightarrow & \I8 X16 .\EXTRACTLANE\K {\_s}~l \\ &&|&
463+ \hex {FD}~~22 {:}\Bu32 ~~l {:}\Blaneidx &\Rightarrow & \I8 X16 .\EXTRACTLANE\K {\_u}~l \\ &&|&
464+ \hex {FD}~~23 {:}\Bu32 ~~l {:}\Blaneidx &\Rightarrow & \I8 X16 .\REPLACELANE ~l \\ &&|&
465+ \hex {FD}~~24 {:}\Bu32 ~~l {:}\Blaneidx &\Rightarrow & \I16 X8 .\EXTRACTLANE\K {\_s}~l \\ &&|&
466+ \hex {FD}~~25 {:}\Bu32 ~~l {:}\Blaneidx &\Rightarrow & \I16 X8 .\EXTRACTLANE\K {\_u}~l \\ &&|&
467+ \hex {FD}~~26 {:}\Bu32 ~~l {:}\Blaneidx &\Rightarrow & \I16 X8 .\REPLACELANE ~l \\ &&|&
468+ \hex {FD}~~27 {:}\Bu32 ~~l {:}\Blaneidx &\Rightarrow & \I32 X4 .\EXTRACTLANE ~l \\ &&|&
469+ \hex {FD}~~28 {:}\Bu32 ~~l {:}\Blaneidx &\Rightarrow & \I32 X4 .\REPLACELANE ~l \\ &&|&
470+ \hex {FD}~~29 {:}\Bu32 ~~l {:}\Blaneidx &\Rightarrow & \I64 X2 .\EXTRACTLANE ~l \\ &&|&
471+ \hex {FD}~~30 {:}\Bu32 ~~l {:}\Blaneidx &\Rightarrow & \I64 X2 .\REPLACELANE ~l \\ &&|&
472+ \hex {FD}~~31 {:}\Bu32 ~~l {:}\Blaneidx &\Rightarrow & \F32 X4 .\EXTRACTLANE ~l \\ &&|&
473+ \hex {FD}~~32 {:}\Bu32 ~~l {:}\Blaneidx &\Rightarrow & \F32 X4 .\REPLACELANE ~l \\ &&|&
474+ \hex {FD}~~33 {:}\Bu32 ~~l {:}\Blaneidx &\Rightarrow & \F64 X2 .\EXTRACTLANE ~l \\ &&|&
475+ \hex {FD}~~34 {:}\Bu32 ~~l {:}\Blaneidx &\Rightarrow & \F64 X2 .\REPLACELANE ~l \\
473476 \end {array}
474477
475478 All other SIMD instructions are plain opcodes without any immediates.
0 commit comments