summaryrefslogtreecommitdiffstats
path: root/src/video_core/macro
diff options
context:
space:
mode:
authorMerryMage <MerryMage@users.noreply.github.com>2020-06-15 22:00:59 +0200
committerMerryMage <MerryMage@users.noreply.github.com>2020-06-15 22:00:59 +0200
commit79aa7b3aceeecadfb5b15bc25431db7768434f23 (patch)
tree5e65abbc8c1ad752940858fe1a87cc0d146c8bdf /src/video_core/macro
parentmacro_jit_x64: Remove JITState::parameters (diff)
downloadyuzu-79aa7b3aceeecadfb5b15bc25431db7768434f23.tar
yuzu-79aa7b3aceeecadfb5b15bc25431db7768434f23.tar.gz
yuzu-79aa7b3aceeecadfb5b15bc25431db7768434f23.tar.bz2
yuzu-79aa7b3aceeecadfb5b15bc25431db7768434f23.tar.lz
yuzu-79aa7b3aceeecadfb5b15bc25431db7768434f23.tar.xz
yuzu-79aa7b3aceeecadfb5b15bc25431db7768434f23.tar.zst
yuzu-79aa7b3aceeecadfb5b15bc25431db7768434f23.zip
Diffstat (limited to 'src/video_core/macro')
-rw-r--r--src/video_core/macro/macro_jit_x64.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/video_core/macro/macro_jit_x64.cpp b/src/video_core/macro/macro_jit_x64.cpp
index f1d123f51..da3b86d3d 100644
--- a/src/video_core/macro/macro_jit_x64.cpp
+++ b/src/video_core/macro/macro_jit_x64.cpp
@@ -15,7 +15,6 @@ MICROPROFILE_DEFINE(MacroJitExecute, "GPU", "Execute macro JIT", MP_RGB(255, 255
namespace Tegra {
static const Xbyak::Reg64 PARAMETERS = Xbyak::util::r9;
-static const Xbyak::Reg64 REGISTERS = Xbyak::util::r10;
static const Xbyak::Reg64 STATE = Xbyak::util::r11;
static const Xbyak::Reg64 NEXT_PARAMETER = Xbyak::util::r12;
static const Xbyak::Reg32 RESULT = Xbyak::util::r13d;
@@ -24,7 +23,6 @@ static const Xbyak::Reg64 BRANCH_HOLDER = Xbyak::util::r15;
static const std::bitset<32> PERSISTENT_REGISTERS = Common::X64::BuildRegSet({
PARAMETERS,
- REGISTERS,
STATE,
NEXT_PARAMETER,
RESULT,
@@ -422,14 +420,12 @@ void MacroJITx64Impl::Compile() {
// JIT state
mov(STATE, Common::X64::ABI_PARAM1);
mov(PARAMETERS, Common::X64::ABI_PARAM2);
- mov(REGISTERS, Common::X64::ABI_PARAM1);
- add(REGISTERS, static_cast<Xbyak::uint32>(offsetof(JITState, registers)));
xor_(RESULT, RESULT);
xor_(METHOD_ADDRESS, METHOD_ADDRESS);
xor_(NEXT_PARAMETER, NEXT_PARAMETER);
xor_(BRANCH_HOLDER, BRANCH_HOLDER);
- mov(dword[REGISTERS + 4], Compile_FetchParameter());
+ mov(dword[STATE + offsetof(JITState, registers) + 4], Compile_FetchParameter());
// Track get register for zero registers and mark it as no-op
optimizer.zero_reg_skip = true;
@@ -543,7 +539,7 @@ Xbyak::Reg32 MacroJITx64Impl::Compile_GetRegister(u32 index, Xbyak::Reg32 dst) {
// Register 0 is always zero
xor_(dst, dst);
} else {
- mov(dst, dword[REGISTERS + index * sizeof(u32)]);
+ mov(dst, dword[STATE + offsetof(JITState, registers) + index * sizeof(u32)]);
}
return dst;
@@ -564,7 +560,7 @@ void MacroJITx64Impl::Compile_ProcessResult(Macro::ResultOperation operation, u3
if (reg == 0) {
return;
}
- mov(dword[REGISTERS + reg * sizeof(u32)], result);
+ mov(dword[STATE + offsetof(JITState, registers) + reg * sizeof(u32)], result);
};
auto SetMethodAddress = [=](Xbyak::Reg32 reg) { mov(METHOD_ADDRESS, reg); };