summaryrefslogtreecommitdiffstats
path: root/src/video_core/macro_interpreter.cpp
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-07-31 03:09:49 +0200
committerSubv <subv2112@gmail.com>2018-07-31 03:38:24 +0200
commit8191273a3de6df8531805fbfb1a9b6e5a18076a2 (patch)
treee0995886afcfab34d09e5addc8322c42bd547ff8 /src/video_core/macro_interpreter.cpp
parentnvhost_gpu: Added checks to ensure we don't read past the end of the entries when handling a GPU command list. (diff)
downloadyuzu-8191273a3de6df8531805fbfb1a9b6e5a18076a2.tar
yuzu-8191273a3de6df8531805fbfb1a9b6e5a18076a2.tar.gz
yuzu-8191273a3de6df8531805fbfb1a9b6e5a18076a2.tar.bz2
yuzu-8191273a3de6df8531805fbfb1a9b6e5a18076a2.tar.lz
yuzu-8191273a3de6df8531805fbfb1a9b6e5a18076a2.tar.xz
yuzu-8191273a3de6df8531805fbfb1a9b6e5a18076a2.tar.zst
yuzu-8191273a3de6df8531805fbfb1a9b6e5a18076a2.zip
Diffstat (limited to 'src/video_core/macro_interpreter.cpp')
-rw-r--r--src/video_core/macro_interpreter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/macro_interpreter.cpp b/src/video_core/macro_interpreter.cpp
index 44ece01c1..377bd66ab 100644
--- a/src/video_core/macro_interpreter.cpp
+++ b/src/video_core/macro_interpreter.cpp
@@ -102,11 +102,11 @@ bool MacroInterpreter::Step(const std::vector<u32>& code, bool is_delay_slot) {
if (taken) {
// Ignore the delay slot if the branch has the annul bit.
if (opcode.branch_annul) {
- pc = base_address + (opcode.immediate << 2);
+ pc = base_address + opcode.GetBranchTarget();
return true;
}
- delayed_pc = base_address + (opcode.immediate << 2);
+ delayed_pc = base_address + opcode.GetBranchTarget();
// Execute one more instruction due to the delay slot.
return Step(code, true);
}