Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d449735fb88069ee4760cd99ad3f7cf157976224
      
https://github.com/WebKit/WebKit/commit/d449735fb88069ee4760cd99ad3f7cf157976224
  Author: Marcus Plutowski <[email protected]>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    A JSTests/wasm/stress/fp-nan-minmax.js
    M Source/JavaScriptCore/wasm/WasmBBQJIT.cpp
    M Source/JavaScriptCore/wasm/WasmBBQJIT.h

  Log Message:
  -----------
  Propogate NaNs thru constant-folded min/max in BBQ JIT
https://bugs.webkit.org/show_bug.cgi?id=270262
rdar://120540053

Reviewed by Keith Miller.

During constant-folding we use std::min/std::max, which the C++ standard
defines as treating NaNs as "missing values" and therefore returning the
non-NaN value, while conversely WASM expects us to propogate the NaN
operand in all cases.

* JSTests/wasm/stress/fp-nan-minmax.js: Added.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.func.export.string_appeared_here.param.f32.f32.result.f32.local.0.local.1.f32.min.func.export.string_appeared_here.param.f32.f32.result.f32.local.0.local.1.f32.max.func.export.string_appeared_here.param.f64.f64.result.f64.local.0.local.1.f64.min.func.export.string_appeared_here.param.f64.f64.result.f64.local.0.local.1.f64.max.async
 test):
* Source/JavaScriptCore/wasm/WasmBBQJIT.cpp:
(JSC::Wasm::BBQJITImpl::BBQJIT::addF32Min):
(JSC::Wasm::BBQJITImpl::BBQJIT::addF64Min):
(JSC::Wasm::BBQJITImpl::BBQJIT::addF32Max):
(JSC::Wasm::BBQJITImpl::BBQJIT::addF64Max):
* Source/JavaScriptCore/wasm/WasmBBQJIT.h:
(JSC::Wasm::BBQJITImpl::BBQJIT::computeFloatingPointMinOrMax):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to