2018-03-05 20:18:37 +01:00
|
|
|
using ChocolArm64.Instruction;
|
|
|
|
|
|
|
|
namespace ChocolArm64.Decoder
|
|
|
|
{
|
|
|
|
class AOpCodeSimdRegElemF : AOpCodeSimdReg
|
|
|
|
{
|
|
|
|
public int Index { get; private set; }
|
|
|
|
|
|
|
|
public AOpCodeSimdRegElemF(AInst Inst, long Position, int OpCode) : base(Inst, Position, OpCode)
|
|
|
|
{
|
2018-10-14 04:35:16 +02:00
|
|
|
switch ((OpCode >> 21) & 3) // sz:L
|
2018-03-05 20:18:37 +01:00
|
|
|
{
|
2018-10-14 04:35:16 +02:00
|
|
|
case 0: // H:0
|
|
|
|
Index = (OpCode >> 10) & 2; // 0, 2
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 1: // H:1
|
|
|
|
Index = (OpCode >> 10) & 2;
|
|
|
|
Index++; // 1, 3
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 2: // H
|
|
|
|
Index = (OpCode >> 11) & 1; // 0, 1
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
default: Emitter = AInstEmit.Und; return;
|
2018-03-05 20:18:37 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-10-14 04:35:16 +02:00
|
|
|
}
|