From 2e4dafd94f1413a3199eee30c6eb4ed44dc27d18 Mon Sep 17 00:00:00 2001 From: Daniel Golle 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 --- .../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