Some more constant support for MUL_SUB.
This commit is contained in:
parent
d8be8fdbbb
commit
a9b89a790b
|
@ -4515,16 +4515,31 @@ struct MUL_SUB_V128
|
||||||
// FMA extension
|
// FMA extension
|
||||||
if (e.IsFeatureEnabled(kX64EmitFMA)) {
|
if (e.IsFeatureEnabled(kX64EmitFMA)) {
|
||||||
if (i.dest == i.src1) {
|
if (i.dest == i.src1) {
|
||||||
|
if (i.src3.is_constant) {
|
||||||
|
e.LoadConstantXmm(e.xmm0, i.src3.constant());
|
||||||
|
e.vfmsub213ps(i.dest, i.src2, e.xmm0);
|
||||||
|
} else {
|
||||||
e.vfmsub213ps(i.dest, i.src2, i.src3);
|
e.vfmsub213ps(i.dest, i.src2, i.src3);
|
||||||
|
}
|
||||||
} else if (i.dest == i.src2) {
|
} else if (i.dest == i.src2) {
|
||||||
|
if (i.src3.is_constant) {
|
||||||
|
e.LoadConstantXmm(e.xmm0, i.src3.constant());
|
||||||
|
e.vfmsub213ps(i.dest, i.src1, e.xmm0);
|
||||||
|
} else {
|
||||||
e.vfmsub213ps(i.dest, i.src1, i.src3);
|
e.vfmsub213ps(i.dest, i.src1, i.src3);
|
||||||
|
}
|
||||||
} else if (i.dest == i.src3) {
|
} else if (i.dest == i.src3) {
|
||||||
e.vfmsub231ps(i.dest, i.src1, i.src2);
|
e.vfmsub231ps(i.dest, i.src1, i.src2);
|
||||||
} else {
|
} else {
|
||||||
// Dest not equal to anything
|
// Dest not equal to anything.
|
||||||
e.vmovdqa(i.dest, i.src1);
|
e.vmovdqa(i.dest, i.src1);
|
||||||
|
if (i.src3.is_constant) {
|
||||||
|
e.LoadConstantXmm(e.xmm0, i.src3.constant());
|
||||||
|
e.vfmsub213ps(i.dest, i.src2, e.xmm0);
|
||||||
|
} else {
|
||||||
e.vfmsub213ps(i.dest, i.src2, i.src3);
|
e.vfmsub213ps(i.dest, i.src2, i.src3);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Xmm src3;
|
Xmm src3;
|
||||||
if (i.src3.is_constant) {
|
if (i.src3.is_constant) {
|
||||||
|
|
Loading…
Reference in New Issue