mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Fix to sized array initialization
This commit is contained in:
parent
4b965a440d
commit
24f931df51
3 changed files with 32 additions and 5 deletions
|
@ -3622,7 +3622,7 @@ BeMCOperand BeMCContext::AllocVirtualReg(BeType* type, int refCount, bool mustBe
|
|||
|
||||
if (mDebugging)
|
||||
{
|
||||
if (mcOperand.mVRegIdx == 15)
|
||||
if (mcOperand.mVRegIdx == 4)
|
||||
{
|
||||
NOP;
|
||||
}
|
||||
|
@ -3840,6 +3840,16 @@ bool BeMCContext::HasSymbolAddr(const BeMCOperand& operand)
|
|||
|
||||
BeMCOperand BeMCContext::ReplaceWithNewVReg(BeMCOperand& operand, int& instIdx, bool isInput, bool mustBeReg)
|
||||
{
|
||||
if ((isInput) && (operand.mKind == BeMCOperandKind_VRegLoad))
|
||||
{
|
||||
BeMCOperand addrOperand = BeMCOperand::ToAddr(operand);
|
||||
BeMCOperand scratchReg = AllocVirtualReg(GetType(addrOperand), 2, mustBeReg);
|
||||
CreateDefineVReg(scratchReg, instIdx++);
|
||||
AllocInst(BeMCInstKind_Mov, scratchReg, addrOperand, instIdx++);
|
||||
operand = BeMCOperand::ToLoad(scratchReg);
|
||||
return scratchReg;
|
||||
}
|
||||
|
||||
BeMCOperand scratchReg = AllocVirtualReg(GetType(operand), 2, mustBeReg);
|
||||
CreateDefineVReg(scratchReg, instIdx++);
|
||||
if (isInput)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue