Skip to content

Commit

Permalink
[CORE] Enhanced BOX64_DYNAREC_RV64NOEXT (#2065)
Browse files Browse the repository at this point in the history
  • Loading branch information
xctan authored Nov 24, 2024
1 parent 3bde222 commit ab65422
Showing 1 changed file with 24 additions and 32 deletions.
56 changes: 24 additions & 32 deletions src/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,39 +534,31 @@ HWCAP2_AFP
void RV64_Detect_Function();
// private env. variable for the developer ;)
char *p = getenv("BOX64_DYNAREC_RV64NOEXT");
if(p == NULL || p[0] == '0')
if(p == NULL || strcasecmp(p, "1")) {
RV64_Detect_Function();
if (p != NULL && !strcasecmp(p, "vector")) {
RV64_Detect_Function();
rv64_vector = 0;
rv64_xtheadvector = 0;
} else if (p != NULL && !strcasecmp(p, "zba")) {
RV64_Detect_Function();
rv64_zba = 0;
} else if (p != NULL && !strcasecmp(p, "zbb")) {
RV64_Detect_Function();
rv64_zbb = 0;
} else if (p != NULL && !strcasecmp(p, "zbc")) {
RV64_Detect_Function();
rv64_zbc = 0;
} else if (p != NULL && !strcasecmp(p, "zbs")) {
RV64_Detect_Function();
rv64_zbs = 0;
} else if (p != NULL && !strcasecmp(p, "xtheadba")) {
RV64_Detect_Function();
rv64_xtheadba = 0;
} else if (p != NULL && !strcasecmp(p, "xtheadbb")) {
RV64_Detect_Function();
rv64_xtheadbb = 0;
} else if (p != NULL && !strcasecmp(p, "xtheadbs")) {
RV64_Detect_Function();
rv64_xtheadbs = 0;
} else if (p != NULL && !strcasecmp(p, "xtheadmempair")) {
RV64_Detect_Function();
rv64_xtheadmempair = 0;
} else if (p != NULL && !strcasecmp(p, "xtheadcondmov")) {
RV64_Detect_Function();
rv64_xtheadcondmov = 0;
if (p) {
p = strtok(p, ",");
while (p) {
if (!strcasecmp(p, "zba")) rv64_zba = 0;
if (!strcasecmp(p, "zbb")) rv64_zbb = 0;
if (!strcasecmp(p, "zbc")) rv64_zbc = 0;
if (!strcasecmp(p, "zbs")) rv64_zbs = 0;
if (!strcasecmp(p, "vector")) {
rv64_vector = 0;
rv64_xtheadvector = 0;
}
if (!strcasecmp(p, "xtheadba")) rv64_xtheadba = 0;
if (!strcasecmp(p, "xtheadbb")) rv64_xtheadbb = 0;
if (!strcasecmp(p, "xtheadbs")) rv64_xtheadbs = 0;
// if (!strcasecmp(p, "xtheadmemidx")) rv64_xtheadmemidx = 0;
// if (!strcasecmp(p, "xtheadfmemidx")) rv64_xtheadfmemidx = 0;
// if (!strcasecmp(p, "xtheadmac")) rv64_xtheadmac = 0;
// if (!strcasecmp(p, "xtheadfmv")) rv64_xtheadfmv = 0;
if (!strcasecmp(p, "xtheadmempair")) rv64_xtheadmempair = 0;
if (!strcasecmp(p, "xtheadcondmov")) rv64_xtheadcondmov = 0;
p = strtok(NULL, ",");
}
}
}

printf_log(LOG_INFO, "Dynarec for RISC-V ");
Expand Down

0 comments on commit ab65422

Please sign in to comment.