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

Commit 2d191fe

Browse files
committed
[spectext] Add i16x8.qmulr_sat_s
This was merged in #365.
1 parent 7c43e09 commit 2d191fe

File tree

7 files changed

+487
-468
lines changed

7 files changed

+487
-468
lines changed

document/core/appendix/gen-index-instructions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ def Instruction(name, opcode, type=None, validation=None, execution=None, operat
457457
Instruction(r'\I16X8.\VMAX\K{\_s}', r'\hex{FD}~~152', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imax_s'),
458458
Instruction(r'\I16X8.\VMAX\K{\_u}', r'\hex{FD}~~153', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-imax_u'),
459459
Instruction(r'\I16X8.\AVGR\K{\_u}', r'\hex{FD}~~155', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-iavgr_u'),
460+
Instruction(r'\I16X8.\Q15MULRSAT\K{\_s}', r'\hex{FD}~~156', r'[\V128~\V128] \to [\V128]', r'valid-vbinop', r'exec-vbinop', r'op-iq15mulrsat_s'),
460461
Instruction(r'\I16X8.\EXTMUL\K{\_low\_i8x16\_s}', r'\hex{FD}~~154', r'[\V128~\V128] \to [\V128]', r'valid-simd-vextmul', r'exec-simd-vextmul'),
461462
Instruction(r'\I16X8.\EXTMUL\K{\_high\_i8x16\_s}', r'\hex{FD}~~157', r'[\V128~\V128] \to [\V128]', r'valid-simd-vextmul', r'exec-simd-vextmul'),
462463
Instruction(r'\I16X8.\EXTMUL\K{\_low\_i8x16\_u}', r'\hex{FD}~~158', r'[\V128~\V128] \to [\V128]', r'valid-simd-vextmul', r'exec-simd-vextmul'),

document/core/appendix/index-instructions.rst

Lines changed: 467 additions & 466 deletions
Large diffs are not rendered by default.

document/core/binary/instructions.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,7 @@ All other SIMD instructions are plain opcodes without any immediates.
651651
\hex{FD}~~153{:}\Bu32 &\Rightarrow& \I16X8.\VMAX\K{\_u} \\ &&|&
652652
\hex{FD}~~155{:}\Bu32 &\Rightarrow& \I16X8.\AVGR\K{\_u} \\ &&|&
653653
\hex{FD}~~154{:}\Bu32 &\Rightarrow& \I16X8.\EXTMUL\K{\_low\_i8x16\_s}\\ &&|&
654+
\hex{FD}~~156{:}\Bu32 &\Rightarrow& \I16X8.\Q15MULRSAT\K{\_s} \\ &&|&
654655
\hex{FD}~~157{:}\Bu32 &\Rightarrow& \I16X8.\EXTMUL\K{\_high\_i8x16\_s}\\ &&|&
655656
\hex{FD}~~158{:}\Bu32 &\Rightarrow& \I16X8.\EXTMUL\K{\_low\_i8x16\_u}\\ &&|&
656657
\hex{FD}~~159{:}\Bu32 &\Rightarrow& \I16X8.\EXTMUL\K{\_high\_i8x16\_u}\\

document/core/exec/numerics.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ The integer result of predicates -- i.e., :ref:`tests <syntax-testop>` and :ref:
897897
.. _op-iavgr_u:
898898

899899
:math:`\iavgru_N(i_1, i_2)`
900-
.............................
900+
...........................
901901

902902
* Let :math:`j` be the result of adding :math:`i_1`, :math:`i_2`, and :math:`1`.
903903

@@ -909,6 +909,17 @@ The integer result of predicates -- i.e., :ref:`tests <syntax-testop>` and :ref:
909909
\end{array}
910910
911911
912+
.. _op-iq15mulrsat_s:
913+
914+
:math:`\iq15mulrsats_N(i_1, i_2)`
915+
.................................
916+
917+
* Return the result of :math:`\sats_N(\ishrs_N(i_1 \cdot i_2 + 2^{14}, 15))`.
918+
919+
.. math::
920+
\begin{array}{lll@{\qquad}l}
921+
\iq15mulrsats_N(i_1, i_2) &=& \sats_N(\ishrs_N(i_1 \cdot i_2 + 2^{14}, 15))
922+
\end{array}
912923
913924
914925
.. index:: floating-point, IEEE 754

document/core/syntax/instructions.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ SIMD instructions provide basic operations over :ref:`values <syntax-value>` of
236236
\K{i32x4.}\viunop ~|~
237237
\K{i64x2.}\viunop \\&&|&
238238
\K{i8x16.}\VPOPCNT \\&&|&
239+
\K{i16x8.}\Q15MULRSAT\K{\_s} \\ &&|&
239240
\fshape\K{.}\vfunop \\&&|&
240241
\ishape\K{.}\vitestop \\ &&|&
241242
\ishape\K{.}\BITMASK \\ &&|&
@@ -390,7 +391,8 @@ Occasionally, it is convenient to group operators together according to the foll
390391
\viminmaxop ~|~ \visatbinop \\&&|&
391392
\SWIZZLE ~|~
392393
\VMUL ~|~
393-
\AVGR\K{\_u} \\
394+
\AVGR\K{\_u} ~|~
395+
\Q15MULRSAT\K{\_s} \\
394396
\production{conversion operator} & \vcvtop &::=&
395397
\VTRUNC\K{\_sat} ~|~
396398
\VCONVERT \\

document/core/text/instructions.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,7 @@ SIMD const instructions have a mandatory :ref:`shape <syntax-simd-shape>` descri
684684
\text{i16x8.max\_s} &\Rightarrow& \I16X8.\VMAX\K{\_s}\\ &&|&
685685
\text{i16x8.max\_u} &\Rightarrow& \I16X8.\VMAX\K{\_u}\\ &&|&
686686
\text{i16x8.avgr\_u} &\Rightarrow& \I16X8.\AVGR\K{\_u}\\ &&|&
687+
\text{i16x8.q15mulr\_sat\_s} &\Rightarrow& \I16X8.\Q15MULRSAT\K{\_s}\\ &&|&
687688
\text{i16x8.extmul\_low\_i8x16\_s} &\Rightarrow& \I16X8.\EXTMUL\K{\_low\_i8x16\_s}\\ &&|&
688689
\text{i16x8.extmul\_high\_i8x16\_s} &\Rightarrow& \I16X8.\EXTMUL\K{\_high\_i8x16\_s}\\ &&|&
689690
\text{i16x8.extmul\_low\_i8x16\_u} &\Rightarrow& \I16X8.\EXTMUL\K{\_low\_i8x16\_u}\\ &&|&

document/core/util/macros.def

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@
426426
.. |EXTMUL| mathdef:: \xref{syntax/instructions}{syntax-instr-simd}{\K{extmul}}
427427
.. |VTRUNC| mathdef:: \xref{syntax/instructions}{syntax-instr-simd}{\K{trunc}}
428428
.. |VCONVERT| mathdef:: \xref{syntax/instructions}{syntax-instr-simd}{\K{convert}}
429+
.. |Q15MULRSAT| mathdef:: \xref{syntax/instructions}{syntax-instr-simd}{\K{q15mulr\_sat}}
429430

430431

431432
.. Instructions, non-terminals
@@ -1033,6 +1034,7 @@
10331034
.. |isubsatu| mathdef:: \xref{exec/numerics}{op-isubsat_u}{\F{isubsat\_u}}
10341035
.. |isubsats| mathdef:: \xref{exec/numerics}{op-isubsat_s}{\F{isubsat\_s}}
10351036
.. |iavgru| mathdef:: \xref{exec/numerics}{op-iavgr_u}{\F{iavgr\_u}}
1037+
.. |iq15mulrsats| mathdef:: \xref{exec/numerics}{op-iq15mulrsat_s}{\F{iq15mulrsat\_s}}
10361038

10371039
.. |fadd| mathdef:: \xref{exec/numerics}{op-fadd}{\F{fadd}}
10381040
.. |fsub| mathdef:: \xref{exec/numerics}{op-fsub}{\F{fsub}}

0 commit comments

Comments
 (0)