Jit64: load second operator for double intrutions

SSE do support non-vector instructions, but they _all_ overwrite the dest register
if the src location isn't a register. (wtf?)
So we have to load the src into a temporay register :(
This commit is contained in:
degasus 2013-12-09 22:35:17 +01:00
parent 2fad2a3e88
commit 5eab3239bb

View File

@ -19,6 +19,10 @@ void Jit64::fp_tri_op(int d, int a, int b, bool reversible, bool single, void (X
if (d == a) if (d == a)
{ {
fpr.BindToRegister(d, true); fpr.BindToRegister(d, true);
if(!single)
{
fpr.BindToRegister(b, true, false);
}
(this->*op)(fpr.RX(d), fpr.R(b)); (this->*op)(fpr.RX(d), fpr.R(b));
} }
else if (d == b) else if (d == b)
@ -26,6 +30,10 @@ void Jit64::fp_tri_op(int d, int a, int b, bool reversible, bool single, void (X
if (reversible) if (reversible)
{ {
fpr.BindToRegister(d, true); fpr.BindToRegister(d, true);
if(!single)
{
fpr.BindToRegister(a, true, false);
}
(this->*op)(fpr.RX(d), fpr.R(a)); (this->*op)(fpr.RX(d), fpr.R(a));
} }
else else
@ -40,6 +48,10 @@ void Jit64::fp_tri_op(int d, int a, int b, bool reversible, bool single, void (X
{ {
// Sources different from d, can use rather quick solution // Sources different from d, can use rather quick solution
fpr.BindToRegister(d, !single); fpr.BindToRegister(d, !single);
if(!single)
{
fpr.BindToRegister(b, true, false);
}
MOVSD(fpr.RX(d), fpr.R(a)); MOVSD(fpr.RX(d), fpr.R(a));
(this->*op)(fpr.RX(d), fpr.R(b)); (this->*op)(fpr.RX(d), fpr.R(b));
} }