aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/Decoders/OpCodeBranchIndir.cs
diff options
context:
space:
mode:
authorgdk <gab.dark.100@gmail.com>2019-11-14 14:20:30 -0300
committerThog <thog@protonmail.com>2020-01-09 02:13:00 +0100
commitf0a59f345c633b757ebd2a22fca23d7dab0f9f99 (patch)
tree444aa5ac024119594bc9f5b51e3710483537e6e6 /Ryujinx.Graphics.Shader/Decoders/OpCodeBranchIndir.cs
parentd274328c3192fd85b9eec661b00f1599d673776c (diff)
Add partial support for the BRX shader instruction
Diffstat (limited to 'Ryujinx.Graphics.Shader/Decoders/OpCodeBranchIndir.cs')
-rw-r--r--Ryujinx.Graphics.Shader/Decoders/OpCodeBranchIndir.cs23
1 files changed, 23 insertions, 0 deletions
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<Block> 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<Block>();
+
+ Ra = new Register(opCode.Extract(8, 8), RegisterType.Gpr);
+
+ Offset = ((int)(opCode >> 20) << 8) >> 8;
+ }
+ }
+} \ No newline at end of file