Commit Graph

7 Commits

Author SHA1 Message Date
Kevin Moore 26fa4add14 dart2wasm: tool cleanup
DRY'd up some helpers and logic
Deleted validate_wasm_test.sh
Added `--run` and `--write-temp` flags to compile_benchmark

Change-Id: I666b25d13d0837a2b9f9fc40488882f1cfc6aff5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/478703
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2026-02-18 19:16:22 -08:00
Kevin Moore e0b028808a [dart2wasm] Expand Wasm SIMD intrinsics for vector operations
Add more Wasm SIMD intrinsics and instructions to support efficient
vector operations, specifically targeting the requirements of types
like Offset and Size.

- Implement new intrinsics in `dart2wasm`:
  - `anyTrue` for V128.
  - `allTrue` for I64x2.
  - `pmin`/`pmax` (pseudo-minimum/maximum) for F64x2.
  - `fromLaneValues` for F32x4 and F64x2.
  - `shuffle` for F64x2.
- Update `wasm_builder` with support for the following instructions:
  - `v128.any_true`
  - `i8x16.all_true`, `i16x8.all_true`, `i32x4.all_true`, `i64x2.all_true`
  - `i8x16.shuffle` (including serialization and deserialization)
- Add `tests/web/wasm/simd/vector_test.dart`, which implements `Offset`
  and `Size` using these new SIMD intrinsics, demonstrating their
  practical utility and correctness.
- Update `tests/web/wasm/simd/simd_test.dart` with additional coverage.

Change-Id: Ifa5ba0fb265b0fa46c0a3469d9331f32a025c9ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/478860
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2026-02-17 16:05:32 -08:00
Kevin Moore ef8682a9f8 [dart:wasm] implement most useful floating point SIMD ops
Change-Id: I44958086921812c7eb1a4be6b826c1be9a50738b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/478340
Reviewed-by: Nate Biggs <natebiggs@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2026-02-04 20:31:45 -08:00
Kevin Moore 152e01ff69 [dart2wasm] "publicly" implement WasmV128
And add corresponding operations

Change-Id: Ib39ec04969281a35615e1b4ae41d1b4ec1c100ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/478242
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2026-02-03 22:17:49 -08:00
Kevin Moore 44cfe5b3fa [dart2wasm] Add equality to the v128 types
Change-Id: I6a07d1bec1ccc4b3a528399f9201c661bcef3e03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/478083
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2026-02-03 20:51:11 -08:00
Kevin Moore 0f230f3262 [dart2wasm] test all new simd instructions
With one fix
Also added a test script to make future hacking easier

Change-Id: I05c75dd4c458f7c3404ed7dba25484296764a549
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/477941
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2026-02-03 11:07:42 -08:00
Nate Biggs 5a02a7a019 [dart2wasm] SIMD instructions template
SIMD proposal:
https://github.com/WebAssembly/spec/blob/main/proposals/simd/SIMD.md

This only implements a few of the available SIMD instructions as a
template for further contribution. kevmoo@ plans to continue
implementing these.

Bug: https://github.com/dart-lang/sdk/issues/62516
Change-Id: Ib229feecf58714e92fcb1461f968919658cbce29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/476540
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2026-02-03 10:01:43 -08:00