Issue #3049 - Disable native regexp JIT on loongarch64

This commit is contained in:
Basilisk-Dev 2026-04-24 11:47:52 -04:00 committed by wuggy
commit 9d44c48014
4 changed files with 12 additions and 2 deletions

View file

@ -301,6 +301,11 @@ LoadContextOptions(const char* aPrefName, void* /* aClosure */)
useIon = false;
#endif
bool useNativeRegExp = GetWorkerPref<bool>(NS_LITERAL_CSTRING("native_regexp"));
#if defined(JS_CODEGEN_LOONGARCH64)
useNativeRegExp = false;
#endif
JS::ContextOptions contextOptions;
contextOptions.setAsmJS(useAsmJS)
.setWasm(useWasm)
@ -308,7 +313,7 @@ LoadContextOptions(const char* aPrefName, void* /* aClosure */)
NS_LITERAL_CSTRING("throw_on_asmjs_validation_failure")))
.setBaseline(GetWorkerPref<bool>(NS_LITERAL_CSTRING("baselinejit")))
.setIon(useIon)
.setNativeRegExp(GetWorkerPref<bool>(NS_LITERAL_CSTRING("native_regexp")))
.setNativeRegExp(useNativeRegExp)
.setAsyncStack(GetWorkerPref<bool>(NS_LITERAL_CSTRING("asyncstack")))
.setWerror(GetWorkerPref<bool>(NS_LITERAL_CSTRING("werror")))
.setStreams(GetWorkerPref<bool>(NS_LITERAL_CSTRING("streams")))