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>
34 lines
1.5 KiB
Diff
34 lines
1.5 KiB
Diff
--- a/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp
|
|
+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp
|
|
@@ -520,13 +520,30 @@ WTF_ALLOW_UNSAFE_BUFFER_USAGE_END
|
|
// the jsc_llint_begin and jsc_llint_end labels help lldb_webkit.py find the
|
|
// start and end of the llint instruction range quickly.
|
|
|
|
+// On RISC-V, the linker (mold) relaxes `auipc + jalr/addi` pairs into single
|
|
+// `j`/`addi`-via-gp instructions, shrinking IPInt opcode handlers by 4 bytes
|
|
+// each. The `.balignw 256` padding that follows each handler is not recomputed
|
|
+// after relaxation, so consecutive `ipint_*_validate` labels end up 252 bytes
|
|
+// apart instead of 256, and `IPInt::initialize()`'s `VALIDATE_IPINT_OPCODE`
|
|
+// asserts fire. Suppress relaxation across the entire LLInt asm to keep all
|
|
+// 256-byte-aligned dispatch slots intact.
|
|
+#if CPU(RISCV64)
|
|
+#define OFFLINE_ASM_BEGIN_OPTIONS ".option push\n.option norelax\n"
|
|
+#define OFFLINE_ASM_END_OPTIONS ".option pop\n"
|
|
+#else
|
|
+#define OFFLINE_ASM_BEGIN_OPTIONS ""
|
|
+#define OFFLINE_ASM_END_OPTIONS ""
|
|
+#endif
|
|
+
|
|
#define OFFLINE_ASM_BEGIN __asm__( \
|
|
+ OFFLINE_ASM_BEGIN_OPTIONS \
|
|
OFFLINE_ASM_GLOBAL_LABEL_IMPL(jsc_llint_begin, OFFLINE_ASM_NO_ALT_ENTRY_DIRECTIVE, OFFLINE_ASM_ALIGN4B, HIDE_SYMBOL) \
|
|
OFFLINE_ASM_BEGIN_SPACER
|
|
|
|
#define OFFLINE_ASM_END \
|
|
OFFLINE_ASM_BEGIN_SPACER \
|
|
OFFLINE_ASM_GLOBAL_LABEL_IMPL(jsc_llint_end, OFFLINE_ASM_NO_ALT_ENTRY_DIRECTIVE, OFFLINE_ASM_ALIGN4B, HIDE_SYMBOL) \
|
|
+ OFFLINE_ASM_END_OPTIONS \
|
|
);
|
|
|
|
#if ENABLE(LLINT_EMBEDDED_OPCODE_ID)
|