PPCAnalyst: Treat frspx output as single

This commit is contained in:
JosJuice 2021-05-15 18:00:56 +02:00
parent 77afb0f4c3
commit 66e912a252

View File

@ -991,7 +991,7 @@ u32 PPCAnalyzer::Analyze(u32 address, CodeBlock* block, CodeBuffer* buffer, std:
bitexact_inputs[op.inst.FC] = true; bitexact_inputs[op.inst.FC] = true;
} }
if (op.opinfo->type == OpType::SingleFP) if (op.opinfo->type == OpType::SingleFP || !strncmp(op.opinfo->opname, "frsp", 4))
{ {
fprIsSingle[op.fregOut] = true; fprIsSingle[op.fregOut] = true;
fprIsDuplicated[op.fregOut] = true; fprIsDuplicated[op.fregOut] = true;
@ -1039,8 +1039,9 @@ u32 PPCAnalyzer::Analyze(u32 address, CodeBlock* block, CodeBuffer* buffer, std:
// TODO: if we go directly from a load to a float instruction, and the value isn't used // TODO: if we go directly from a load to a float instruction, and the value isn't used
// for anything else, we can use fast single -> double conversion after the load. // for anything else, we can use fast single -> double conversion after the load.
fprIsStoreSafe[op.fregOut] = fprIsStoreSafe[op.fregOut] = op.opinfo->type == OpType::SingleFP ||
(op.opinfo->type == OpType::SingleFP || op.opinfo->type == OpType::PS); op.opinfo->type == OpType::PS ||
!strncmp(op.opinfo->opname, "frsp", 4);
} }
} }
op.fprIsStoreSafeAfterInst = fprIsStoreSafe; op.fprIsStoreSafeAfterInst = fprIsStoreSafe;