1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Cmp swap legalization fix with lifetimeEnd passover

This commit is contained in:
Brian Fiete 2022-04-16 10:34:33 -07:00
parent cbce1f4558
commit 3a70cfaada

View file

@ -10426,8 +10426,12 @@ bool BeMCContext::DoLegalization()
// Sometimes the matching use is in another block // Sometimes the matching use is in another block
FindTarget(checkInst->mArg0, checkBlock, checkInstIdx); FindTarget(checkInst->mArg0, checkBlock, checkInstIdx);
} }
else if ((checkInst->mKind != BeMCInstKind_Def) && (checkInst->mKind != BeMCInstKind_DbgDecl) && else if (
(checkInst->mKind != BeMCInstKind_ValueScopeSoftEnd) && (checkInst->mKind != BeMCInstKind_ValueScopeHardEnd)) (checkInst->mKind != BeMCInstKind_Def) &&
(checkInst->mKind != BeMCInstKind_DbgDecl) &&
(checkInst->mKind != BeMCInstKind_ValueScopeSoftEnd) &&
(checkInst->mKind != BeMCInstKind_ValueScopeHardEnd) &&
(checkInst->mKind != BeMCInstKind_LifetimeEnd))
{ {
SoftFail("Malformed"); SoftFail("Malformed");
} }
@ -16122,7 +16126,7 @@ void BeMCContext::Generate(BeFunction* function)
mDbgPreferredRegs[32] = X64Reg_R8;*/ mDbgPreferredRegs[32] = X64Reg_R8;*/
//mDbgPreferredRegs[8] = X64Reg_RAX; //mDbgPreferredRegs[8] = X64Reg_RAX;
//mDebugging = (function->mName == "?Main@TestProgram@BeefTest@bf@@SATint@@PEAV?$Array1@PEAVString@System@bf@@@System@3@@Z"); //mDebugging = (function->mName == "?Test@TestProgram@BeefTest@bf@@AEAA_NXZ");
// || (function->mName == "?MethodA@TestProgram@BeefTest@bf@@CAXXZ"); // || (function->mName == "?MethodA@TestProgram@BeefTest@bf@@CAXXZ");
// || (function->mName == "?Hey@Blurg@bf@@SAXXZ") // || (function->mName == "?Hey@Blurg@bf@@SAXXZ")
// ; // ;