externals: Update Xbyak to 5.96
I made a request on the Xbyak issue tracker to allow some constructors to be constexpr in order to avoid static constructors from needing to execute for some of our register constants. This request was implemented, so this updates Xbyak so that we can make use of it.
This commit is contained in:
parent
e9b9fc4674
commit
a5dcccfdd2
3 changed files with 22 additions and 22 deletions
2
externals/xbyak
vendored
2
externals/xbyak
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 18c9caaa0a3ed5706c39f5aa86cce0db6e65b174
|
Subproject commit c306b8e5786eeeb87b8925a8af5c3bf057ff5a90
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
namespace Common::X64 {
|
namespace Common::X64 {
|
||||||
|
|
||||||
inline std::size_t RegToIndex(const Xbyak::Reg& reg) {
|
constexpr std::size_t RegToIndex(const Xbyak::Reg& reg) {
|
||||||
using Kind = Xbyak::Reg::Kind;
|
using Kind = Xbyak::Reg::Kind;
|
||||||
ASSERT_MSG((reg.getKind() & (Kind::REG | Kind::XMM)) != 0,
|
ASSERT_MSG((reg.getKind() & (Kind::REG | Kind::XMM)) != 0,
|
||||||
"RegSet only support GPRs and XMM registers.");
|
"RegSet only support GPRs and XMM registers.");
|
||||||
|
@ -19,17 +19,17 @@ inline std::size_t RegToIndex(const Xbyak::Reg& reg) {
|
||||||
return reg.getIdx() + (reg.getKind() == Kind::REG ? 0 : 16);
|
return reg.getIdx() + (reg.getKind() == Kind::REG ? 0 : 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline Xbyak::Reg64 IndexToReg64(std::size_t reg_index) {
|
constexpr Xbyak::Reg64 IndexToReg64(std::size_t reg_index) {
|
||||||
ASSERT(reg_index < 16);
|
ASSERT(reg_index < 16);
|
||||||
return Xbyak::Reg64(static_cast<int>(reg_index));
|
return Xbyak::Reg64(static_cast<int>(reg_index));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline Xbyak::Xmm IndexToXmm(std::size_t reg_index) {
|
constexpr Xbyak::Xmm IndexToXmm(std::size_t reg_index) {
|
||||||
ASSERT(reg_index >= 16 && reg_index < 32);
|
ASSERT(reg_index >= 16 && reg_index < 32);
|
||||||
return Xbyak::Xmm(static_cast<int>(reg_index - 16));
|
return Xbyak::Xmm(static_cast<int>(reg_index - 16));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline Xbyak::Reg IndexToReg(std::size_t reg_index) {
|
constexpr Xbyak::Reg IndexToReg(std::size_t reg_index) {
|
||||||
if (reg_index < 16) {
|
if (reg_index < 16) {
|
||||||
return IndexToReg64(reg_index);
|
return IndexToReg64(reg_index);
|
||||||
} else {
|
} else {
|
||||||
|
@ -45,17 +45,17 @@ inline std::bitset<32> BuildRegSet(std::initializer_list<Xbyak::Reg> regs) {
|
||||||
return bits;
|
return bits;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::bitset<32> ABI_ALL_GPRS(0x0000FFFF);
|
constexpr inline std::bitset<32> ABI_ALL_GPRS(0x0000FFFF);
|
||||||
const std::bitset<32> ABI_ALL_XMMS(0xFFFF0000);
|
constexpr inline std::bitset<32> ABI_ALL_XMMS(0xFFFF0000);
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
// Microsoft x64 ABI
|
// Microsoft x64 ABI
|
||||||
const Xbyak::Reg ABI_RETURN = Xbyak::util::rax;
|
constexpr inline Xbyak::Reg ABI_RETURN = Xbyak::util::rax;
|
||||||
const Xbyak::Reg ABI_PARAM1 = Xbyak::util::rcx;
|
constexpr inline Xbyak::Reg ABI_PARAM1 = Xbyak::util::rcx;
|
||||||
const Xbyak::Reg ABI_PARAM2 = Xbyak::util::rdx;
|
constexpr inline Xbyak::Reg ABI_PARAM2 = Xbyak::util::rdx;
|
||||||
const Xbyak::Reg ABI_PARAM3 = Xbyak::util::r8;
|
constexpr inline Xbyak::Reg ABI_PARAM3 = Xbyak::util::r8;
|
||||||
const Xbyak::Reg ABI_PARAM4 = Xbyak::util::r9;
|
constexpr inline Xbyak::Reg ABI_PARAM4 = Xbyak::util::r9;
|
||||||
|
|
||||||
const std::bitset<32> ABI_ALL_CALLER_SAVED = BuildRegSet({
|
const std::bitset<32> ABI_ALL_CALLER_SAVED = BuildRegSet({
|
||||||
// GPRs
|
// GPRs
|
||||||
|
@ -102,11 +102,11 @@ constexpr size_t ABI_SHADOW_SPACE = 0x20;
|
||||||
#else
|
#else
|
||||||
|
|
||||||
// System V x86-64 ABI
|
// System V x86-64 ABI
|
||||||
const Xbyak::Reg ABI_RETURN = Xbyak::util::rax;
|
constexpr inline Xbyak::Reg ABI_RETURN = Xbyak::util::rax;
|
||||||
const Xbyak::Reg ABI_PARAM1 = Xbyak::util::rdi;
|
constexpr inline Xbyak::Reg ABI_PARAM1 = Xbyak::util::rdi;
|
||||||
const Xbyak::Reg ABI_PARAM2 = Xbyak::util::rsi;
|
constexpr inline Xbyak::Reg ABI_PARAM2 = Xbyak::util::rsi;
|
||||||
const Xbyak::Reg ABI_PARAM3 = Xbyak::util::rdx;
|
constexpr inline Xbyak::Reg ABI_PARAM3 = Xbyak::util::rdx;
|
||||||
const Xbyak::Reg ABI_PARAM4 = Xbyak::util::rcx;
|
constexpr inline Xbyak::Reg ABI_PARAM4 = Xbyak::util::rcx;
|
||||||
|
|
||||||
const std::bitset<32> ABI_ALL_CALLER_SAVED = BuildRegSet({
|
const std::bitset<32> ABI_ALL_CALLER_SAVED = BuildRegSet({
|
||||||
// GPRs
|
// GPRs
|
||||||
|
|
|
@ -14,11 +14,11 @@ MICROPROFILE_DEFINE(MacroJitCompile, "GPU", "Compile macro JIT", MP_RGB(173, 255
|
||||||
MICROPROFILE_DEFINE(MacroJitExecute, "GPU", "Execute macro JIT", MP_RGB(255, 255, 0));
|
MICROPROFILE_DEFINE(MacroJitExecute, "GPU", "Execute macro JIT", MP_RGB(255, 255, 0));
|
||||||
|
|
||||||
namespace Tegra {
|
namespace Tegra {
|
||||||
static const Xbyak::Reg64 STATE = Xbyak::util::rbx;
|
constexpr Xbyak::Reg64 STATE = Xbyak::util::rbx;
|
||||||
static const Xbyak::Reg32 RESULT = Xbyak::util::ebp;
|
constexpr Xbyak::Reg32 RESULT = Xbyak::util::ebp;
|
||||||
static const Xbyak::Reg64 PARAMETERS = Xbyak::util::r12;
|
constexpr Xbyak::Reg64 PARAMETERS = Xbyak::util::r12;
|
||||||
static const Xbyak::Reg32 METHOD_ADDRESS = Xbyak::util::r14d;
|
constexpr Xbyak::Reg32 METHOD_ADDRESS = Xbyak::util::r14d;
|
||||||
static const Xbyak::Reg64 BRANCH_HOLDER = Xbyak::util::r15;
|
constexpr Xbyak::Reg64 BRANCH_HOLDER = Xbyak::util::r15;
|
||||||
|
|
||||||
static const std::bitset<32> PERSISTENT_REGISTERS = Common::X64::BuildRegSet({
|
static const std::bitset<32> PERSISTENT_REGISTERS = Common::X64::BuildRegSet({
|
||||||
STATE,
|
STATE,
|
||||||
|
|
Loading…
Reference in a new issue