summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2016-04-09 17:39:56 +0200
committerbunnei <bunneidev@gmail.com>2016-04-14 05:04:50 +0200
commit1d45b57939b10bc1bc13ee33ad74e968850af703 (patch)
tree943d903b35618810ee136354be68d2ab707b3491 /src
parentshader_jit_x64: Get rid of unnecessary last_program_counter variable. (diff)
downloadyuzu-1d45b57939b10bc1bc13ee33ad74e968850af703.tar
yuzu-1d45b57939b10bc1bc13ee33ad74e968850af703.tar.gz
yuzu-1d45b57939b10bc1bc13ee33ad74e968850af703.tar.bz2
yuzu-1d45b57939b10bc1bc13ee33ad74e968850af703.tar.lz
yuzu-1d45b57939b10bc1bc13ee33ad74e968850af703.tar.xz
yuzu-1d45b57939b10bc1bc13ee33ad74e968850af703.tar.zst
yuzu-1d45b57939b10bc1bc13ee33ad74e968850af703.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/shader/shader_jit_x64.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/video_core/shader/shader_jit_x64.cpp b/src/video_core/shader/shader_jit_x64.cpp
index fae7e8b41..efea55811 100644
--- a/src/video_core/shader/shader_jit_x64.cpp
+++ b/src/video_core/shader/shader_jit_x64.cpp
@@ -810,7 +810,15 @@ void JitCompiler::FindReturnOffsets() {
}
void JitCompiler::Compile() {
+ // Reset flow control state
program = (CompiledShader*)GetCodePtr();
+ program_counter = 0;
+ looping = false;
+ code_ptr.fill(nullptr);
+ fixup_branches.clear();
+
+ // Find all `CALL` instructions and identify return locations
+ FindReturnOffsets();
// The stack pointer is 8 modulo 16 at the entry of a procedure
ABI_PushRegistersAndAdjustStack(ABI_ALL_CALLEE_SAVED, 8);
@@ -833,15 +841,6 @@ void JitCompiler::Compile() {
MOV(PTRBITS, R(RAX), ImmPtr(&neg));
MOVAPS(NEGBIT, MatR(RAX));
- // Find all `CALL` instructions and identify return locations
- FindReturnOffsets();
-
- // Reset flow control state
- program_counter = 0;
- looping = false;
- code_ptr.fill(nullptr);
- fixup_branches.clear();
-
// Jump to start of the shader program
JMPptr(R(ABI_PARAM2));