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] Added 66 0F D4 PADDQ opcode for vector and fixes SEW cache transform #1812

Merged
merged 2 commits into from
Sep 10, 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
8 changes: 8 additions & 0 deletions src/dynarec/rv64/dynarec_rv64_660f_vector.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,14 @@ uintptr_t dynarec64_660F_vector(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t i
VXOR_VV(q0, q0, q1, VECTOR_UNMASKED);
}
break;
case 0xD4:
INST_NAME("PADDQ Gx,Ex");
nextop = F8;
SET_ELEMENT_WIDTH(x1, VECTOR_SEW64, 1);
GETGX_vector(q0, 1, VECTOR_SEW64);
GETEX_vector(q1, 0, 0, VECTOR_SEW64);
VADD_VV(q0, q0, q1, VECTOR_UNMASKED);
break;
default:
DEFAULT_VECTOR;
}
Expand Down
7 changes: 4 additions & 3 deletions src/dynarec/rv64/dynarec_rv64_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -2437,13 +2437,14 @@ static void sewTransform(dynarec_rv64_t* dyn, int ninst, int s1)
vector_vsetvl_emul1(dyn, ninst, s1, dyn->insts[jmp].vector_sew);
}

void CacheTransform(dynarec_rv64_t* dyn, int ninst, int cacheupd, int s1, int s2, int s3) {
if (cacheupd & 4)
sewTransform(dyn, ninst, s1);
void CacheTransform(dynarec_rv64_t* dyn, int ninst, int cacheupd, int s1, int s2, int s3)
{
if (cacheupd & 2)
fpuCacheTransform(dyn, ninst, s1, s2, s3);
if (cacheupd & 1)
flagsCacheTransform(dyn, ninst, s1);
if (cacheupd & 4)
sewTransform(dyn, ninst, s1);
}


Expand Down