mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-12 22:37:21 +00:00
CPU/NewRec/ARM32: Shifts need to be explicitly masked
This commit is contained in:
parent
5c03e1d940
commit
d2d06adeeb
@ -997,13 +997,14 @@ void CPU::NewRec::AArch32Compiler::Compile_variable_shift(CompileFlags cf,
|
|||||||
if (cf.const_s)
|
if (cf.const_s)
|
||||||
{
|
{
|
||||||
if (const u32 shift = GetConstantRegU32(cf.MipsS()); shift != 0)
|
if (const u32 shift = GetConstantRegU32(cf.MipsS()); shift != 0)
|
||||||
(armAsm->*op)(rd, rt, shift);
|
(armAsm->*op)(rd, rt, shift & 0x1Fu);
|
||||||
else if (rd.GetCode() != rt.GetCode())
|
else if (rd.GetCode() != rt.GetCode())
|
||||||
armAsm->mov(rd, rt);
|
armAsm->mov(rd, rt);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
(armAsm->*op)(rd, rt, CFGetRegS(cf));
|
armAsm->and_(RSCRATCH, CFGetRegS(cf), 0x1Fu);
|
||||||
|
(armAsm->*op)(rd, rt, RSCRATCH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user