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

Fixed array alloca with non-aligned structs

This commit is contained in:
Brian Fiete 2022-04-26 11:41:34 -07:00
parent 259f50d612
commit f54980400e
3 changed files with 68 additions and 22 deletions

View file

@ -16126,7 +16126,7 @@ void BeMCContext::Generate(BeFunction* function)
mDbgPreferredRegs[32] = X64Reg_R8;*/
//mDbgPreferredRegs[8] = X64Reg_RAX;
//mDebugging = (function->mName == "?Test@TestProgram@BeefTest@bf@@AEAA_NXZ");
//mDebugging = (function->mName == "?Main@TestProgram@BeefTest@bf@@CAXXZ");
// || (function->mName == "?MethodA@TestProgram@BeefTest@bf@@CAXXZ");
// || (function->mName == "?Hey@Blurg@bf@@SAXXZ")
// ;
@ -16748,6 +16748,8 @@ void BeMCContext::Generate(BeFunction* function)
bool doPtrCast = false;
if (castedInst->mArraySize != NULL)
{
mcSize = BeMCOperand::FromImmediate(castedInst->mType->GetStride());
auto mcArraySize = GetOperand(castedInst->mArraySize);
if (mcArraySize.IsImmediate())
{