mirror of
https://github.com/ptitSeb/box64.git
synced 2025-05-08 16:18:30 +08:00
[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)
This commit is contained in:
parent
80c346060f
commit
29beabd683
@ -204,6 +204,11 @@ Generated code for aligned atomics only
|
|||||||
* 0 : The code generated can handle unaligned atomics (Default)
|
* 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)
|
* 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 *
|
#### BOX64_DYNAREC_BLEEDING_EDGE *
|
||||||
Detect MonoBleedingEdge and apply conservative settings
|
Detect MonoBleedingEdge and apply conservative settings
|
||||||
* 0 : Don't detect MonoBleedingEdge
|
* 0 : Don't detect MonoBleedingEdge
|
||||||
|
10
src/core.c
10
src/core.c
@ -90,6 +90,7 @@ int box64_dynarec_tbb = 1;
|
|||||||
int box64_dynarec_wait = 1;
|
int box64_dynarec_wait = 1;
|
||||||
int box64_dynarec_missing = 0;
|
int box64_dynarec_missing = 0;
|
||||||
int box64_dynarec_aligned_atomics = 0;
|
int box64_dynarec_aligned_atomics = 0;
|
||||||
|
int box64_dynarec_nativeflags = 1;
|
||||||
uintptr_t box64_nodynarec_start = 0;
|
uintptr_t box64_nodynarec_start = 0;
|
||||||
uintptr_t box64_nodynarec_end = 0;
|
uintptr_t box64_nodynarec_end = 0;
|
||||||
uintptr_t box64_dynarec_test_start = 0;
|
uintptr_t box64_dynarec_test_start = 0;
|
||||||
@ -883,6 +884,15 @@ void LoadLogEnv()
|
|||||||
if(box64_dynarec_aligned_atomics)
|
if(box64_dynarec_aligned_atomics)
|
||||||
printf_log(LOG_INFO, "Dynarec will generate only aligned atomics code\n");
|
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");
|
p = getenv("BOX64_DYNAREC_MISSING");
|
||||||
if(p) {
|
if(p) {
|
||||||
if(strlen(p)==1) {
|
if(strlen(p)==1) {
|
||||||
|
@ -972,6 +972,8 @@ static void propagateNativeFlags(dynarec_native_t* dyn, int ninst)
|
|||||||
|
|
||||||
void updateNatveFlags(dynarec_native_t* dyn)
|
void updateNatveFlags(dynarec_native_t* dyn)
|
||||||
{
|
{
|
||||||
|
if(!box64_dynarec_nativeflags)
|
||||||
|
return;
|
||||||
// backward check if native flags are used
|
// backward check if native flags are used
|
||||||
for(int ninst=dyn->size-1; ninst>=0; --ninst)
|
for(int ninst=dyn->size-1; ninst>=0; --ninst)
|
||||||
if(dyn->insts[ninst].use_nat_flags) {
|
if(dyn->insts[ninst].use_nat_flags) {
|
||||||
|
@ -38,6 +38,7 @@ extern int box64_dynarec_tbb;
|
|||||||
extern int box64_dynarec_wait;
|
extern int box64_dynarec_wait;
|
||||||
extern int box64_dynarec_missing;
|
extern int box64_dynarec_missing;
|
||||||
extern int box64_dynarec_aligned_atomics;
|
extern int box64_dynarec_aligned_atomics;
|
||||||
|
extern int box64_dynarec_nativeflags;
|
||||||
#ifdef ARM64
|
#ifdef ARM64
|
||||||
extern int arm64_asimd;
|
extern int arm64_asimd;
|
||||||
extern int arm64_aes;
|
extern int arm64_aes;
|
||||||
|
@ -167,6 +167,7 @@ ENTRYBOOL(BOX64_DYNAREC_TBB, box64_dynarec_tbb) \
|
|||||||
IGNORE(BOX64_DYNAREC_HOTPAGE) \
|
IGNORE(BOX64_DYNAREC_HOTPAGE) \
|
||||||
IGNORE(BOX64_DYNAREC_FASTPAGE) \
|
IGNORE(BOX64_DYNAREC_FASTPAGE) \
|
||||||
ENTRYBOOL(BOX64_DYNAREC_ALIGNED_ATOMICS, box64_dynarec_aligned_atomics) \
|
ENTRYBOOL(BOX64_DYNAREC_ALIGNED_ATOMICS, box64_dynarec_aligned_atomics) \
|
||||||
|
ENTRYBOOL(BOX64_DYNAREC_NATIVEFLAGS, box64_dynarec_nativeflags) \
|
||||||
ENTRYBOOL(BOX64_DYNAREC_WAIT, box64_dynarec_wait) \
|
ENTRYBOOL(BOX64_DYNAREC_WAIT, box64_dynarec_wait) \
|
||||||
ENTRYSTRING_(BOX64_NODYNAREC, box64_nodynarec) \
|
ENTRYSTRING_(BOX64_NODYNAREC, box64_nodynarec) \
|
||||||
ENTRYSTRING_(BOX64_DYNAREC_TEST, box64_dynarec_test) \
|
ENTRYSTRING_(BOX64_DYNAREC_TEST, box64_dynarec_test) \
|
||||||
@ -192,6 +193,7 @@ IGNORE(BOX64_DYNAREC_TBB) \
|
|||||||
IGNORE(BOX64_DYNAREC_HOTPAGE) \
|
IGNORE(BOX64_DYNAREC_HOTPAGE) \
|
||||||
IGNORE(BOX64_DYNAREC_FASTPAGE) \
|
IGNORE(BOX64_DYNAREC_FASTPAGE) \
|
||||||
IGNORE(BOX64_DYNAREC_ALIGNED_ATOMICS) \
|
IGNORE(BOX64_DYNAREC_ALIGNED_ATOMICS) \
|
||||||
|
IGNORE(BOX64_DYNAREC_NATIVEFLAGS) \
|
||||||
IGNORE(BOX64_DYNAREC_WAIT) \
|
IGNORE(BOX64_DYNAREC_WAIT) \
|
||||||
IGNORE(BOX64_NODYNAREC) \
|
IGNORE(BOX64_NODYNAREC) \
|
||||||
IGNORE(BOX64_DYNAREC_TEST) \
|
IGNORE(BOX64_DYNAREC_TEST) \
|
||||||
|
@ -431,6 +431,7 @@ BOX64_DYNAREC_STRONGMEM=1
|
|||||||
BOX64_DYNAREC_BIGBLOCK=3
|
BOX64_DYNAREC_BIGBLOCK=3
|
||||||
BOX64_DYNAREC_CALLRET=1
|
BOX64_DYNAREC_CALLRET=1
|
||||||
BOX64_DYNAREC_SAFEFLAGS=0
|
BOX64_DYNAREC_SAFEFLAGS=0
|
||||||
|
BOX64_DYNAREC_NATIVEFLAGS=0
|
||||||
|
|
||||||
[Sunblaze.exe]
|
[Sunblaze.exe]
|
||||||
BOX64_DYNAREC_STRONGMEM=1
|
BOX64_DYNAREC_STRONGMEM=1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user