mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +02:00
More Fail info, better fail on OperandToAddr
This commit is contained in:
parent
99c7a9fe1f
commit
7e843bb402
2 changed files with 5783 additions and 5768 deletions
File diff suppressed because it is too large
Load diff
|
@ -388,20 +388,6 @@ public:
|
|||
return loadedOperand;
|
||||
}
|
||||
|
||||
static BeMCOperand ToAddr(const BeMCOperand& operand)
|
||||
{
|
||||
BeMCOperand loadedOperand = operand;
|
||||
if (loadedOperand.mKind == BeMCOperandKind_VRegLoad)
|
||||
loadedOperand.mKind = BeMCOperandKind_VReg;
|
||||
else if (loadedOperand.mKind == BeMCOperandKind_VReg)
|
||||
loadedOperand.mKind = BeMCOperandKind_VRegAddr;
|
||||
else if (loadedOperand.mKind == BeMCOperandKind_Symbol)
|
||||
loadedOperand.mKind = BeMCOperandKind_SymbolAddr;
|
||||
else
|
||||
BF_FATAL("Bad");
|
||||
return loadedOperand;
|
||||
}
|
||||
|
||||
static BeMCOperand FromVReg(int vregIdx)
|
||||
{
|
||||
BeMCOperand operand;
|
||||
|
@ -874,7 +860,7 @@ public:
|
|||
bool IsDirectRelTo()
|
||||
{
|
||||
return ((mRelTo.mKind == BeMCOperandKind_VReg) || (mRelTo.mKind == BeMCOperandKind_NativeReg)) &&
|
||||
(mRelOffset.IsZero()) && (mRelOffsetScale == 1);
|
||||
(mRelOffset.IsZero()) && (mRelOffsetScale == 1);
|
||||
}
|
||||
|
||||
bool IsDirectRelToAny()
|
||||
|
@ -1322,6 +1308,7 @@ public:
|
|||
BeType* mNativeIntType;
|
||||
BeModule* mModule;
|
||||
BeMCBlock* mActiveBlock;
|
||||
BeMCInst* mActiveInst;
|
||||
int* mInsertInstIdxRef;
|
||||
BeBlock* mActiveBeBlock;
|
||||
BeFunction* mBeFunction;
|
||||
|
@ -1383,6 +1370,7 @@ public:
|
|||
void CreateCondBr(BeMCBlock* mcBlock, BeMCOperand& testVal, const BeMCOperand& trueBlock, const BeMCOperand& falseBlock);
|
||||
void CreatePhiAssign(BeMCBlock* mcBlock, const BeMCOperand& testVal, const BeMCOperand& result, const BeMCOperand& doneLabel);
|
||||
BeMCOperand GetImmediate(int64 val);
|
||||
BeMCOperand OperandToAddr(const BeMCOperand& operand);
|
||||
BeMCOperand GetVReg(int regNum);
|
||||
BeMCOperand AllocVirtualReg(BeType* type, int refCount = -1, bool mustBeReg = false);
|
||||
int GetUnderlyingVReg(int vregIdx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue