commit 776588aa7902ed4bac9831a6127163f24bc13b5b
parent 834918e43e386947cdaae2e5b93d5b96f51f7232
Author: Xuan Chen <henry.chen@oss.cipunited.com>
Date: Tue, 11 Nov 2025 18:04:46 +0000
Bug 1997517 - Part 1: [mips64] Allow R2 features to be disabled for the simulator. r=anba
The R2 feature is enabled by default, and this patch allows it to be
disabled to test MIPS III compatibility using the simulator.
Differential Revision: https://phabricator.services.mozilla.com/D271756
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/js/src/jit/mips-shared/Architecture-mips-shared.cpp b/js/src/jit/mips-shared/Architecture-mips-shared.cpp
@@ -31,7 +31,9 @@ static uint32_t get_mips_flags() {
#if defined(JS_SIMULATOR_MIPS64)
flags |= HWCAP_FPU;
- flags |= HWCAP_R2;
+ if (!getenv("MIPS_PRE_R2")) {
+ flags |= HWCAP_R2;
+ }
#else
# ifdef __linux__
FILE* fp = fopen("/proc/cpuinfo", "r");