From 7c5e4e224a4d41139197d5a7f585a4039442117f Mon Sep 17 00:00:00 2001 From: Marat Dukhan Date: Mon, 24 Jun 2019 15:22:30 -0700 Subject: [PATCH] Add Load-And-Splat instructions --- proposals/simd/BinarySIMD.md | 6 +++++- proposals/simd/ImplementationStatus.md | 4 ++++ proposals/simd/SIMD.md | 9 +++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/proposals/simd/BinarySIMD.md b/proposals/simd/BinarySIMD.md index ff51a7f0f..8001d6203 100644 --- a/proposals/simd/BinarySIMD.md +++ b/proposals/simd/BinarySIMD.md @@ -167,4 +167,8 @@ The `v8x16.shuffle2_imm` instruction has 16 bytes after `simdop`. | `f64x2.convert_s/i64x2` | `0xb1`| - | | `f64x2.convert_u/i64x2` | `0xb2`| - | | `v8x16.shuffle1` | `0xc0`| - | -| `v8x16.shuffle2_imm` | `0xc1`| s:LaneIdx32[16] | \ No newline at end of file +| `v8x16.shuffle2_imm` | `0xc1`| s:LaneIdx32[16] | +| `i8x16.load_splat` | `0xc2`| - | +| `i16x8.load_splat` | `0xc3`| - | +| `i32x4.load_splat` | `0xc4`| - | +| `i64x2.load_splat` | `0xc5`| - | diff --git a/proposals/simd/ImplementationStatus.md b/proposals/simd/ImplementationStatus.md index 7d612fee7..970fbc7b2 100644 --- a/proposals/simd/ImplementationStatus.md +++ b/proposals/simd/ImplementationStatus.md @@ -4,14 +4,17 @@ | `v128.store` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | `v128.const` | `-munimplemented-simd128` | | :heavy_check_mark: | :heavy_check_mark: | | `i8x16.splat` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| `i8x16.load_splat` | | | | | | `i8x16.extract_lane_s` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | `i8x16.extract_lane_u` | `-munimplemented-simd128` | | :heavy_check_mark: | :heavy_check_mark: | | `i8x16.replace_lane` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | `i16x8.splat` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| `i16x8.load_splat` | | | | | | `i16x8.extract_lane_s` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | `i16x8.extract_lane_u` | `-munimplemented-simd128` | | :heavy_check_mark: | :heavy_check_mark: | | `i16x8.replace_lane` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | `i32x4.splat` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| `i32x4.load_splat` | | | | | | `i32x4.extract_lane` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | `i32x4.replace_lane` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | `i64x2.splat` | `-munimplemented-simd128` | | :heavy_check_mark: | :heavy_check_mark: | @@ -21,6 +24,7 @@ | `f32x4.extract_lane` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | `f32x4.replace_lane` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | `f64x2.splat` | `-munimplemented-simd128` | | :heavy_check_mark: | :heavy_check_mark: | +| `i64x2.load_splat` | | | | | | `f64x2.extract_lane` | `-munimplemented-simd128` | | :heavy_check_mark: | :heavy_check_mark: | | `f64x2.replace_lane` | `-munimplemented-simd128` | | :heavy_check_mark: | :heavy_check_mark: | | `i8x16.eq` | `-msimd128` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | diff --git a/proposals/simd/SIMD.md b/proposals/simd/SIMD.md index 4862364e8..87d9b6be0 100644 --- a/proposals/simd/SIMD.md +++ b/proposals/simd/SIMD.md @@ -666,6 +666,15 @@ natural alignment. Load a `v128` vector from the given heap address. +### Load and Splat + +* `i8x16.load_splat(memarg) -> v128` +* `i16x8.load_splat(memarg) -> v128` +* `i32x4.load_splat(memarg) -> v128` +* `i64x2.load_splat(memarg) -> v128` + +Load a single element and splat to all lanes of a `v128` vector. + ### Store * `v128.store(memarg, data: v128)`