Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 85da494b1c29833058e9f7f032c3d8cfad4de73e
      
https://github.com/WebKit/WebKit/commit/85da494b1c29833058e9f7f032c3d8cfad4de73e
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-04-20 (Mon, 20 Apr 2026)

  Changed paths:
    A JSTests/wasm/stress/simd-const-relaxed-dot-product.js
    M JSTests/wasm/stress/simd-const-relaxed-f32-madd.js
    M JSTests/wasm/stress/simd-const-relaxed-f32-trunc.js
    M JSTests/wasm/stress/simd-const-relaxed-f64-madd.js
    M JSTests/wasm/stress/simd-const-relaxed-f64-trunc.js
    M JSTests/wasm/stress/simd-const-relaxed-lane-select.js
    A JSTests/wasm/stress/simd-const-relaxed-min-max.js
    A JSTests/wasm/stress/simd-const-relaxed-q15mulr.js
    M JSTests/wasm/stress/simd-const-relaxed-swizzle.js
    M Source/JavaScriptCore/assembler/ARM64Assembler.h
    M Source/JavaScriptCore/assembler/MacroAssemblerARM64.cpp
    M Source/JavaScriptCore/assembler/MacroAssemblerARM64.h
    M Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h
    M Source/JavaScriptCore/b3/B3LowerToAir.cpp
    M Source/JavaScriptCore/b3/B3Opcode.h
    M Source/JavaScriptCore/b3/B3SIMDValue.h
    M Source/JavaScriptCore/b3/B3Validate.cpp
    M Source/JavaScriptCore/b3/B3Value.cpp
    M Source/JavaScriptCore/b3/B3Value.h
    M Source/JavaScriptCore/b3/B3ValueInlines.h
    M Source/JavaScriptCore/b3/B3ValueKey.cpp
    M Source/JavaScriptCore/b3/air/AirOpcode.opcodes
    M Source/JavaScriptCore/b3/testb3.h
    M Source/JavaScriptCore/b3/testb3_1.cpp
    M Source/JavaScriptCore/b3/testb3_7.cpp
    M Source/JavaScriptCore/jit/GPRInfo.h
    M Source/JavaScriptCore/llint/InPlaceInterpreter.asm
    M Source/JavaScriptCore/llint/InPlaceInterpreter64.asm
    M Source/JavaScriptCore/runtime/Options.cpp
    M Source/JavaScriptCore/wasm/WasmBBQJIT64.cpp
    M Source/JavaScriptCore/wasm/WasmFunctionParser.h
    M Source/JavaScriptCore/wasm/WasmOMGIRGenerator.cpp
    M Source/JavaScriptCore/wasm/WasmSIMDOpcodes.h

  Log Message:
  -----------
  [JSC] Implement relaxed Wasm SIMD
https://bugs.webkit.org/show_bug.cgi?id=309934
rdar://172525795

Reviewed by Dan Hecht.

This patch implements relaxed wasm SIMD in all tiers, including IPInt,
BBQ, and OMG for x64 and ARM64.

Tests: JSTests/wasm/stress/simd-const-relaxed-dot-product.js
       JSTests/wasm/stress/simd-const-relaxed-min-max.js
       JSTests/wasm/stress/simd-const-relaxed-q15mulr.js
       Source/JavaScriptCore/b3/testb3_1.cpp
       Source/JavaScriptCore/b3/testb3_7.cpp

* JSTests/wasm/stress/simd-const-relaxed-dot-product.js: Added.
(import.as.assert.from.string_appeared_here.leb128):
(buildSection):
(buildFuncBody):
(buildExport):
* JSTests/wasm/stress/simd-const-relaxed-f32-madd.js:
* JSTests/wasm/stress/simd-const-relaxed-f32-trunc.js:
* JSTests/wasm/stress/simd-const-relaxed-f64-madd.js:
* JSTests/wasm/stress/simd-const-relaxed-f64-trunc.js:
* JSTests/wasm/stress/simd-const-relaxed-lane-select.js:
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.func.export.string_appeared_here.result.i32.i8x16.relaxed_laneselect.v128.const.i8x16.0.127.0.0.0.0.0.0.0.0.0.0.0.0.0.42.v128.const.i8x16.99.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.v128.const.i8x16.0.255.0.0.0.0.0.0.0.0.0.0.0.0.0.255.return.i8x16.extract_lane_u.1.func.export.string_appeared_here.result.i32.i8x16.relaxed_laneselect.v128.const.i8x16.0.127.0.0.0.0.0.0.0.0.0.0.0.0.0.42.v128.const.i8x16.99.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.v128.const.i8x16.0.255.0.0.0.0.0.0.0.0.0.0.0.0.0.255.return.i8x16.extract_lane_u.0.func.export.string_appeared_here.result.i32.i8x16.relaxed_laneselect.v128.const.i8x16.0.127.0.0.0.0.0.0.0.0.0.0.0.0.0.42.v128.const.i8x16.99.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.v128.const.i8x16.0.255.0.0.0.0.0.0.0.0.0.0.0.0.0.255.return.i8x16.extract_lane_u.15.func.export.string_appeared_here.result.i32.i16x8.relaxed_laneselect.v128.const.i16x8.0.32767.0.0.0.0.0.0.v128.const.i16x8.0.0.0.0.0.0.0.0.v128.const.i16x8.0.1.0.0.0.0.0.0.return.i16x8.extract_lane_u.1.func.export.string_appeared_here.result.i32.i32x4.relaxed_laneselect.v128.const.i32x4.0.2147483647.0.0.v128.const.i32x4.0.0.0.0.v128.const.i32x4.0.1.0.0.return.i32x4.extract_lane.1.func.export.string_appeared_here.result.i64.i64x2.relaxed_laneselect.v128.const.i64x2.0.9223372036854775807.v128.const.i64x2.0.0.v128.const.i64x2.0.1.return.i64x2.extract_lane.1.async
 test):
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.func.export.string_appeared_here.result.i32.i8x16.relaxed_laneselect.v128.const.i8x16.0.127.0.0.0.0.0.0.0.0.0.0.0.0.0.0.v128.const.i8x16.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.v128.const.i8x16.0.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.return.i8x16.extract_lane_u.1.func.export.string_appeared_here.result.i32.i16x8.relaxed_laneselect.v128.const.i16x8.0.32767.0.0.0.0.0.0.v128.const.i16x8.0.0.0.0.0.0.0.0.v128.const.i16x8.0.7.0.0.0.0.0.0.return.i16x8.extract_lane_u.1.func.export.string_appeared_here.result.i32.i32x4.relaxed_laneselect.v128.const.i32x4.0.2147483647.0.0.v128.const.i32x4.0.0.0.0.v128.const.i32x4.0.7.0.0.return.i32x4.extract_lane.1.func.export.string_appeared_here.result.i64.i64x2.relaxed_laneselect.v128.const.i64x2.0.9223372036854775807.v128.const.i64x2.0.0.v128.const.i64x2.0.7.return.i64x2.extract_lane.1.async
 test): Deleted.
