Skip to content

Commit e5b03d0

Browse files
Add explanations of what the output SIMD values contain.
1 parent 6af370a commit e5b03d0

File tree

34 files changed

+66
-70
lines changed

34 files changed

+66
-70
lines changed

files/en-us/webassembly/reference/numeric/abs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ value_type.abs
6060
- `output`
6161
- : The output value.
6262

63-
For a non-SIMD `abs`, the `input` and `output` will be basic numeric values such as `-3.5` or `3.5`.
63+
For a non-SIMD `abs`, the `input` and `output` will be basic numeric values such as `3.5` or `10`.
6464

65-
For a [SIMD](/en-US/docs/WebAssembly/Reference/SIMD) `abs`, the `input` and `output` will be [`v128`](/en-US/docs/WebAssembly/Reference/Types/v128) value interpretations, for example `i32x4 4 -8 12 -16`.
65+
For a [SIMD](/en-US/docs/WebAssembly/Reference/SIMD) `abs`, the `input` and `output` will be [`v128`](/en-US/docs/WebAssembly/Reference/Types/v128) value interpretations, for example `i32x4 4 8 12 16`. Each lane of the output pushed to the stack is the absolute value of the corresponding lane in the input.
6666

6767
### Binary encoding
6868

files/en-us/webassembly/reference/numeric/add/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ value_type.add
6767

6868
For a non-SIMD `add`, these will be basic numeric values such as `3` or `3.5`.
6969

70-
For a [SIMD](/en-US/docs/WebAssembly/Reference/SIMD) `add`, these will be [`v128`](/en-US/docs/WebAssembly/Reference/Types/v128) value interpretations, for example `f32x4 0x9 0xa 0xb 0xc`.
70+
For a [SIMD](/en-US/docs/WebAssembly/Reference/SIMD) `add`, these will be [`v128`](/en-US/docs/WebAssembly/Reference/Types/v128) value interpretations, for example `f32x4 0x9 0xa 0xb 0xc`. Each lane of the output pushed to the stack is the addition of the corresponding lanes in the input values.
7171

7272
### Binary encoding
7373

files/en-us/webassembly/reference/numeric/and/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ value_type.and
7171

7272
For a non-SIMD `and`, these will be basic numeric values such as `14` or `3`.
7373

74-
For a [SIMD](/en-US/docs/WebAssembly/Reference/SIMD) `and`, these will be [`v128`](/en-US/docs/WebAssembly/Reference/Types/v128) value interpretations, for example `i32x4 9 4 -16 100`.
74+
For a [SIMD](/en-US/docs/WebAssembly/Reference/SIMD) `and`, these will be [`v128`](/en-US/docs/WebAssembly/Reference/Types/v128) value interpretations, for example `i32x4 9 4 -16 100`. Each lane of the output pushed to the stack is the bitwise AND of the corresponding lanes in the input values.
7575

7676
### Binary encoding
7777

files/en-us/webassembly/reference/numeric/ceil/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ value_type.ceil
5858

5959
For a non-SIMD `ceil`, these will be basic numeric values such as `14.3` or `3.0`.
6060

61-
For a [SIMD](/en-US/docs/WebAssembly/Reference/SIMD) `ceil`, these will be [`v128`](/en-US/docs/WebAssembly/Reference/Types/v128) value interpretations, for example `f32x4 1.9 2.5 0.5 12.1`.
61+
For a [SIMD](/en-US/docs/WebAssembly/Reference/SIMD) `ceil`, these will be [`v128`](/en-US/docs/WebAssembly/Reference/Types/v128) value interpretations, for example `f32x4 1.9 2.5 0.5 12.1`. Each lane of the output pushed to the stack is the rounded up value of the corresponding lane in the input.
6262

6363
### Binary encoding
6464

files/en-us/webassembly/reference/numeric/div/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ value_type.div
6161

6262
For a non-SIMD `div`, these will be basic numeric values such as `3` or `3.5`.
6363

64-
For a [SIMD](/en-US/docs/WebAssembly/Reference/SIMD) `div`, these will be [`v128`](/en-US/docs/WebAssembly/Reference/Types/v128) value interpretations, for example `f32x4 0x9 0xa 0xb 0xc`.
64+
For a [SIMD](/en-US/docs/WebAssembly/Reference/SIMD) `div`, these will be [`v128`](/en-US/docs/WebAssembly/Reference/Types/v128) value interpretations, for example `f32x4 0x9 0xa 0xb 0xc`. Each lane of the output pushed to the stack is the result of the division of the first input's corresponding lane by the second input's corresponding lane.
6565

6666
### Binary encoding
6767

files/en-us/webassembly/reference/numeric/eq/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ value_type.eq
7171
- `input2`
7272
- : The second input value.
7373
- `output`
74-
- : The output value. If the input values are equal, `1` will be pushed on to the stack, otherwise `0` will be pushed on to the stack. The output values are integers.
74+
- : The output value, which will be an integer type.
7575

76-
For a non-SIMD `eq`, the inputs will be basic numeric values such as `3` or `3.5`.
76+
For a non-SIMD `eq`, the inputs will be basic numeric values such as `1` or `3.5`. If the input values are equal, `1` will be pushed on to the stack as an output, otherwise `0` will be pushed on to the stack.
7777

