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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
From 2e4dafd94f1413a3199eee30c6eb4ed44dc27d18 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Wed, 23 Sep 2026 14:33:27 +0100
Subject: [PATCH] JavaScriptCore: add RISCV64 to the IPInt asm WEBASSEMBLY
guards
InPlaceInterpreter.asm gates the IPInt entry, catch and table-catch
trampolines on an explicit architecture list, and selects the 64-bit
implementation file the same way. RISCV64 is absent from every one of
them, so no IPInt code is emitted at all.
Add RISCV64 to those guards and to the JSVALUE64 include of
InPlaceInterpreter64.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
.../llint/InPlaceInterpreter.asm | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
--- a/Source/JavaScriptCore/llint/InPlaceInterpreter.asm
+++ b/Source/JavaScriptCore/llint/InPlaceInterpreter.asm
@@ -1341,7 +1341,7 @@ op(wasm_throw_from_fault_handler_trampol
end)
op(ipint_entry, macro()
-if WEBASSEMBLY and (ARM64 or ARM64E or X86_64 or ARMv7)
+if WEBASSEMBLY and (ARM64 or ARM64E or X86_64 or ARMv7 or RISCV64)
preserveCallerPCAndCFR()
saveIPIntRegisters()
storep wasmInstance, CodeBlock[cfr]
@@ -1355,7 +1355,7 @@ else
end
end)
-if WEBASSEMBLY and (ARM64 or ARM64E or X86_64 or ARMv7)
+if WEBASSEMBLY and (ARM64 or ARM64E or X86_64 or ARMv7 or RISCV64)
.ipint_entry_end_local:
loadp UnboxedWasmCalleeStackSlot[cfr], MC
loadp Wasm::IPIntCallee::m_localInitBytecode + VectorBufferOffset[MC], MC
@@ -1446,7 +1446,7 @@ end
end
op(ipint_catch_entry, macro()
-if WEBASSEMBLY and (ARM64 or ARM64E or X86_64)
+if WEBASSEMBLY and (ARM64 or ARM64E or X86_64 or RISCV64)
ipintCatchCommon()
move cfr, a1
@@ -1462,7 +1462,7 @@ end
end)
op(ipint_catch_all_entry, macro()
-if WEBASSEMBLY and (ARM64 or ARM64E or X86_64)
+if WEBASSEMBLY and (ARM64 or ARM64E or X86_64 or RISCV64)
ipintCatchCommon()
move cfr, a1
@@ -1478,7 +1478,7 @@ end
end)
op(ipint_table_catch_entry, macro()
-if WEBASSEMBLY and (ARM64 or ARM64E or X86_64 or ARMv7)
+if WEBASSEMBLY and (ARM64 or ARM64E or X86_64 or ARMv7 or RISCV64)
ipintCatchCommon()
# push arguments but no ref: sp in a2, call normal operation
@@ -1496,7 +1496,7 @@ end
end)
op(ipint_table_catch_ref_entry, macro()
-if WEBASSEMBLY and (ARM64 or ARM64E or X86_64 or ARMv7)
+if WEBASSEMBLY and (ARM64 or ARM64E or X86_64 or ARMv7 or RISCV64)
ipintCatchCommon()
# push both arguments and ref
@@ -1514,7 +1514,7 @@ end
end)
op(ipint_table_catch_all_entry, macro()
-if WEBASSEMBLY and (ARM64 or ARM64E or X86_64 or ARMv7)
+if WEBASSEMBLY and (ARM64 or ARM64E or X86_64 or ARMv7 or RISCV64)
ipintCatchCommon()
# do nothing: 0 in sp for no arguments, call normal operation
@@ -1532,7 +1532,7 @@ end
end)
op(ipint_table_catch_allref_entry, macro()
-if WEBASSEMBLY and (ARM64 or ARM64E or X86_64 or ARMv7)
+if WEBASSEMBLY and (ARM64 or ARM64E or X86_64 or ARMv7 or RISCV64)
ipintCatchCommon()
# push only the ref
@@ -2085,7 +2085,7 @@ _pinballHandlerRejectFunction:
# 5. Instruction implementation #
#################################
-if JSVALUE64 and (ARM64 or ARM64E or X86_64)
+if JSVALUE64 and (ARM64 or ARM64E or X86_64 or RISCV64)
include InPlaceInterpreter64
else
# For unimplemented architectures: make sure that the assertions can still find the labels
|