mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-12-16 07:45:33 +00:00
Merge pull request #4611 from lioncash/xbyak2
externals: Update Xbyak to 5.96
This commit is contained in:
commit
94a25b75a0
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