summaryrefslogtreecommitdiffstats
path: root/libs/wpewebkit/patches/134-JavaScriptCore-Options-keep-BBQJIT-on-RISCV64.patch
blob: 87643e6be6c387815c438edaf552dce073b60cbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From: Daniel Golle <daniel@makrotopia.org>
Subject: [PATCH] JavaScriptCore: do not force useBBQJIT() off on RISCV64

Options.cpp force-disables a number of JIT-tier and wasm options on any
CPU other than X86_64 / ARM64. For RISCV64 these defaults remain correct
- there is no concurrent GC, no wasm SIMD codegen, and no IPInt tier
yet - except for useBBQJIT(): RISCV64 enables WEBASSEMBLY_BBQJIT in
PlatformEnable.h and BBQJIT is the only wasm execution tier available
on this architecture.

Add RISCV64 to the carve-out so useBBQJIT() retains its (true) default,
matching what is already done for ARM_THUMB2.

With ARM_THUMB2 and RISCV64 carved out, the resulting wasm tier matrix
on RISCV64 is:
  useWasmIPInt        = false  (no IPInt port)
  useWasmSIMD         = false  (no SIMD codegen)
  useBBQJIT           = true   (this change)
  useOMGJIT           = false  (no OMGJIT port)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
--- a/Source/JavaScriptCore/runtime/Options.cpp
+++ b/Source/JavaScriptCore/runtime/Options.cpp
@@ -796,7 +796,10 @@ void Options::notifyOptionsChanged()
     Options::forceUnlinkedDFG() = false;
     Options::useWasmSIMD() = false;
     Options::useWasmIPInt() = false;
-#if !CPU(ARM_THUMB2)
+#if !CPU(ARM_THUMB2) && !CPU(RISCV64)
+    // RISCV64 has BBQJIT (WEBASSEMBLY_BBQJIT enabled in PlatformEnable.h);
+    // wasm SIMD and IPInt are still off above, so BBQJIT is the only wasm
+    // tier on this architecture.
     Options::useBBQJIT() = false;
 #endif
 #endif