BackendX64/RegAlloc: Do not allocate RSP for guest use

This commit is contained in:
MerryMage 2016-08-08 16:01:07 +01:00
parent abd113f160
commit 975f011fc0
5 changed files with 1 additions and 8 deletions

View file

@ -32,6 +32,7 @@ static Gen::OpArg ImmediateToOpArg(const IR::Value& imm) {
static Gen::X64Reg HostLocToX64(HostLoc loc) {
DEBUG_ASSERT(HostLocIsRegister(loc));
DEBUG_ASSERT(loc != HostLoc::RSP);
// HostLoc is ordered such that the numbers line up.
if (HostLocIsGPR(loc)) {
return static_cast<Gen::X64Reg>(loc);
@ -318,9 +319,6 @@ void RegAlloc::HostCall(IR::Inst* result_def, IR::Value arg0_use, IR::Value arg1
for (auto xmm : any_xmm) {
ScratchRegister({xmm});
}
ScratchRegister({HostLoc::RSP});
code->MOV(64, Gen::R(Gen::RSP), Gen::MDisp(Gen::R15, offsetof(JitState, save_host_RSP)));
}
HostLoc RegAlloc::SelectARegister(HostLocList desired_locations) const {