mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-06-28 15:30:48 -07:00
Implement UHADD8 instruction (#2908)
* Implement UHADD8 instruction along with a test unit * Update PTC revision number
This commit is contained in:
@ -472,6 +472,24 @@ namespace ARMeilleure.Instructions
|
||||
EmitDiv(context, true);
|
||||
}
|
||||
|
||||
public static void Uhadd8(ArmEmitterContext context)
|
||||
{
|
||||
OpCode32AluReg op = (OpCode32AluReg)context.CurrOp;
|
||||
|
||||
Operand m = GetIntA32(context, op.Rm);
|
||||
Operand n = GetIntA32(context, op.Rn);
|
||||
|
||||
Operand xor, res;
|
||||
|
||||
res = context.BitwiseAnd(m, n);
|
||||
xor = context.BitwiseExclusiveOr(m, n);
|
||||
xor = context.ShiftRightUI(xor, Const(1));
|
||||
xor = context.BitwiseAnd(xor, Const(0x7F7F7F7Fu));
|
||||
res = context.Add(res, xor);
|
||||
|
||||
SetIntA32(context, op.Rd, res);
|
||||
}
|
||||
|
||||
public static void Usat(ArmEmitterContext context)
|
||||
{
|
||||
OpCode32Sat op = (OpCode32Sat)context.CurrOp;
|
||||
|
@ -541,6 +541,7 @@ namespace ARMeilleure.Instructions
|
||||
Trap,
|
||||
Tst,
|
||||
Ubfx,
|
||||
Uhadd8,
|
||||
Umaal,
|
||||
Umlal,
|
||||
Umull,
|
||||
|
Reference in New Issue
Block a user