78-
For a [SIMD](/en-US/docs/WebAssembly/Reference/SIMD) `eq`, the inputs will be [`v128`](/en-US/docs/WebAssembly/Reference/Types/v128) value interpretations, for example `f32x4 0x9 0xa 0xb 0xc`.
78+
For a [SIMD](/en-US/docs/WebAssembly/Reference/SIMD) `eq`, the inputs will be [`v128`](/en-US/docs/WebAssembly/Reference/Types/v128) value interpretations, for example `f32x4 0x9 0xa 0xb 0xc`. Each lane of the output pushed to the stack is a `1` or `0` indicating the equality of the corresponding lanes in the input values.
7979

8080
### Binary encoding
8181

files/en-us/webassembly/reference/numeric/floor/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ value_type.floor
6060

6161
For a non-SIMD `floor`, these will be basic numeric values such as `14.3` or `3.0`.
6262

63-
For a [SIMD](/en-US/docs/WebAssembly/Reference/SIMD) `floor`, these will be [`v128`](/en-US/docs/WebAssembly/Reference/Types/v128) value interpretations, for example `f32x4 1.9 2.5 0.5 12.1`.
63+
For a [SIMD](/en-US/docs/WebAssembly/Reference/SIMD) `floor`, these will be [`v128`](/en-US/docs/WebAssembly/Reference/Types/v128) value interpretations, for example `f32x4 1.9 2.5 0.5 12.1`. Each lane of the output pushed to the stack is the rounded down value of the corresponding lane in the input value.
6464

6565
### Binary encoding
6666

files/en-us/webassembly/reference/numeric/ge/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ value_type.ge
6767
- `input2`
6868
- : The second input value.
6969
- `output`
70-
- : The output value. If the first input is greater than or equal to the second input, `1` will be pushed on to the stack, otherwise `0` will be pushed on to the stack. The output values are integers.
70+
- : The output value, which will be an integer type.
7171

72-
For a non-SIMD `ge`, the inputs will be basic numeric values such as `3.0` or `3.5`.
72+
For a non-SIMD `ge`, the inputs will be basic numeric values such as `3.0` or `3.5`. If the first input is greater than or equal to the second input, `1` will be pushed on to the stack as an output, otherwise `0` will be pushed on to the stack.
7373

74-
For a [SIMD](/en-US/docs/WebAssembly/Reference/SIMD) `ge`, the inputs will be [`v128`](/en-US/docs/WebAssembly/Reference/Types/v128) value interpretations, for example `f32x4 2.0 30 86.9 120`.
74+
For a [SIMD](/en-US/docs/WebAssembly/Reference/SIMD) `ge`, the inputs will be [`v128`](/en-US/docs/WebAssembly/Reference/Types/v128) value interpretations, for example `f32x4 2.0 30 86.9 120`. Each lane of the output pushed to the stack is a `1` or `0` indicating whether the corresponding lane of the first input value is greater than or equal to the corresponding lane of the second input value.
7575

7676
### Binary encoding
7777

files/en-us/webassembly/reference/numeric/ge_s/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ value_type.ge_s
7272
- `input2`
7373
- : The second input value.
7474
- `output`
75-
- : The output value. If the first input is greater than or equal to the second input, `1` will be pushed on to the stack, otherwise `0` will be pushed on to the stack. The output values are integers.
75+
- : The output value, which will be an integer type.
7676

77-
For a non-SIMD `ge_s`, the inputs will be basic numeric values such as `3` or `12`.
77+
For a non-SIMD `ge_s`, the inputs will be basic numeric values such as `3` or `12`. If the first input is greater than or equal to the second input, `1` will be pushed on to the stack as an output, otherwise `0` will be pushed on to the stack.
7878

79-
For a [SIMD](/en-US/docs/WebAssembly/Reference/SIMD) `ge_s`, the inputs will be [`v128`](/en-US/docs/WebAssembly/Reference/Types/v128) value interpretations, for example `i32x4 2 30 86 120`.
79+
For a [SIMD](/en-US/docs/WebAssembly/Reference/SIMD) `ge_s`, the inputs will be [`v128`](/en-US/docs/WebAssembly/Reference/Types/v128) value interpretations, for example `i32x4 2 30 86 120`. Each lane of the output pushed to the stack is a `1` or `0` indicating whether the corresponding lane of the first input value is greater than or equal to the corresponding lane of the second input value.
8080

8181
### Binary encoding
8282

files/en-us/webassembly/reference/numeric/ge_u/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ value_type.ge_u
7171
- `input2`
7272
- : The second input value.
7373
- `output`
74-
- : The output value. If the first input is greater than or equal to the second input, `1` will be pushed on to the stack, otherwise `0` will be pushed on to the stack. The output values are integers.
74+
- : The output value, which will be an integer type.
7575

7676
For a non-SIMD `ge_u`, the inputs will be basic numeric values such as `3` or `12`.
7777

78-
For a [SIMD](/en-US/docs/WebAssembly/Reference/SIMD) `ge_u`, the inputs will be [`v128`](/en-US/docs/WebAssembly/Reference/Types/v128) value interpretations, for example `i32x4 2 30 86 120`.
78+
For a [SIMD](/en-US/docs/WebAssembly/Reference/SIMD) `ge_u`, the inputs will be [`v128`](/en-US/docs/WebAssembly/Reference/Types/v128) value interpretations, for example `i32x4 2 30 86 120`. Each lane of the output pushed to the stack is a `1` or `0` indicating whether the corresponding lane of the first input value is greater than or equal to the corresponding lane of the second input value.
7979

8080
### Binary encoding
8181

0 commit comments

Comments
 (0)