1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-02 22:12:02 +00:00
Ryujinx/ARMeilleure/Decoders/OpCodeSimdMemImm.cs
gdkchan 6cc187da59
SIMD&FP load/store with scale > 4 should be undefined (#1522)
* SIMD&FP load/store with scale > 4 should be undefined

* Catch more invalid encodings for FP&SIMD LDR/STR (reg variant)

* Set PTC version to PR number
2020-09-01 17:02:23 -03:00

26 lines
No EOL
703 B
C#

namespace ARMeilleure.Decoders
{
class OpCodeSimdMemImm : OpCodeMemImm, IOpCodeSimd
{
public OpCodeSimdMemImm(InstDescriptor inst, ulong address, int opCode) : base(inst, address, opCode)
{
Size |= (opCode >> 21) & 4;
if (Size > 4)
{
Instruction = InstDescriptor.Undefined;
return;
}
// Base class already shifts the immediate, we only
// need to shift it if size (scale) is 4, since this value is only set here.
if (!WBack && !Unscaled && Size == 4)
{
Immediate <<= 4;
}
Extend64 = false;
}
}
}