* JSTests/wasm/stress/simd-const-relaxed-min-max.js: Added.
(f64x2.large.magnitude.func.export.string_appeared_here.result.f64.v128.const.f64x2.1e100.1e100.v128.const.f64x2.1e100.1e100.f64x2.relaxed_min.return.f64x2.extract_lane.0.func.export.string_appeared_here.result.f64.v128.const.f64x2.1e100.1e100.v128.const.f64x2.1e100.1e100.f64x2.relaxed_max.return.f64x2.extract_lane.1.async
 test):
* JSTests/wasm/stress/simd-const-relaxed-q15mulr.js: Added.
* JSTests/wasm/stress/simd-const-relaxed-swizzle.js:
* Source/JavaScriptCore/assembler/ARM64Assembler.h:
* Source/JavaScriptCore/assembler/MacroAssemblerARM64.cpp:
(JSC::MacroAssemblerARM64::collectCPUFeatures):
* Source/JavaScriptCore/assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::supportsDotProd):
(JSC::MacroAssemblerARM64::vectorRelaxedMin):
(JSC::MacroAssemblerARM64::vectorRelaxedMax):
(JSC::MacroAssemblerARM64::vectorRelaxedQ15Mulr):
(JSC::MacroAssemblerARM64::vectorRelaxedDotI8x16I7x16):
(JSC::MacroAssemblerARM64::vectorRelaxedDotI8x16I7x16Add):
* Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::vectorRelaxedMin):
(JSC::MacroAssemblerX86_64::vectorRelaxedMax):
(JSC::MacroAssemblerX86_64::vectorRelaxedQ15Mulr):
(JSC::MacroAssemblerX86_64::vectorRelaxedDotI8x16I7x16):
(JSC::MacroAssemblerX86_64::vectorRelaxedDotI8x16I7x16Add):
* Source/JavaScriptCore/b3/B3LowerToAir.cpp:
* Source/JavaScriptCore/b3/B3Opcode.h:
* Source/JavaScriptCore/b3/B3SIMDValue.h:
* Source/JavaScriptCore/b3/B3Validate.cpp:
* Source/JavaScriptCore/b3/B3Value.cpp:
(JSC::B3::Value::effects const):
(JSC::B3::Value::key const):
* Source/JavaScriptCore/b3/B3Value.h:
* Source/JavaScriptCore/b3/B3ValueInlines.h:
* Source/JavaScriptCore/b3/B3ValueKey.cpp:
(JSC::B3::ValueKey::materialize const):
* Source/JavaScriptCore/b3/air/AirOpcode.opcodes:
* Source/JavaScriptCore/b3/testb3.h:
* Source/JavaScriptCore/b3/testb3_1.cpp:
(run):
* Source/JavaScriptCore/b3/testb3_7.cpp:
(testVectorRelaxedMinMax):
(testVectorRelaxedQ15Mulr):
(testVectorRelaxedDotI8x16I7x16):
(testVectorRelaxedDotI8x16I7x16Add):
* Source/JavaScriptCore/jit/GPRInfo.h:
(JSC::NoOverlapImpl::noOverlapImplFPRMask):
(JSC::NoOverlapImpl::noOverlapImpl):
(JSC::NoOverlapImpl::entry):
* Source/JavaScriptCore/llint/InPlaceInterpreter.asm:
* Source/JavaScriptCore/llint/InPlaceInterpreter64.asm:
* Source/JavaScriptCore/runtime/Options.cpp:
(JSC::Options::assertOptionsAreCoherent):
* Source/JavaScriptCore/wasm/WasmBBQJIT64.cpp:
(JSC::Wasm::BBQJITImpl::BBQJIT::addSIMDV_VV):
(JSC::Wasm::BBQJITImpl::BBQJIT::addSIMDRelaxedFMA):
* Source/JavaScriptCore/wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::simd):
* Source/JavaScriptCore/wasm/WasmOMGIRGenerator.cpp:
(JSC::Wasm::OMGIRGenerator::addSIMDV_VV):
(JSC::Wasm::OMGIRGenerator::addSIMDRelaxedFMA):
* Source/JavaScriptCore/wasm/WasmSIMDOpcodes.h:
(JSC::dumpSIMDLaneOperation):
(JSC::isRelaxedSIMDOperation):

Canonical link: https://commits.webkit.org/311637@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to