--- a/Source/JavaScriptCore/llint/InPlaceInterpreter.h +++ b/Source/JavaScriptCore/llint/InPlaceInterpreter.h @@ -784,7 +784,7 @@ extern "C" void SYSV_ABI ipint_entry(); m(0x11, uint_stack_vector) \ m(0x12, uint_ret) \ -#if !ENABLE(C_LOOP) && (CPU(ADDRESS64) && (CPU(ARM64) || CPU(X86_64)) || (CPU(ADDRESS32) && CPU(ARM_THUMB2))) +#if !ENABLE(C_LOOP) && (CPU(ADDRESS64) && (CPU(ARM64) || CPU(X86_64) || CPU(RISCV64)) || (CPU(ADDRESS32) && CPU(ARM_THUMB2))) FOR_EACH_IPINT_OPCODE(IPINT_VALIDATE_DEFINE_FUNCTION); FOR_EACH_IPINT_GC_OPCODE(IPINT_VALIDATE_DEFINE_FUNCTION); FOR_EACH_IPINT_CONVERSION_OPCODE(IPINT_VALIDATE_DEFINE_FUNCTION); --- a/Source/JavaScriptCore/llint/InPlaceInterpreter.cpp +++ b/Source/JavaScriptCore/llint/InPlaceInterpreter.cpp @@ -69,7 +69,7 @@ do { \ void initialize() { -#if !ENABLE(C_LOOP) && ((CPU(ADDRESS64) && (CPU(ARM64) || CPU(X86_64))) || (CPU(ADDRESS32) && CPU(ARM_THUMB2))) +#if !ENABLE(C_LOOP) && ((CPU(ADDRESS64) && (CPU(ARM64) || CPU(X86_64) || CPU(RISCV64))) || (CPU(ADDRESS32) && CPU(ARM_THUMB2))) #define INIT_IPINT_BASE_POINTER(basePointerName, targetAddress) \ g_opcodeConfig.basePointerName = removeCodePtrTag(reinterpret_cast(targetAddress)); @@ -88,13 +88,19 @@ void initialize() FOR_EACH_IPINT_MINT_RETURN_OPCODE(VALIDATE_IPINT_MINT_RETURN_OPCODE); FOR_EACH_IPINT_UINT_OPCODE(VALIDATE_IPINT_UINT_OPCODE); #else - RELEASE_ASSERT_NOT_REACHED("IPInt only supports ARM64 and X86_64 (for now)."); + // No IPInt opcode dispatch table on this architecture: offlineasm + // does not emit the ipint_*_validate entry points outside the guard + // above, so there is nothing to validate. LLInt::initialize() calls + // us unconditionally; just return. Options::useWasmIPInt is forced + // false on such architectures (see Options.cpp), so the + // (uninitialised) g_opcodeConfig dispatch base pointers are never + // read at run time. #endif } void verifyInitialization() { -#if !ENABLE(C_LOOP) && ((CPU(ADDRESS64) && (CPU(ARM64) || CPU(X86_64))) || (CPU(ADDRESS32) && CPU(ARM_THUMB2))) +#if !ENABLE(C_LOOP) && ((CPU(ADDRESS64) && (CPU(ARM64) || CPU(X86_64) || CPU(RISCV64))) || (CPU(ADDRESS32) && CPU(ARM_THUMB2))) #define VERIFY_IPINT_BASE_POINTER(basePointerName, targetAddress) \ RELEASE_ASSERT(g_opcodeConfig.basePointerName == removeCodePtrTag(reinterpret_cast(targetAddress)));