[x64] Allow the JIT to use volatile registers

This commit is contained in:
Dr. Chat
2018-11-18 15:22:56 -06:00
parent b57bb74965
commit 384ec98a42
3 changed files with 49 additions and 55 deletions

View File

@@ -139,13 +139,13 @@ class X64Emitter : public Xbyak::CodeGenerator {
std::vector<SourceMapEntry>* out_source_map);
public:
// Reserved: rsp
// Reserved: rsp, rsi, rdi
// Scratch: rax/rcx/rdx
// xmm0-2
// Available: rbx, r12-r15 (save to get r8-r11, rbp, rsi, rdi?)
// xmm6-xmm15 (save to get xmm3-xmm5)
static const int GPR_COUNT = 5;
static const int XMM_COUNT = 10;
// Available: rbx, r10-r15
// xmm4-xmm15 (save to get xmm3)
static const int GPR_COUNT = 7;
static const int XMM_COUNT = 12;
static void SetupReg(const hir::Value* v, Xbyak::Reg8& r) {
auto idx = gpr_reg_map_[v->reg.index];