summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar MerryMage2020-06-15 20:55:02 +0100
committerGravatar MerryMage2020-06-15 20:55:02 +0100
commit35db6e1c68f18f401bcae8bd8e8937648c7c67c6 (patch)
tree6df8312d33c9d1bbe849ef150396e4128fcd9106 /src
parentmacro_jit_x64: Remove METHOD_ADDRESS_64 (diff)
downloadyuzu-35db6e1c68f18f401bcae8bd8e8937648c7c67c6.tar.gz
yuzu-35db6e1c68f18f401bcae8bd8e8937648c7c67c6.tar.xz
yuzu-35db6e1c68f18f401bcae8bd8e8937648c7c67c6.zip
macro_jit_x64: Remove JITState::parameters
This can be passed in as an argument instead.
Diffstat (limited to 'src')
-rw-r--r--src/video_core/macro/macro_jit_x64.cpp6
-rw-r--r--src/video_core/macro/macro_jit_x64.h3
2 files changed, 3 insertions, 6 deletions
diff --git a/src/video_core/macro/macro_jit_x64.cpp b/src/video_core/macro/macro_jit_x64.cpp
index 1dcf9957c..f1d123f51 100644
--- a/src/video_core/macro/macro_jit_x64.cpp
+++ b/src/video_core/macro/macro_jit_x64.cpp
@@ -51,8 +51,7 @@ void MacroJITx64Impl::Execute(const std::vector<u32>& parameters, u32 method) {
51 JITState state{}; 51 JITState state{};
52 state.maxwell3d = &maxwell3d; 52 state.maxwell3d = &maxwell3d;
53 state.registers = {}; 53 state.registers = {};
54 state.parameters = parameters.data(); 54 program(&state, parameters.data());
55 program(&state);
56} 55}
57 56
58void MacroJITx64Impl::Compile_ALU(Macro::Opcode opcode) { 57void MacroJITx64Impl::Compile_ALU(Macro::Opcode opcode) {
@@ -422,8 +421,7 @@ void MacroJITx64Impl::Compile() {
422 Common::X64::ABI_PushRegistersAndAdjustStackGPS(*this, Common::X64::ABI_ALL_CALLEE_SAVED, 8); 421 Common::X64::ABI_PushRegistersAndAdjustStackGPS(*this, Common::X64::ABI_ALL_CALLEE_SAVED, 8);
423 // JIT state 422 // JIT state
424 mov(STATE, Common::X64::ABI_PARAM1); 423 mov(STATE, Common::X64::ABI_PARAM1);
425 mov(PARAMETERS, qword[Common::X64::ABI_PARAM1 + 424 mov(PARAMETERS, Common::X64::ABI_PARAM2);
426 static_cast<Xbyak::uint32>(offsetof(JITState, parameters))]);
427 mov(REGISTERS, Common::X64::ABI_PARAM1); 425 mov(REGISTERS, Common::X64::ABI_PARAM1);
428 add(REGISTERS, static_cast<Xbyak::uint32>(offsetof(JITState, registers))); 426 add(REGISTERS, static_cast<Xbyak::uint32>(offsetof(JITState, registers)));
429 xor_(RESULT, RESULT); 427 xor_(RESULT, RESULT);
diff --git a/src/video_core/macro/macro_jit_x64.h b/src/video_core/macro/macro_jit_x64.h
index 377368086..9167b2a93 100644
--- a/src/video_core/macro/macro_jit_x64.h
+++ b/src/video_core/macro/macro_jit_x64.h
@@ -66,11 +66,10 @@ private:
66 struct JITState { 66 struct JITState {
67 Engines::Maxwell3D* maxwell3d{}; 67 Engines::Maxwell3D* maxwell3d{};
68 std::array<u32, Macro::NUM_MACRO_REGISTERS> registers{}; 68 std::array<u32, Macro::NUM_MACRO_REGISTERS> registers{};
69 const u32* parameters{};
70 u32 carry_flag{}; 69 u32 carry_flag{};
71 }; 70 };
72 static_assert(offsetof(JITState, maxwell3d) == 0, "Maxwell3D is not at 0x0"); 71 static_assert(offsetof(JITState, maxwell3d) == 0, "Maxwell3D is not at 0x0");
73 using ProgramType = void (*)(JITState*); 72 using ProgramType = void (*)(JITState*, const u32*);
74 73
75 struct OptimizerState { 74 struct OptimizerState {
76 bool can_skip_carry{}; 75 bool can_skip_carry{};