Fix missing MAC flag clears

This commit is contained in:
hch12907 2018-09-08 17:09:42 +08:00
parent c9c5e21b16
commit 16b3570c4b

View file

@ -38,6 +38,10 @@ void CVuInterpreter::ABS(VuUnit_Base* unit, const VuInstruction inst)
reg_dest.write_float(field, result);
}
else
{
unit->mac.clear_vector_field(field);
}
}
}
@ -1470,6 +1474,10 @@ void CVuInterpreter::MAX(VuUnit_Base* unit, const VuInstruction inst)
const f32 b = reg_source_2.read_float(field);
reg_dest.write_float(field, std::max(a, b));
}
else
{
unit->mac.clear_vector_field(field);
}
}
}
@ -1489,6 +1497,10 @@ void CVuInterpreter::MAXi(VuUnit_Base* unit, const VuInstruction inst)
const f32 b = reg_source_2.read_float();
reg_dest.write_float(field, std::max(a, b));
}
else
{
unit->mac.clear_vector_field(field);
}
}
}
@ -1510,6 +1522,10 @@ void CVuInterpreter::MAXbc(VuUnit_Base* unit, const VuInstruction inst, const in
const f32 b = reg_source_2.read_float(bc);
reg_dest.write_float(field, std::max(a, b));
}
else
{
unit->mac.clear_vector_field(field);
}
}
}
@ -1553,6 +1569,10 @@ void CVuInterpreter::MINI(VuUnit_Base* unit, const VuInstruction inst)
const f32 b = reg_source_2.read_float(field);
reg_dest.write_float(field, std::min(a, b));
}
else
{
unit->mac.clear_vector_field(field);
}
}
}
@ -1572,6 +1592,10 @@ void CVuInterpreter::MINIi(VuUnit_Base* unit, const VuInstruction inst)
const f32 b = reg_source_2.read_float();
reg_dest.write_float(field, std::min(a, b));
}
else
{
unit->mac.clear_vector_field(field);
}
}
}
@ -1593,6 +1617,10 @@ void CVuInterpreter::MINIbc(VuUnit_Base* unit, const VuInstruction inst, const i
const f32 b = reg_source_2.read_float(bc);
reg_dest.write_float(field, std::min(a, b));
}
else
{
unit->mac.clear_vector_field(field);
}
}
}