mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-21 18:29:45 +00:00
Add internal read flags to MachineInstrBuilder and hook them into the MachineOperand flag of the same name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158137 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
13a53e6495
commit
4efea94fa5
@ -34,6 +34,7 @@ namespace RegState {
|
|||||||
Undef = 0x20,
|
Undef = 0x20,
|
||||||
EarlyClobber = 0x40,
|
EarlyClobber = 0x40,
|
||||||
Debug = 0x80,
|
Debug = 0x80,
|
||||||
|
InternalRead = 0x100,
|
||||||
DefineNoRead = Define | Undef,
|
DefineNoRead = Define | Undef,
|
||||||
ImplicitDefine = Implicit | Define,
|
ImplicitDefine = Implicit | Define,
|
||||||
ImplicitKill = Implicit | Kill
|
ImplicitKill = Implicit | Kill
|
||||||
@ -67,7 +68,8 @@ public:
|
|||||||
flags & RegState::Undef,
|
flags & RegState::Undef,
|
||||||
flags & RegState::EarlyClobber,
|
flags & RegState::EarlyClobber,
|
||||||
SubReg,
|
SubReg,
|
||||||
flags & RegState::Debug));
|
flags & RegState::Debug,
|
||||||
|
flags & RegState::InternalRead));
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -310,6 +312,9 @@ inline unsigned getDeadRegState(bool B) {
|
|||||||
inline unsigned getUndefRegState(bool B) {
|
inline unsigned getUndefRegState(bool B) {
|
||||||
return B ? RegState::Undef : 0;
|
return B ? RegState::Undef : 0;
|
||||||
}
|
}
|
||||||
|
inline unsigned getInternalReadRegState(bool B) {
|
||||||
|
return B ? RegState::InternalRead : 0;
|
||||||
|
}
|
||||||
|
|
||||||
} // End llvm namespace
|
} // End llvm namespace
|
||||||
|
|
||||||
|
@ -542,14 +542,15 @@ public:
|
|||||||
bool isUndef = false,
|
bool isUndef = false,
|
||||||
bool isEarlyClobber = false,
|
bool isEarlyClobber = false,
|
||||||
unsigned SubReg = 0,
|
unsigned SubReg = 0,
|
||||||
bool isDebug = false) {
|
bool isDebug = false,
|
||||||
|
bool isInternalRead = false) {
|
||||||
MachineOperand Op(MachineOperand::MO_Register);
|
MachineOperand Op(MachineOperand::MO_Register);
|
||||||
Op.IsDef = isDef;
|
Op.IsDef = isDef;
|
||||||
Op.IsImp = isImp;
|
Op.IsImp = isImp;
|
||||||
Op.IsKill = isKill;
|
Op.IsKill = isKill;
|
||||||
Op.IsDead = isDead;
|
Op.IsDead = isDead;
|
||||||
Op.IsUndef = isUndef;
|
Op.IsUndef = isUndef;
|
||||||
Op.IsInternalRead = false;
|
Op.IsInternalRead = isInternalRead;
|
||||||
Op.IsEarlyClobber = isEarlyClobber;
|
Op.IsEarlyClobber = isEarlyClobber;
|
||||||
Op.IsDebug = isDebug;
|
Op.IsDebug = isDebug;
|
||||||
Op.SmallContents.RegNo = Reg;
|
Op.SmallContents.RegNo = Reg;
|
||||||
|
Loading…
Reference in New Issue
Block a user