mirror of
https://github.com/stenzek/duckstation.git
synced 2026-10-11 22:49:58 +00:00
CPU/Recompiler: Truncate ARM64 multiplication results in LO
Clear the upper product bits after extracting HI so an MFLO register rename cannot carry them into a guest fastmem address.
This commit is contained in:
@@ -1547,6 +1547,7 @@ void CPU::ARM64Recompiler::Compile_mult(CompileFlags cf, bool sign)
|
||||
|
||||
(sign) ? armAsm->smull(lo.X(), rs, rt) : armAsm->umull(lo.X(), rs, rt);
|
||||
armAsm->lsr(hi.X(), lo.X(), 32);
|
||||
armAsm->mov(lo, lo); // Clear upper product bits before LO can be renamed to a GPR.
|
||||
}
|
||||
|
||||
void CPU::ARM64Recompiler::Compile_mult(CompileFlags cf)
|
||||
|
||||
Reference in New Issue
Block a user