Skip to content

Commit 14f86b9

Browse files
committed
Merge remote-tracking branch 'upstream/main' into HEAD
2 parents 35e435a + bcd1924 commit 14f86b9

File tree

12 files changed

+225
-164
lines changed

12 files changed

+225
-164
lines changed

document/core/exec/instructions.rst

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -513,31 +513,31 @@ Most other vector instructions are defined in terms of numeric operators that ar
513513

514514
1. Assert: due to :ref:`validation <valid-vec-replace_lane>`, :math:`x < \dim(\shape)`.
515515

516-
2. Let :math:`t_1` be the type :math:`\unpacked(\shape)`.
516+
2. Let :math:`t_2` be the type :math:`\unpacked(\shape)`.
517517

518518
3. Assert: due to :ref:`validation <valid-vec-replace_lane>`, a value of :ref:`value type <syntax-valtype>` :math:`t_1` is on the top of the stack.
519519

520-
4. Pop the value :math:`t_1.\CONST~c_1` from the stack.
520+
4. Pop the value :math:`t_2.\CONST~c_2` from the stack.
521521

522522
5. Assert: due to :ref:`validation <valid-vec-replace_lane>`, a value of :ref:`value type <syntax-valtype>` |V128| is on the top of the stack.
523523

524-
6. Pop the value :math:`\V128.\VCONST~c_2` from the stack.
524+
6. Pop the value :math:`\V128.\VCONST~c_1` from the stack.
525525

526-
7. Let :math:`i^\ast` be the result of computing :math:`\lanes_{\shape}(c_2)`.
526+
7. Let :math:`i^\ast` be the result of computing :math:`\lanes_{\shape}(c_1)`.
527527

528-
8. Let :math:`c` be the result of computing :math:`\lanes^{-1}_{\shape}(i^\ast \with [x] = c_1)`.
528+
8. Let :math:`c` be the result of computing :math:`\lanes^{-1}_{\shape}(i^\ast \with [x] = c_2)`.
529529

530530
9. Push :math:`\V128.\VCONST~c` on the stack.
531531

532532
.. math::
533533
\begin{array}{l}
534534
\begin{array}{lcl@{\qquad}l}
535-
(t_1\K{.}\CONST~c_1)~(\V128\K{.}\VCONST~c_2)~(\shape\K{.}\REPLACELANE~x) &\stepto& (\V128\K{.}\VCONST~c)
535+
(\V128\K{.}\VCONST~c_1)~(t_2\K{.}\CONST~c_2)~(\shape\K{.}\REPLACELANE~x) &\stepto& (\V128\K{.}\VCONST~c)
536536
\end{array}
537537
\\ \qquad
538538
\begin{array}[t]{@{}r@{~}l@{}}
539-
(\iff & i^\ast = \lanes_{\shape}(c_2) \\
540-
\wedge & c = \lanes^{-1}_{\shape}(i^\ast \with [x] = c_1))
539+
(\iff & i^\ast = \lanes_{\shape}(c_1) \\
540+
\wedge & c = \lanes^{-1}_{\shape}(i^\ast \with [x] = c_2))
541541
\end{array}
542542
\end{array}
543543
@@ -837,8 +837,8 @@ where:
837837
\end{array}
838838
839839
840-
:math:`t_2\K{x}N\K{.}\vcvtop\K{\_}t_1\K{x}M\K{\_}\sx\K{\_zero}`
841-
...............................................................
840+
:math:`t_2\K{x}N\K{.}\vcvtop\K{\_}t_1\K{x}M\K{\_}\sx^?\K{\_zero}`
841+
.................................................................
842842

843843
1. Assert: due to :ref:`syntax <syntax-instr-vec>`, :math:`N = 2 \cdot M`.
844844

@@ -848,7 +848,7 @@ where:
848848

849849
4. Let :math:`i^\ast` be the result of computing :math:`\lanes_{t_1\K{x}M}(c_1)`.
850850

851-
5. Let :math:`j^\ast` be the result of computing :math:`\vcvtop^{\sx}_{|t_1|,|t_2|}(i^\ast)`.
851+
5. Let :math:`j^\ast` be the result of computing :math:`\vcvtop^{\sx^?}_{|t_1|,|t_2|}(i^\ast)`.
852852

853853
6. Let :math:`k^\ast` be the concatenation of the two sequences :math:`j^\ast` and :math:`0^M`.
854854

