video_core/macro_jit_x64: Decouple PersistentCallerSavedRegs() from impl

This doesn't depend on class state and can just be a regular function.
This commit is contained in:
Lioncash 2022-01-25 13:30:51 -05:00
parent 6b873b72ae
commit f11eefed56

View file

@ -40,6 +40,10 @@ const std::bitset<32> PERSISTENT_REGISTERS = Common::X64::BuildRegSet({
// Arbitrarily chosen based on current booting games. // Arbitrarily chosen based on current booting games.
constexpr size_t MAX_CODE_SIZE = 0x10000; constexpr size_t MAX_CODE_SIZE = 0x10000;
std::bitset<32> PersistentCallerSavedRegs() {
return PERSISTENT_REGISTERS & Common::X64::ABI_ALL_CALLER_SAVED;
}
class MacroJITx64Impl final : public Xbyak::CodeGenerator, public CachedMacro { class MacroJITx64Impl final : public Xbyak::CodeGenerator, public CachedMacro {
public: public:
explicit MacroJITx64Impl(Engines::Maxwell3D& maxwell3d_, const std::vector<u32>& code_) explicit MacroJITx64Impl(Engines::Maxwell3D& maxwell3d_, const std::vector<u32>& code_)
@ -70,7 +74,6 @@ private:
void Compile_Send(Xbyak::Reg32 value); void Compile_Send(Xbyak::Reg32 value);
Macro::Opcode GetOpCode() const; Macro::Opcode GetOpCode() const;
std::bitset<32> PersistentCallerSavedRegs() const;
struct JITState { struct JITState {
Engines::Maxwell3D* maxwell3d{}; Engines::Maxwell3D* maxwell3d{};
@ -674,10 +677,6 @@ Macro::Opcode MacroJITx64Impl::GetOpCode() const {
ASSERT(pc < code.size()); ASSERT(pc < code.size());
return {code[pc]}; return {code[pc]};
} }
std::bitset<32> MacroJITx64Impl::PersistentCallerSavedRegs() const {
return PERSISTENT_REGISTERS & Common::X64::ABI_ALL_CALLER_SAVED;
}
} // Anonymous namespace } // Anonymous namespace
MacroJITx64::MacroJITx64(Engines::Maxwell3D& maxwell3d_) MacroJITx64::MacroJITx64(Engines::Maxwell3D& maxwell3d_)