mirror of
https://github.com/openwrt/video.git
synced 2026-05-31 06:51:54 +08:00
df0b899123
Update WPEWebKit to the 2.52 stable major release branch. Includes a pending patchset to get WASM BBQJIT working on RISCV64, upstream PR https://github.com/WebKit/WebKit/pull/65621 Alltogether this brings acceptable performance (even with LLVMPipe Mesa software renderer) on RISCV64. Link: https://wpewebkit.org/release/wpewebkit-2.52.0.html Link: https://wpewebkit.org/release/wpewebkit-2.52.1.html Link: https://wpewebkit.org/release/wpewebkit-2.52.2.html Link: https://wpewebkit.org/release/wpewebkit-2.52.3.html Signed-off-by: Daniel Golle <daniel@makrotopia.org>
22 lines
1.1 KiB
Diff
22 lines
1.1 KiB
Diff
--- a/Source/JavaScriptCore/wasm/WasmOperations.cpp
|
|
+++ b/Source/JavaScriptCore/wasm/WasmOperations.cpp
|
|
@@ -135,8 +135,17 @@ JSC_DEFINE_JIT_OPERATION(operationJSToWa
|
|
|
|
dataLogLnIf(WasmOperationsInternal::verbose, "* Register Arg ", i, " ", dst);
|
|
|
|
- if (type.isI32() || type.isF32())
|
|
+ if (type.isI32())
|
|
value = static_cast<uint64_t>(static_cast<uint32_t>(value));
|
|
+ else if (type.isF32()) {
|
|
+ // Pack as NaN-boxed single (high 32 = 0xFFFFFFFF) so that
|
|
+ // the shared trampoline's loadDouble into the FPR yields a
|
|
+ // properly NaN-boxed single. Otherwise on architectures
|
|
+ // that enforce NaN-boxing for single-precision ops
|
|
+ // (RV64GC), the wasm body's subsequent flw/fsw on the f-arg
|
|
+ // sees the canonical NaN instead of the actual f32 value.
|
|
+ value = static_cast<uint64_t>(static_cast<uint32_t>(value)) | 0xFFFFFFFF00000000ULL;
|
|
+ }
|
|
*access.operator()<uint64_t>(registerSpace, dst) = value;
|
|
}
|
|
}
|