mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-28 03:23:05 +00:00
b2b736abc2
* Fix typos * Remove unneeded using statements * Enforce var style more * Remove redundant qualifiers * Fix some indentation * Disable naming warnings on files with external enum names * Fix build * Mass find & replace for comments with no spacing * Standardize todo capitalization and for/if spacing
30 lines
No EOL
871 B
C#
30 lines
No EOL
871 B
C#
using Ryujinx.Graphics.Shader.Instructions;
|
|
|
|
namespace Ryujinx.Graphics.Shader.Decoders
|
|
{
|
|
class OpCode
|
|
{
|
|
public InstEmitter Emitter { get; }
|
|
|
|
public ulong Address { get; }
|
|
public long RawOpCode { get; }
|
|
|
|
public Register Predicate { get; protected set; }
|
|
|
|
public bool InvertPredicate { get; protected set; }
|
|
|
|
// When inverted, the always true predicate == always false.
|
|
public bool NeverExecute => Predicate.Index == RegisterConsts.PredicateTrueIndex && InvertPredicate;
|
|
|
|
public OpCode(InstEmitter emitter, ulong address, long opCode)
|
|
{
|
|
Emitter = emitter;
|
|
Address = address;
|
|
RawOpCode = opCode;
|
|
|
|
Predicate = new Register(opCode.Extract(16, 3), RegisterType.Predicate);
|
|
|
|
InvertPredicate = opCode.Extract(19);
|
|
}
|
|
}
|
|
} |