0
0
Fork 0

Decoders: Add IOpCode32HasSetFlags (#3136)

This commit is contained in:
merry 2022-02-18 00:33:43 +00:00 committed by GitHub
parent 95cc18a7b4
commit 747876dc67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 5 deletions

View file

@ -1,10 +1,8 @@
namespace ARMeilleure.Decoders namespace ARMeilleure.Decoders
{ {
interface IOpCode32Alu : IOpCode32 interface IOpCode32Alu : IOpCode32, IOpCode32HasSetFlags
{ {
int Rd { get; } int Rd { get; }
int Rn { get; } int Rn { get; }
bool? SetFlags { get; }
} }
} }

View file

@ -0,0 +1,7 @@
namespace ARMeilleure.Decoders
{
interface IOpCode32HasSetFlags
{
bool? SetFlags { get; }
}
}

View file

@ -1,6 +1,6 @@
namespace ARMeilleure.Decoders namespace ARMeilleure.Decoders
{ {
class OpCode32AluUmull : OpCode32 class OpCode32AluUmull : OpCode32, IOpCode32HasSetFlags
{ {
public int RdLo { get; } public int RdLo { get; }
public int RdHi { get; } public int RdHi { get; }

View file

@ -14,7 +14,7 @@ namespace ARMeilleure.Instructions
{ {
public static bool ShouldSetFlags(ArmEmitterContext context) public static bool ShouldSetFlags(ArmEmitterContext context)
{ {
IOpCode32Alu op = (IOpCode32Alu)context.CurrOp; IOpCode32HasSetFlags op = (IOpCode32HasSetFlags)context.CurrOp;
if (op.SetFlags == null) if (op.SetFlags == null)
{ {