Rewrite NceAsmTable using dynamic generation instead to be more robust, fix bugs

This commit is contained in:
Gabriel A 2023-07-09 15:03:08 -03:00 committed by Emmanuel Hansen
parent c694d5774d
commit 8e23eb88bb
19 changed files with 2335 additions and 955 deletions

View file

@ -0,0 +1,43 @@
using System;
namespace Ryujinx.Cpu.Nce.Arm64
{
readonly struct Register : IEquatable<Register>
{
public int Index { get; }
public RegisterType Type { get; }
public Register(int index, RegisterType type)
{
Index = index;
Type = type;
}
public override int GetHashCode()
{
return (ushort)Index | ((int)Type << 16);
}
public static bool operator ==(Register x, Register y)
{
return x.Equals(y);
}
public static bool operator !=(Register x, Register y)
{
return !x.Equals(y);
}
public override bool Equals(object obj)
{
return obj is Register reg && Equals(reg);
}
public bool Equals(Register other)
{
return other.Index == Index &&
other.Type == Type;
}
}
}