Skip to content
This repository was archived by the owner on Dec 22, 2021. It is now read-only.

Commit 18049c7

Browse files
committed
Introduce laneidx production (== byte), add immediates to instructions
1 parent 2aec40c commit 18049c7

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

document/core/syntax/instructions.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ Occasionally, it is convenient to group operators together according to the foll
172172
173173
.. index:: ! simd instruction, fixed-width simd, value, value type
174174
pair: abstract syntax; instruction
175+
.. _syntax-laneidx:
175176
.. _syntax-vunop:
176177
.. _syntax-vbinop:
177178
.. _syntax-vsunop:
@@ -202,20 +203,21 @@ SIMD instructions provide basic operations over :ref:`values <syntax-value>` of
202203
\K{f32x4} ~|~ \K{f64x2} \\
203204
\production{vshape} & \X{vxx} &::=&
204205
\X{ixx} ~|~ \X{fxx} \\
206+
\production{lane index} & \laneidx &::=& \byte \\
205207
\production{instruction} & \instr &::=&
206208
\dots \\&&|&
207209
\K{v128.}\CONST~\xref{syntax/values}{syntax-simd}{\vX{\X{nnn}}} \\&&|&
208210
\K{v128.}\vsunop \\&&|&
209211
\K{v128.}\vsbinop \\&&|&
210212
\K{v128.}\vsternop \\&&|&
211-
\K{v8x16.}\SHUFFLE ~|~ \K{v8x16.}\SWIZZLE \\&&|&
213+
\K{v8x16.}\SHUFFLE~\laneidx^{16} ~|~ \K{v8x16.}\SWIZZLE \\&&|&
212214
\X{vxx}\K{.}\SPLAT \\&&|&
213-
\K{i8x16.}\EXTRACTLANE\K{\_}\sx ~|~
214-
\K{i16x8.}\EXTRACTLANE\K{\_}\sx \\&&|&
215-
\K{i32x4.}\EXTRACTLANE ~|~
216-
\K{i64x2.}\EXTRACTLANE \\&&|&
217-
\X{fxx}\K{.}\EXTRACTLANE \\&&|&
218-
\X{vxx}\K{.}\REPLACELANE \\&&|&
215+
\K{i8x16.}\EXTRACTLANE\K{\_}\sx~\laneidx ~|~
216+
\K{i16x8.}\EXTRACTLANE\K{\_}\sx~\laneidx \\&&|&
217+
\K{i32x4.}\EXTRACTLANE~\laneidx ~|~
218+
\K{i64x2.}\EXTRACTLANE~\laneidx \\&&|&
219+
\X{fxx}\K{.}\EXTRACTLANE~\laneidx \\&&|&
220+
\X{vxx}\K{.}\REPLACELANE~\laneidx \\&&|&
219221
\X{ixx}\K{.}\virelop \\&&|&
220222
\X{fxx}\K{.}\vfrelop \\&&|&
221223
\K{i8x16.}\viunop ~|~

document/core/util/macros.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@
408408
.. |ftestop| mathdef:: \xref{syntax/instructions}{syntax-ftestop}{\X{ftestop}}
409409
.. |frelop| mathdef:: \xref{syntax/instructions}{syntax-frelop}{\X{frelop}}
410410

411+
.. |laneidx| mathdef:: \xref{syntax/instructions}{syntax-laneidx}{\X{laneidx}}
411412
.. |vunop| mathdef:: \xref{syntax/instructions}{syntax-vunop}{\X{vunop}}
412413
.. |vbinop| mathdef:: \xref{syntax/instructions}{syntax-vbinop}{\X{vbinop}}
413414
.. |vsunop| mathdef:: \xref{syntax/instructions}{syntax-vsunop}{\X{vsunop}}

0 commit comments

Comments
 (0)