mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-29 15:26:03 +00:00
36b9ab0e48
* Remove ARM32 interpreter and add ARM32 support on the translator * Nits. * Rename Cond -> Condition * Align code again * Rename Data to Alu * Enable ARM32 support and handle undefined instructions * Use the IsThumb method to check if its a thumb opcode * Remove another 32-bits check
40 lines
No EOL
1 KiB
C#
40 lines
No EOL
1 KiB
C#
using ChocolArm64.Instructions;
|
|
using ChocolArm64.State;
|
|
using System;
|
|
|
|
namespace ChocolArm64.Decoders
|
|
{
|
|
class OpCode64 : IOpCode64
|
|
{
|
|
public long Position { get; private set; }
|
|
public int RawOpCode { get; private set; }
|
|
|
|
public int OpCodeSizeInBytes { get; protected set; } = 4;
|
|
|
|
public InstEmitter Emitter { get; protected set; }
|
|
public RegisterSize RegisterSize { get; protected set; }
|
|
|
|
public OpCode64(Inst inst, long position, int opCode)
|
|
{
|
|
Position = position;
|
|
RawOpCode = opCode;
|
|
|
|
RegisterSize = RegisterSize.Int64;
|
|
|
|
Emitter = inst.Emitter;
|
|
}
|
|
|
|
public int GetBitsCount()
|
|
{
|
|
switch (RegisterSize)
|
|
{
|
|
case RegisterSize.Int32: return 32;
|
|
case RegisterSize.Int64: return 64;
|
|
case RegisterSize.Simd64: return 64;
|
|
case RegisterSize.Simd128: return 128;
|
|
}
|
|
|
|
throw new InvalidOperationException();
|
|
}
|
|
}
|
|
} |