Implement LEA.HI shader instruction (#1609)

This commit is contained in:
gdkchan 2020-10-12 21:46:04 -03:00 committed by GitHub
parent b066cfc1a3
commit e4777717cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 57 additions and 0 deletions

View file

@ -100,5 +100,15 @@ namespace Ryujinx.Graphics.Shader.Instructions
context.Copy(GetNF(), context.FPCompareLess (dest, zero, fpType));
}
}
public static Operand AddWithCarry(EmitterContext context, Operand lhs, Operand rhs, out Operand carryOut)
{
Operand result = context.IAdd(lhs, rhs);
// C = Rd < Rn
carryOut = context.INegate(context.ICompareLessUnsigned(result, lhs));
return result;
}
}
}