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

irjit: Handle VDet #18235

Merged
merged 1 commit into from
Sep 25, 2023
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
15 changes: 14 additions & 1 deletion Core/MIPS/IR/IRCompVFPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1771,7 +1771,20 @@ namespace MIPSComp {
// d[0] = s[0]*t[1] - s[1]*t[0]
// Note: this operates on two vectors, not a 2x2 matrix.

DISABLE;
VectorSize sz = GetVecSize(op);
if (sz != V_Pair)
DISABLE;

u8 sregs[4], dregs[4], tregs[4];
GetVectorRegsPrefixS(sregs, sz, _VS);
GetVectorRegsPrefixT(tregs, sz, _VT);
GetVectorRegsPrefixD(dregs, V_Single, _VD);

ir.Write(IROp::FMul, IRVTEMP_0, sregs[1], tregs[0]);
ir.Write(IROp::FMul, dregs[0], sregs[0], tregs[1]);
ir.Write(IROp::FSub, dregs[0], dregs[0], IRVTEMP_0);

ApplyPrefixD(dregs, V_Single, _VD);
}

void IRFrontend::Comp_Vi2x(MIPSOpcode op) {
Expand Down
2 changes: 1 addition & 1 deletion Core/MIPS/MIPSIntVFPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1446,7 +1446,7 @@ namespace MIPSInt
d[0] += s[2] * t[2] + s[3] * t[3];
}

ApplyPrefixD(d, sz);
ApplyPrefixD(d, V_Single);
WriteVector(d, V_Single, vd);
PC += 4;
EatPrefixes();
Expand Down