Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RV64_DYNAREC] Detect vector extension #1619

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ int rv64_zba = 0;
int rv64_zbb = 0;
int rv64_zbc = 0;
int rv64_zbs = 0;
int rv64_vector = 0;
int rv64_xtheadba = 0;
int rv64_xtheadbb = 0;
int rv64_xtheadbs = 0;
Expand Down Expand Up @@ -501,6 +502,7 @@ 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");
if(rv64_xtheadba) printf_log(LOG_INFO, " XTheadBa");
if(rv64_xtheadbb) printf_log(LOG_INFO, " XTheadBb");
if(rv64_xtheadbs) printf_log(LOG_INFO, " XTheadBs");
Expand Down
1 change: 1 addition & 0 deletions src/include/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ extern int rv64_zba;
extern int rv64_zbb;
extern int rv64_zbc;
extern int rv64_zbs;
extern int rv64_vector;
extern int rv64_xtheadba;
extern int rv64_xtheadbb;
extern int rv64_xtheadbs;
Expand Down
5 changes: 5 additions & 0 deletions src/rv64detect.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ void RV64_Detect_Function()
BR(xRA);
rv64_zbs = Check(my_block);

// Test Vector v1.0 with CSRR zero, vcsr
CSRRS(xZR, xZR, 0x00f);
BR(xRA);
rv64_vector = Check(my_block);

// THead vendor extensions
if (!rv64_zba) {
// Test XTheadBa with TH_ADDSL
Expand Down