about summary refs log tree commit diff stats
path: root/src/core.c
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2024-10-02 15:53:29 +0800
committerGitHub <noreply@github.com>2024-10-02 09:53:29 +0200
commitc43d34d0cf680d9c8172f18a35d102524018f234 (patch)
tree95c0534581ea248dc9f3e68fb3bdcd0f9efb9bde /src/core.c
parenta188f4ebfe0fbf9f46601c683a686c23a1513ee7 (diff)
downloadbox64-c43d34d0cf680d9c8172f18a35d102524018f234.tar.gz
box64-c43d34d0cf680d9c8172f18a35d102524018f234.zip
[RV64_DYNAREC] Added preliminary xtheadvector support (#1892)
* [RV64_DYNAREC] Added preliminary xtheadvector support

* [RV64_DYNAREC] Fixed more unaligned issue
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/core.c b/src/core.c
index 3804a577..31cb413d 100644
--- a/src/core.c
+++ b/src/core.c
@@ -112,7 +112,8 @@ int rv64_zba = 0;
 int rv64_zbb = 0;
 int rv64_zbc = 0;
 int rv64_zbs = 0;
-int rv64_vector = 0;
+int rv64_vector = 0; // rvv 1.0 or xtheadvector
+int rv64_xtheadvector = 0;
 int rv64_vlen = 0;
 int rv64_xtheadba = 0;
 int rv64_xtheadbb = 0;
@@ -516,6 +517,7 @@ HWCAP2_AFP
     if (p != NULL && !strcasecmp(p, "vector")) {
         RV64_Detect_Function();
         rv64_vector = 0;
+        rv64_xtheadvector = 0;
     }
     printf_log(LOG_INFO, "Dynarec for RISC-V ");
     printf_log(LOG_INFO, "With extension: I M A F D C");
@@ -523,16 +525,18 @@ HWCAP2_AFP
     if(rv64_zbb) printf_log(LOG_INFO, " Zbb");
     if(rv64_zbc) printf_log(LOG_INFO, " Zbc");
     if(rv64_zbs) printf_log(LOG_INFO, " Zbs");
-    if (rv64_vector) printf_log(LOG_INFO, " Vector (vlen: %d)", rv64_vlen);
+    if (rv64_vector && !rv64_xtheadvector) printf_log(LOG_INFO, " Vector (vlen: %d)", rv64_vlen);
+    if (rv64_xtheadvector) printf_log(LOG_INFO, " XTheadVector (vlen: %d)", rv64_vlen);
     if(rv64_xtheadba) printf_log(LOG_INFO, " XTheadBa");
     if(rv64_xtheadbb) printf_log(LOG_INFO, " XTheadBb");
     if(rv64_xtheadbs) printf_log(LOG_INFO, " XTheadBs");
-    if(rv64_xtheadcondmov) printf_log(LOG_INFO, " XTheadCondMov");
-    if(rv64_xtheadmemidx) printf_log(LOG_INFO, " XTheadMemIdx");
-    if(rv64_xtheadmempair) printf_log(LOG_INFO, " XTheadMemPair");
-    if(rv64_xtheadfmemidx) printf_log(LOG_INFO, " XTheadFMemIdx");
-    if(rv64_xtheadmac) printf_log(LOG_INFO, " XTheadMac");
-    if(rv64_xtheadfmv) printf_log(LOG_INFO, " XTheadFmv");
+    if (rv64_xtheadmempair) printf_log(LOG_INFO, " XTheadMemPair");
+    // Disable the display since these are only detected but never used.
+    // if(rv64_xtheadcondmov) printf_log(LOG_INFO, " XTheadCondMov");
+    // if(rv64_xtheadmemidx) printf_log(LOG_INFO, " XTheadMemIdx");
+    // if(rv64_xtheadfmemidx) printf_log(LOG_INFO, " XTheadFMemIdx");
+    // if(rv64_xtheadmac) printf_log(LOG_INFO, " XTheadMac");
+    // if(rv64_xtheadfmv) printf_log(LOG_INFO, " XTheadFmv");
 #else
 #error Unsupported architecture
 #endif