1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Fixed division issue with RDX preservation

This commit is contained in:
Brian Fiete 2020-03-20 09:24:38 -07:00
parent fc57557fd9
commit 69cb6d0208
3 changed files with 9 additions and 1 deletions

View file

@ -5578,6 +5578,9 @@ void BeMCContext::DisableRegister(const BeMCOperand& operand, X64CPURegister reg
case X64Reg_RAX:
vregInfo->mDisableRAX = true;
break;
case X64Reg_RDX:
vregInfo->mDisableRDX = true;
break;
case X64Reg_SIL:
vregInfo->mDisableEx = true;
break;
@ -9228,6 +9231,8 @@ bool BeMCContext::DoLegalization()
{
// This is to avoid overlap with PreserveRAX
DisableRegister(inst->mArg0, X64Reg_RAX);
if (preserveRDX)
DisableRegister(inst->mArg0, X64Reg_RDX);
}
}
AllocInst(BeMCInstKind_Mov, inst->mArg0, mcRemaindier, instIdx++ + 1);
@ -14709,7 +14714,7 @@ void BeMCContext::Generate(BeFunction* function)
mDbgPreferredRegs[32] = X64Reg_R8;*/
//mDbgPreferredRegs[8] = X64Reg_RAX;
//mDebugging = function->mName == "?Hey@Blurg@bf@@SAXXZ";
mDebugging = function->mName == "?Dequeue@?$Queue@Tint@@@Generic@Collections@System@bf@@QEAATint@@XZ";
//"?ColorizeCodeString@IDEUtils@IDE@bf@@SAXPEAVString@System@3@W4CodeKind@123@@Z";
//"?Main@Program@bf@@CAHPEAV?$Array1@PEAVString@System@bf@@@System@2@@Z";