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 (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…
Reference in New Issue