mirror of
https://github.com/stenzek/duckstation.git
synced 2024-11-26 23:50:31 +00:00
CPU/NewRec/ARM32: Shifts need to be explicitly masked
This commit is contained in:
parent
a73b3ebbc6
commit
1fc7a57b21
@ -997,13 +997,14 @@ void CPU::NewRec::AArch32Compiler::Compile_variable_shift(CompileFlags cf,
|
||||
if (cf.const_s)
|
||||
{
|
||||
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())
|
||||
armAsm->mov(rd, rt);
|
||||
}
|
||||
else
|
||||
{
|
||||
(armAsm->*op)(rd, rt, CFGetRegS(cf));
|
||||
armAsm->and_(RSCRATCH, CFGetRegS(cf), 0x1Fu);
|
||||
(armAsm->*op)(rd, rt, RSCRATCH);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user