diff options
| -rw-r--r-- | src/common/x64/xbyak_abi.h | 16 | ||||
| -rw-r--r-- | src/video_core/macro/macro_jit_x64.cpp | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/common/x64/xbyak_abi.h b/src/common/x64/xbyak_abi.h index 0ddf9b83e..87b3d63a4 100644 --- a/src/common/x64/xbyak_abi.h +++ b/src/common/x64/xbyak_abi.h | |||
| @@ -37,12 +37,12 @@ constexpr Xbyak::Reg IndexToReg(size_t reg_index) { | |||
| 37 | } | 37 | } |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | inline std::bitset<32> BuildRegSet(std::initializer_list<Xbyak::Reg> regs) { | 40 | constexpr std::bitset<32> BuildRegSet(std::initializer_list<Xbyak::Reg> regs) { |
| 41 | std::bitset<32> bits; | 41 | size_t bits = 0; |
| 42 | for (const Xbyak::Reg& reg : regs) { | 42 | for (const Xbyak::Reg& reg : regs) { |
| 43 | bits[RegToIndex(reg)] = true; | 43 | bits |= size_t{1} << RegToIndex(reg); |
| 44 | } | 44 | } |
| 45 | return bits; | 45 | return {bits}; |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | constexpr inline std::bitset<32> ABI_ALL_GPRS(0x0000FFFF); | 48 | constexpr inline std::bitset<32> ABI_ALL_GPRS(0x0000FFFF); |
| @@ -57,7 +57,7 @@ constexpr inline Xbyak::Reg ABI_PARAM2 = Xbyak::util::rdx; | |||
| 57 | constexpr inline Xbyak::Reg ABI_PARAM3 = Xbyak::util::r8; | 57 | constexpr inline Xbyak::Reg ABI_PARAM3 = Xbyak::util::r8; |
| 58 | constexpr inline Xbyak::Reg ABI_PARAM4 = Xbyak::util::r9; | 58 | constexpr inline Xbyak::Reg ABI_PARAM4 = Xbyak::util::r9; |
| 59 | 59 | ||
| 60 | const std::bitset<32> ABI_ALL_CALLER_SAVED = BuildRegSet({ | 60 | constexpr inline std::bitset<32> ABI_ALL_CALLER_SAVED = BuildRegSet({ |
| 61 | // GPRs | 61 | // GPRs |
| 62 | Xbyak::util::rcx, | 62 | Xbyak::util::rcx, |
| 63 | Xbyak::util::rdx, | 63 | Xbyak::util::rdx, |
| @@ -74,7 +74,7 @@ const std::bitset<32> ABI_ALL_CALLER_SAVED = BuildRegSet({ | |||
| 74 | Xbyak::util::xmm5, | 74 | Xbyak::util::xmm5, |
| 75 | }); | 75 | }); |
| 76 | 76 | ||
| 77 | const std::bitset<32> ABI_ALL_CALLEE_SAVED = BuildRegSet({ | 77 | constexpr inline std::bitset<32> ABI_ALL_CALLEE_SAVED = BuildRegSet({ |
| 78 | // GPRs | 78 | // GPRs |
| 79 | Xbyak::util::rbx, | 79 | Xbyak::util::rbx, |
| 80 | Xbyak::util::rsi, | 80 | Xbyak::util::rsi, |
| @@ -108,7 +108,7 @@ constexpr inline Xbyak::Reg ABI_PARAM2 = Xbyak::util::rsi; | |||
| 108 | constexpr inline Xbyak::Reg ABI_PARAM3 = Xbyak::util::rdx; | 108 | constexpr inline Xbyak::Reg ABI_PARAM3 = Xbyak::util::rdx; |
| 109 | constexpr inline Xbyak::Reg ABI_PARAM4 = Xbyak::util::rcx; | 109 | constexpr inline Xbyak::Reg ABI_PARAM4 = Xbyak::util::rcx; |
| 110 | 110 | ||
| 111 | const std::bitset<32> ABI_ALL_CALLER_SAVED = BuildRegSet({ | 111 | constexpr inline std::bitset<32> ABI_ALL_CALLER_SAVED = BuildRegSet({ |
| 112 | // GPRs | 112 | // GPRs |
| 113 | Xbyak::util::rcx, | 113 | Xbyak::util::rcx, |
| 114 | Xbyak::util::rdx, | 114 | Xbyak::util::rdx, |
| @@ -137,7 +137,7 @@ const std::bitset<32> ABI_ALL_CALLER_SAVED = BuildRegSet({ | |||
| 137 | Xbyak::util::xmm15, | 137 | Xbyak::util::xmm15, |
| 138 | }); | 138 | }); |
| 139 | 139 | ||
| 140 | const std::bitset<32> ABI_ALL_CALLEE_SAVED = BuildRegSet({ | 140 | constexpr inline std::bitset<32> ABI_ALL_CALLEE_SAVED = BuildRegSet({ |
| 141 | // GPRs | 141 | // GPRs |
| 142 | Xbyak::util::rbx, | 142 | Xbyak::util::rbx, |
| 143 | Xbyak::util::rbp, | 143 | Xbyak::util::rbp, |
diff --git a/src/video_core/macro/macro_jit_x64.cpp b/src/video_core/macro/macro_jit_x64.cpp index 924c9fe5c..47b28ad16 100644 --- a/src/video_core/macro/macro_jit_x64.cpp +++ b/src/video_core/macro/macro_jit_x64.cpp | |||
| @@ -29,7 +29,7 @@ constexpr Xbyak::Reg64 PARAMETERS = Xbyak::util::r12; | |||
| 29 | constexpr Xbyak::Reg32 METHOD_ADDRESS = Xbyak::util::r14d; | 29 | constexpr Xbyak::Reg32 METHOD_ADDRESS = Xbyak::util::r14d; |
| 30 | constexpr Xbyak::Reg64 BRANCH_HOLDER = Xbyak::util::r15; | 30 | constexpr Xbyak::Reg64 BRANCH_HOLDER = Xbyak::util::r15; |
| 31 | 31 | ||
| 32 | const std::bitset<32> PERSISTENT_REGISTERS = Common::X64::BuildRegSet({ | 32 | constexpr std::bitset<32> PERSISTENT_REGISTERS = Common::X64::BuildRegSet({ |
| 33 | STATE, | 33 | STATE, |
| 34 | RESULT, | 34 | RESULT, |
| 35 | PARAMETERS, | 35 | PARAMETERS, |