mirror of
https://github.com/starr-dusT/yuzu-mainline
synced 2024-03-05 21:12:25 -08:00
macro_jit_x64: Remove JITState::parameters
This can be passed in as an argument instead.
This commit is contained in:
parent
389549b80d
commit
35db6e1c68
@ -51,8 +51,7 @@ void MacroJITx64Impl::Execute(const std::vector<u32>& parameters, u32 method) {
|
|||||||
JITState state{};
|
JITState state{};
|
||||||
state.maxwell3d = &maxwell3d;
|
state.maxwell3d = &maxwell3d;
|
||||||
state.registers = {};
|
state.registers = {};
|
||||||
state.parameters = parameters.data();
|
program(&state, parameters.data());
|
||||||
program(&state);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroJITx64Impl::Compile_ALU(Macro::Opcode opcode) {
|
void MacroJITx64Impl::Compile_ALU(Macro::Opcode opcode) {
|
||||||
@ -422,8 +421,7 @@ void MacroJITx64Impl::Compile() {
|
|||||||
Common::X64::ABI_PushRegistersAndAdjustStackGPS(*this, Common::X64::ABI_ALL_CALLEE_SAVED, 8);
|
Common::X64::ABI_PushRegistersAndAdjustStackGPS(*this, Common::X64::ABI_ALL_CALLEE_SAVED, 8);
|
||||||
// JIT state
|
// JIT state
|
||||||
mov(STATE, Common::X64::ABI_PARAM1);
|
mov(STATE, Common::X64::ABI_PARAM1);
|
||||||
mov(PARAMETERS, qword[Common::X64::ABI_PARAM1 +
|
mov(PARAMETERS, Common::X64::ABI_PARAM2);
|
||||||
static_cast<Xbyak::uint32>(offsetof(JITState, parameters))]);
|
|
||||||
mov(REGISTERS, Common::X64::ABI_PARAM1);
|
mov(REGISTERS, Common::X64::ABI_PARAM1);
|
||||||
add(REGISTERS, static_cast<Xbyak::uint32>(offsetof(JITState, registers)));
|
add(REGISTERS, static_cast<Xbyak::uint32>(offsetof(JITState, registers)));
|
||||||
xor_(RESULT, RESULT);
|
xor_(RESULT, RESULT);
|
||||||
|
@ -66,11 +66,10 @@ private:
|
|||||||
struct JITState {
|
struct JITState {
|
||||||
Engines::Maxwell3D* maxwell3d{};
|
Engines::Maxwell3D* maxwell3d{};
|
||||||
std::array<u32, Macro::NUM_MACRO_REGISTERS> registers{};
|
std::array<u32, Macro::NUM_MACRO_REGISTERS> registers{};
|
||||||
const u32* parameters{};
|
|
||||||
u32 carry_flag{};
|
u32 carry_flag{};
|
||||||
};
|
};
|
||||||
static_assert(offsetof(JITState, maxwell3d) == 0, "Maxwell3D is not at 0x0");
|
static_assert(offsetof(JITState, maxwell3d) == 0, "Maxwell3D is not at 0x0");
|
||||||
using ProgramType = void (*)(JITState*);
|
using ProgramType = void (*)(JITState*, const u32*);
|
||||||
|
|
||||||
struct OptimizerState {
|
struct OptimizerState {
|
||||||
bool can_skip_carry{};
|
bool can_skip_carry{};
|
||||||
|
Loading…
Reference in New Issue
Block a user