diff options
author | bunnei <bunneidev@gmail.com> | 2015-08-12 06:00:44 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2015-08-16 00:03:25 +0200 |
commit | bd7e691f78d916ed6ae5396b2d646d9b3a053dd7 (patch) | |
tree | a20367004f684afeca83e795ce66e62115e8e79d /src/video_core/shader/shader_jit_x64.cpp | |
parent | JIT: Support negative address offsets. (diff) | |
download | yuzu-bd7e691f78d916ed6ae5396b2d646d9b3a053dd7.tar yuzu-bd7e691f78d916ed6ae5396b2d646d9b3a053dd7.tar.gz yuzu-bd7e691f78d916ed6ae5396b2d646d9b3a053dd7.tar.bz2 yuzu-bd7e691f78d916ed6ae5396b2d646d9b3a053dd7.tar.lz yuzu-bd7e691f78d916ed6ae5396b2d646d9b3a053dd7.tar.xz yuzu-bd7e691f78d916ed6ae5396b2d646d9b3a053dd7.tar.zst yuzu-bd7e691f78d916ed6ae5396b2d646d9b3a053dd7.zip |
Diffstat (limited to 'src/video_core/shader/shader_jit_x64.cpp')
-rw-r--r-- | src/video_core/shader/shader_jit_x64.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/video_core/shader/shader_jit_x64.cpp b/src/video_core/shader/shader_jit_x64.cpp index d69f3a549..1e20a06a7 100644 --- a/src/video_core/shader/shader_jit_x64.cpp +++ b/src/video_core/shader/shader_jit_x64.cpp @@ -4,12 +4,13 @@ #include <smmintrin.h> -#include "common/abi.h" #include "common/cpu_detect.h" -#include "common/x64_emitter.h" + +#include "common/x64/abi.h" +#include "common/x64/emitter.h" #include "shader.h" -#include "shader_jit.h" +#include "shader_jit_x64.h" namespace Pica { @@ -134,7 +135,7 @@ static const u8 NO_DEST_REG_MASK = 0xf; */ void JitCompiler::Compile_SwizzleSrc(Instruction instr, unsigned src_num, SourceRegister src_reg, X64Reg dest) { X64Reg src_ptr; - std::size_t src_offset; + int src_offset; if (src_reg.GetRegisterType() == RegisterType::FloatUniform) { src_ptr = UNIFORMS; @@ -451,7 +452,6 @@ void JitCompiler::Compile_NOP(Instruction instr) { void JitCompiler::Compile_END(Instruction instr) { ABI_PopAllCalleeSavedRegsAndAdjustStack(); RET(); - done = true; } void JitCompiler::Compile_CALL(Instruction instr) { @@ -655,7 +655,7 @@ CompiledShader* JitCompiler::Compile() { MOVAPS(NEGBIT, MDisp(RAX, 0)); looping = false; - done = false; + while (offset < g_state.vs.program_code.size()) { Compile_NextInstr(&offset); } @@ -663,6 +663,14 @@ CompiledShader* JitCompiler::Compile() { return (CompiledShader*)start; } +JitCompiler::JitCompiler() { + AllocCodeSpace(1024 * 1024 * 4); +} + +void JitCompiler::Clear() { + ClearCodeSpace(); +} + } // namespace Shader } // namespace Pica |