From f0a59f345c633b757ebd2a22fca23d7dab0f9f99 Mon Sep 17 00:00:00 2001 From: gdk Date: Thu, 14 Nov 2019 14:20:30 -0300 Subject: Add partial support for the BRX shader instruction --- .../Decoders/OpCodeBranchIndir.cs | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Ryujinx.Graphics.Shader/Decoders/OpCodeBranchIndir.cs (limited to 'Ryujinx.Graphics.Shader/Decoders/OpCodeBranchIndir.cs') diff --git a/Ryujinx.Graphics.Shader/Decoders/OpCodeBranchIndir.cs b/Ryujinx.Graphics.Shader/Decoders/OpCodeBranchIndir.cs new file mode 100644 index 00000000..3e694e61 --- /dev/null +++ b/Ryujinx.Graphics.Shader/Decoders/OpCodeBranchIndir.cs @@ -0,0 +1,23 @@ +using Ryujinx.Graphics.Shader.Instructions; +using System.Collections.Generic; + +namespace Ryujinx.Graphics.Shader.Decoders +{ + class OpCodeBranchIndir : OpCode + { + public HashSet PossibleTargets { get; } + + public Register Ra { get; } + + public int Offset { get; } + + public OpCodeBranchIndir(InstEmitter emitter, ulong address, long opCode) : base(emitter, address, opCode) + { + PossibleTargets = new HashSet(); + + Ra = new Register(opCode.Extract(8, 8), RegisterType.Gpr); + + Offset = ((int)(opCode >> 20) << 8) >> 8; + } + } +} \ No newline at end of file -- cgit v1.2.3