block_of_code: BlockOfCode::ABI_* should be const
This commit is contained in:
parent
29471be317
commit
f6cf265bc5
2 changed files with 19 additions and 13 deletions
|
@ -18,6 +18,20 @@
|
||||||
namespace Dynarmic {
|
namespace Dynarmic {
|
||||||
namespace BackendX64 {
|
namespace BackendX64 {
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
const Xbyak::Reg64 BlockOfCode::ABI_RETURN = Xbyak::util::rax;
|
||||||
|
const Xbyak::Reg64 BlockOfCode::ABI_PARAM1 = Xbyak::util::rcx;
|
||||||
|
const Xbyak::Reg64 BlockOfCode::ABI_PARAM2 = Xbyak::util::rdx;
|
||||||
|
const Xbyak::Reg64 BlockOfCode::ABI_PARAM3 = Xbyak::util::r8;
|
||||||
|
const Xbyak::Reg64 BlockOfCode::ABI_PARAM4 = Xbyak::util::r9;
|
||||||
|
#else
|
||||||
|
const Xbyak::Reg64 BlockOfCode::ABI_RETURN = Xbyak::util::rax;
|
||||||
|
const Xbyak::Reg64 BlockOfCode::ABI_PARAM1 = Xbyak::util::rdi;
|
||||||
|
const Xbyak::Reg64 BlockOfCode::ABI_PARAM2 = Xbyak::util::rsi;
|
||||||
|
const Xbyak::Reg64 BlockOfCode::ABI_PARAM3 = Xbyak::util::rdx;
|
||||||
|
const Xbyak::Reg64 BlockOfCode::ABI_PARAM4 = Xbyak::util::rcx;
|
||||||
|
#endif
|
||||||
|
|
||||||
constexpr size_t TOTAL_CODE_SIZE = 128 * 1024 * 1024;
|
constexpr size_t TOTAL_CODE_SIZE = 128 * 1024 * 1024;
|
||||||
constexpr size_t FAR_CODE_OFFSET = 100 * 1024 * 1024;
|
constexpr size_t FAR_CODE_OFFSET = 100 * 1024 * 1024;
|
||||||
|
|
||||||
|
|
|
@ -112,19 +112,11 @@ public:
|
||||||
void SetCodePtr(CodePtr code_ptr);
|
void SetCodePtr(CodePtr code_ptr);
|
||||||
void EnsurePatchLocationSize(CodePtr begin, size_t size);
|
void EnsurePatchLocationSize(CodePtr begin, size_t size);
|
||||||
|
|
||||||
#ifdef _WIN32
|
static const Xbyak::Reg64 ABI_RETURN;
|
||||||
Xbyak::Reg64 ABI_RETURN = rax;
|
static const Xbyak::Reg64 ABI_PARAM1;
|
||||||
Xbyak::Reg64 ABI_PARAM1 = rcx;
|
static const Xbyak::Reg64 ABI_PARAM2;
|
||||||
Xbyak::Reg64 ABI_PARAM2 = rdx;
|
static const Xbyak::Reg64 ABI_PARAM3;
|
||||||
Xbyak::Reg64 ABI_PARAM3 = r8;
|
static const Xbyak::Reg64 ABI_PARAM4;
|
||||||
Xbyak::Reg64 ABI_PARAM4 = r9;
|
|
||||||
#else
|
|
||||||
Xbyak::Reg64 ABI_RETURN = rax;
|
|
||||||
Xbyak::Reg64 ABI_PARAM1 = rdi;
|
|
||||||
Xbyak::Reg64 ABI_PARAM2 = rsi;
|
|
||||||
Xbyak::Reg64 ABI_PARAM3 = rdx;
|
|
||||||
Xbyak::Reg64 ABI_PARAM4 = rcx;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
UserCallbacks cb;
|
UserCallbacks cb;
|
||||||
|
|
Loading…
Reference in a new issue