[ARM64_DYNAREC] Added BOX64_DYNAREC_NATIVEFLAGS to disable the use of native flags, as there is still a bug or two in that mode (for #1947)
Some checks are pending
Build and Release Box64 / build (ubuntu-latest, ANDROID, Release) (push) Waiting to run
Build and Release Box64 / build (ubuntu-latest, ANDROID, Trace) (push) Waiting to run
Build and Release Box64 / build (ubuntu-latest, ARM64, Box32) (push) Waiting to run
Build and Release Box64 / build (ubuntu-latest, ARM64, Release) (push) Waiting to run
Build and Release Box64 / build (ubuntu-latest, ARM64, StaticBuild) (push) Waiting to run
Build and Release Box64 / build (ubuntu-latest, ARM64, Trace) (push) Waiting to run
Build and Release Box64 / build (ubuntu-latest, LARCH64, Box32) (push) Waiting to run
Build and Release Box64 / build (ubuntu-latest, LARCH64, Release) (push) Waiting to run
Build and Release Box64 / build (ubuntu-latest, LARCH64, StaticBuild) (push) Waiting to run
Build and Release Box64 / build (ubuntu-latest, LARCH64, Trace) (push) Waiting to run
Build and Release Box64 / build (ubuntu-latest, RISCV, Box32) (push) Waiting to run
Build and Release Box64 / build (ubuntu-latest, RISCV, Release) (push) Waiting to run
Build and Release Box64 / build (ubuntu-latest, RISCV, StaticBuild) (push) Waiting to run
Build and Release Box64 / build (ubuntu-latest, RISCV, Trace) (push) Waiting to run
Build and Release Box64 / build (ubuntu-latest, RK3588, Box32) (push) Waiting to run
Build and Release Box64 / build (ubuntu-latest, RK3588, Release) (push) Waiting to run
Build and Release Box64 / build (ubuntu-latest, RK3588, StaticBuild) (push) Waiting to run
Build and Release Box64 / build (ubuntu-latest, RK3588, Trace) (push) Waiting to run
Build and Release Box64 / build (ubuntu-latest, TERMUX, Release) (push) Waiting to run
Build and Release Box64 / build (ubuntu-latest, TERMUX, Trace) (push) Waiting to run
Build and Release Box64 / build (ubuntu-latest, X64, Box32) (push) Waiting to run
Build and Release Box64 / build (ubuntu-latest, X64, Release) (push) Waiting to run
Build and Release Box64 / build (ubuntu-latest, X64, Trace) (push) Waiting to run

This commit is contained in:
ptitSeb 2024-10-20 13:21:08 +02:00
parent 80c346060f
commit 29beabd683
6 changed files with 21 additions and 0 deletions

View File

@ -204,6 +204,11 @@ Generated code for aligned atomics only
* 0 : The code generated can handle unaligned atomics (Default)
* 1 : Generated code only for aligned atomics (faster and less code generated, but will SEGBUS if LOCK prefix is unused on unaligned data)
#### BOX64_DYNAREC_NATIVEFLAGS *
Generate code will use native flags if possible
* 0 : The code generated whill not use native flags even when possible
* 1 : Generated code will use native flags when possible (Arm64 only for now) (Default)
#### BOX64_DYNAREC_BLEEDING_EDGE *
Detect MonoBleedingEdge and apply conservative settings
* 0 : Don't detect MonoBleedingEdge

View File

@ -90,6 +90,7 @@ int box64_dynarec_tbb = 1;
int box64_dynarec_wait = 1;
int box64_dynarec_missing = 0;
int box64_dynarec_aligned_atomics = 0;
int box64_dynarec_nativeflags = 1;
uintptr_t box64_nodynarec_start = 0;
uintptr_t box64_nodynarec_end = 0;
uintptr_t box64_dynarec_test_start = 0;
@ -883,6 +884,15 @@ void LoadLogEnv()
if(box64_dynarec_aligned_atomics)
printf_log(LOG_INFO, "Dynarec will generate only aligned atomics code\n");
}
p = getenv("BOX64_DYNAREC_NATIVEFLAGS");
if(p) {
if(strlen(p)==1) {
if(p[0]>='0' && p[0]<='1')
box64_dynarec_nativeflags = p[0]-'0';
}
if(!box64_dynarec_nativeflags)
printf_log(LOG_INFO, "Dynarec will not use native flags if possible\n");
}
p = getenv("BOX64_DYNAREC_MISSING");
if(p) {
if(strlen(p)==1) {

View File

@ -972,6 +972,8 @@ static void propagateNativeFlags(dynarec_native_t* dyn, int ninst)
void updateNatveFlags(dynarec_native_t* dyn)
{
if(!box64_dynarec_nativeflags)
return;
// backward check if native flags are used
for(int ninst=dyn->size-1; ninst>=0; --ninst)
if(dyn->insts[ninst].use_nat_flags) {

View File

@ -38,6 +38,7 @@ extern int box64_dynarec_tbb;
extern int box64_dynarec_wait;
extern int box64_dynarec_missing;
extern int box64_dynarec_aligned_atomics;
extern int box64_dynarec_nativeflags;
#ifdef ARM64
extern int arm64_asimd;
extern int arm64_aes;

View File

@ -167,6 +167,7 @@ ENTRYBOOL(BOX64_DYNAREC_TBB, box64_dynarec_tbb) \
IGNORE(BOX64_DYNAREC_HOTPAGE) \
IGNORE(BOX64_DYNAREC_FASTPAGE) \
ENTRYBOOL(BOX64_DYNAREC_ALIGNED_ATOMICS, box64_dynarec_aligned_atomics) \
ENTRYBOOL(BOX64_DYNAREC_NATIVEFLAGS, box64_dynarec_nativeflags) \
ENTRYBOOL(BOX64_DYNAREC_WAIT, box64_dynarec_wait) \
ENTRYSTRING_(BOX64_NODYNAREC, box64_nodynarec) \
ENTRYSTRING_(BOX64_DYNAREC_TEST, box64_dynarec_test) \
@ -192,6 +193,7 @@ IGNORE(BOX64_DYNAREC_TBB) \
IGNORE(BOX64_DYNAREC_HOTPAGE) \
IGNORE(BOX64_DYNAREC_FASTPAGE) \
IGNORE(BOX64_DYNAREC_ALIGNED_ATOMICS) \
IGNORE(BOX64_DYNAREC_NATIVEFLAGS) \
IGNORE(BOX64_DYNAREC_WAIT) \
IGNORE(BOX64_NODYNAREC) \
IGNORE(BOX64_DYNAREC_TEST) \

View File

@ -431,6 +431,7 @@ BOX64_DYNAREC_STRONGMEM=1
BOX64_DYNAREC_BIGBLOCK=3
BOX64_DYNAREC_CALLRET=1
BOX64_DYNAREC_SAFEFLAGS=0
BOX64_DYNAREC_NATIVEFLAGS=0
[Sunblaze.exe]
BOX64_DYNAREC_STRONGMEM=1