This commit is contained in:
Henrik Rydgard committed 2016-05-12 20:28:59 +02:00
1 parent c69a8c07dc
commit 1851458628
2 files changed
+21 -4

No files matched your search

+2
View File
@@ -1297,6 +1297,8 @@ namespace MIPSComp {
}
void Arm64Jit::Comp_Vi2x(MIPSOpcode op) {
CONDITIONAL_DISABLE;
if (!cpu_info.bNEON) {
DISABLE;
}
+19 -4
View File
@@ -1127,26 +1127,41 @@ namespace MIPSComp {
GetVectorRegs(tregs, sz, _VT);
GetVectorRegs(dregs, sz, _VD);
int tempregs[4];
for (int i = 0; i < n; ++i) {
if (!IsOverlapSafe(dregs[i], n, sregs, n, tregs)) {
tempregs[i] = IRVTEMP_PFX_T + i; // using IRTEMP0 for other things
} else {
tempregs[i] = dregs[i];
}
}
if (sz == V_Triple) {
int temp0 = IRVTEMP_0;
int temp1 = IRVTEMP_0 + 1;
// Compute X
ir.Write(IROp::FMul, temp0, sregs[1], tregs[2]);
ir.Write(IROp::FMul, temp1, sregs[2], tregs[1]);
ir.Write(IROp::FSub, dregs[0], temp0, temp1);
ir.Write(IROp::FSub, tempregs[0], temp0, temp1);
// Compute Y
ir.Write(IROp::FMul, temp0, sregs[2], tregs[0]);
ir.Write(IROp::FMul, temp1, sregs[0], tregs[2]);
ir.Write(IROp::FSub, dregs[1], temp0, temp1);
ir.Write(IROp::FSub, tempregs[1], temp0, temp1);
// Compute Z
ir.Write(IROp::FMul, temp0, sregs[0], tregs[1]);
ir.Write(IROp::FMul, temp1, sregs[1], tregs[0]);
ir.Write(IROp::FSub, dregs[2], temp0, temp1);
ir.Write(IROp::FSub, tempregs[2], temp0, temp1);
} else if (sz == V_Quad) {
DISABLE;
}
for (int i = 0; i < n; i++) {
if (tempregs[i] != dregs[i])
ir.Write(IROp::FMov, dregs[i], tempregs[i]);
}
// No D prefix supported
}
void IRFrontend::Comp_Vcmp(MIPSOpcode op) {
@@ -1232,7 +1247,7 @@ namespace MIPSComp {
int tempregs[4];
for (int i = 0; i < n; ++i) {
if (!IsOverlapSafe(dregs[i], n, sregs)) {
tempregs[i] = IRVTEMP_PFX_T; // using IRTEMP0 for other things
tempregs[i] = IRVTEMP_PFX_T + i; // using IRTEMP0 for other things
} else {
tempregs[i] = dregs[i];
}