mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
McARM: Add a variety of asserts on the sanity of memory operands.
llvm-svn: 123737
This commit is contained in:
parent
aa5e17f3a7
commit
8d7ed1f6a8
@ -415,11 +415,20 @@ public:
|
||||
}
|
||||
|
||||
static ARMOperand *CreateMem(unsigned BaseRegNum, bool OffsetIsReg,
|
||||
const MCExpr *Offset, unsigned OffsetRegNum,
|
||||
const MCExpr *Offset, int OffsetRegNum,
|
||||
bool OffsetRegShifted, enum ShiftType ShiftType,
|
||||
const MCExpr *ShiftAmount, bool Preindexed,
|
||||
bool Postindexed, bool Negative, bool Writeback,
|
||||
SMLoc S, SMLoc E) {
|
||||
assert((OffsetRegNum == -1 || OffsetIsReg) &&
|
||||
"OffsetRegNum must imply OffsetIsReg!");
|
||||
assert((!OffsetRegShifted || OffsetIsReg) &&
|
||||
"OffsetRegShifted must imply OffsetIsReg!");
|
||||
assert((!ShiftAmount || (OffsetIsReg && OffsetRegShifted)) &&
|
||||
"Cannot have shift amount without shifted register offset!");
|
||||
assert((!Offset || !OffsetIsReg) &&
|
||||
"Cannot have expression offset and register offset!");
|
||||
|
||||
ARMOperand *Op = new ARMOperand(Memory);
|
||||
Op->Mem.BaseRegNum = BaseRegNum;
|
||||
Op->Mem.OffsetIsReg = OffsetIsReg;
|
||||
|
Loading…
Reference in New Issue
Block a user