@@ -859,11 +859,11 @@ where:
859859
.. math::
860860
\begin{array}{l}
861861
\begin{array}{lcl@{\qquad}l}
862-
(\V128\K{.}\VCONST~c_1)~t_2\K{x}N\K{.}\vcvtop\K{\_}t_1\K{x}M\K{\_}\sx\K{\_zero} &\stepto& (\V128\K{.}\VCONST~c) \\
862+
(\V128\K{.}\VCONST~c_1)~t_2\K{x}N\K{.}\vcvtop\K{\_}t_1\K{x}M\K{\_}\sx^?\K{\_zero} &\stepto& (\V128\K{.}\VCONST~c) \\
863863
\end{array}
864864
\\ \qquad
865865
\begin{array}[t]{@{}r@{~}l@{}}
866-
(\iff & c = \lanes^{-1}_{t_2\K{x}N}(\vcvtop^{\sx}_{|t_1|,|t_2|}(\lanes_{t_1\K{x}M}(c_1))~0^M))
866+
(\iff & c = \lanes^{-1}_{t_2\K{x}N}(\vcvtop^{\sx^?}_{|t_1|,|t_2|}(\lanes_{t_1\K{x}M}(c_1))~0^M))
867867
\end{array}
868868
\end{array}
869869
@@ -942,7 +942,7 @@ where:
942942

943943
10. Let :math:`k_2^\ast` be the result of computing :math:`\extend^{\sx}_{|t_1|,|t_2|}(j_2^\ast)`.
944944

945-
11. Let :math:`k^\ast` be the result of computing :math:`\imul_{t_2\K{x}N}(k_1^\ast, k_2^\ast)`.
945+
11. Let :math:`k^\ast` be the result of computing :math:`\imul_{|t_2|}(k_1^\ast, k_2^\ast)`.
946946

947947
12. Let :math:`c` be the result of computing :math:`\lanes^{-1}_{t_2\K{x}N}(k^\ast)`.
948948

@@ -956,7 +956,7 @@ where:
956956
\begin{array}[t]{@{}r@{~}l@{}}
957957
(\iff & i^\ast = \lanes_{t_1\K{x}M}(c_1)[\half(0, N) \slice N] \\
958958
\wedge & j^\ast = \lanes_{t_1\K{x}M}(c_2)[\half(0, N) \slice N] \\
959-
\wedge & c = \lanes^{-1}_{t_2\K{x}N}(\imul_{t_2\K{x}N}(\extend^{\sx}_{|t_1|,|t_2|}(i^\ast), \extend^{\sx}_{|t_1|,|t_2|}(j^\ast))))
959+
\wedge & c = \lanes^{-1}_{t_2\K{x}N}(\imul_{|t_2|}(\extend^{\sx}_{|t_1|,|t_2|}(i^\ast), \extend^{\sx}_{|t_1|,|t_2|}(j^\ast))))
960960
\end{array}
961961
962962
where:
@@ -983,7 +983,7 @@ where:
983983

984984
5. Let :math:`(j_1~j_2)^\ast` be the result of computing :math:`\extend^{\sx}_{|t_1|,|t_2|}(i^\ast)`.
985985

986-
6. Let :math:`k^\ast` be the result of computing :math:`\iadd_{N}(j_1, j_2)^\ast`.
986+
6. Let :math:`k^\ast` be the result of computing :math:`\iadd_{|t_2|}(j_1, j_2)^\ast`.
987987

988988
7. Let :math:`c` be the result of computing :math:`\lanes^{-1}_{t_2\K{x}N}(k^\ast)`.
989989

@@ -997,7 +997,7 @@ where:
997997
\\ \qquad
998998
\begin{array}[t]{@{}r@{~}l@{}}
999999
(\iff & (i_1~i_2)^\ast = \extend^{\sx}_{|t_1|,|t_2|}(\lanes_{t_1\K{x}M}(c_1)) \\
1000-
\wedge & j^\ast = \iadd_{N}(i_1, i_2)^\ast \\
1000+
\wedge & j^\ast = \iadd_{|t_2|}(i_1, i_2)^\ast \\
10011001
\wedge & c = \lanes^{-1}_{t_2\K{x}N}(j^\ast))
10021002
\end{array}
10031003
\end{array}

document/core/index.bs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Status: ED
66
Level: 2
77
TR: https://www.w3.org/TR/wasm-core-2/
88
ED: https://webassembly.github.io/spec/core/bikeshed/
9-
Editor: Andreas Rossberg (Dfinity Stiftung)
9+
Editor: Andreas Rossberg
1010
Repository: WebAssembly/spec
1111
Markup Shorthands: css no, markdown no, algorithm no, idl no
1212
Abstract: This document describes release 2.0 of the core WebAssembly standard, a safe, portable, low-level code format designed for efficient execution and compact representation.

document/core/text/instructions.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,10 @@ Vector constant instructions have a mandatory :ref:`shape <syntax-vec-shape>` de
853853
\text{f32x4.abs} &\Rightarrow& \F32X4.\VABS\\ &&|&
854854
\text{f32x4.neg} &\Rightarrow& \F32X4.\VNEG\\ &&|&
855855
\text{f32x4.sqrt} &\Rightarrow& \F32X4.\VSQRT\\ &&|&
856+
\text{f32x4.ceil} &\Rightarrow& \F32X4.\VCEIL\\ &&|&
857+
\text{f32x4.floor} &\Rightarrow& \F32X4.\VFLOOR\\ &&|&
858+
\text{f32x4.trunc} &\Rightarrow& \F32X4.\VTRUNC\\ &&|&
859+
\text{f32x4.nearest} &\Rightarrow& \F32X4.\VNEAREST\\ &&|&
856860
\text{f32x4.add} &\Rightarrow& \F32X4.\VADD\\ &&|&
857861
\text{f32x4.sub} &\Rightarrow& \F32X4.\VSUB\\ &&|&
858862
\text{f32x4.mul} &\Rightarrow& \F32X4.\VMUL\\ &&|&
@@ -869,6 +873,10 @@ Vector constant instructions have a mandatory :ref:`shape <syntax-vec-shape>` de
869873
\text{f64x2.abs} &\Rightarrow& \F64X2.\VABS\\ &&|&
870874
\text{f64x2.neg} &\Rightarrow& \F64X2.\VNEG\\ &&|&
871875
\text{f64x2.sqrt} &\Rightarrow& \F64X2.\VSQRT\\ &&|&
876+
\text{f64x2.ceil} &\Rightarrow& \F64X2.\VCEIL\\ &&|&
877+
\text{f64x2.floor} &\Rightarrow& \F64X2.\VFLOOR\\ &&|&
878+
\text{f64x2.trunc} &\Rightarrow& \F64X2.\VTRUNC\\ &&|&
879+
\text{f64x2.nearest} &\Rightarrow& \F64X2.\VNEAREST\\ &&|&
872880
\text{f64x2.add} &\Rightarrow& \F64X2.\VADD\\ &&|&
873881
\text{f64x2.sub} &\Rightarrow& \F64X2.\VSUB\\ &&|&
874882
\text{f64x2.mul} &\Rightarrow& \F64X2.\VMUL\\ &&|&
@@ -913,7 +921,7 @@ Such a folded instruction can appear anywhere a regular instruction can.
913921
914922
.. math::
915923
\begin{array}{lllll}
916-
\production{instruction} &
924+
\production{instruction} &
917925
\text{(}~\Tplaininstr~~\Tfoldedinstr^\ast~\text{)}
918926
&\equiv\quad \Tfoldedinstr^\ast~~\Tplaininstr \\ &
919927
\text{(}~\text{block}~~\Tlabel~~\Tblocktype~~\Tinstr^\ast~\text{)}

document/core/util/katex

Submodule katex updated 279 files

document/core/util/mathjax2katex.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# -*- coding: latin-1 -*-
33

44
import queue
5+
import multiprocessing
56
import os
67
import re
78
import shelve
@@ -229,7 +230,8 @@ def Worker():
229230
sys.stderr.write('.')
230231

231232
q = queue.Queue()
232-
for i in range(len(os.sched_getaffinity(0))):
233+
for i in range(len(os.sched_getaffinity(0)) if "sched_getaffinity" in dir(os)
234+
else multiprocessing.cpu_count()):
233235
t = threading.Thread(target=Worker)
234236
t.daemon = True
235237
t.start()

interpreter/script/js.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ let spectest = {
4444
print_f64: console.log.bind(console),
4545
global_i32: 666,
4646
global_i64: 666n,
47-
global_f32: 666,
48-
global_f64: 666,
47+
global_f32: 666.6,
48+
global_f64: 666.6,
4949
table: new WebAssembly.Table({initial: 10, maximum: 20, element: 'anyfunc'}),
5050
memory: new WebAssembly.Memory({initial: 1, maximum: 2})
5151
};

0 commit comments

Comments
 (0)