mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-09 13:33:17 +00:00
Add method MachineOperand::hasAllocatedReg().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3747 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d5af164f01
commit
504fc5b7b5
@ -136,14 +136,21 @@ public:
|
|||||||
inline bool opLoBits64 () const {
|
inline bool opLoBits64 () const {
|
||||||
return flags & LOFLAG64;
|
return flags & LOFLAG64;
|
||||||
}
|
}
|
||||||
|
|
||||||
// used to get the reg number if when one is allocated (must be
|
// used to check if a machine register has been allocated to this operand
|
||||||
// called only after reg alloc)
|
inline bool hasAllocatedReg() const {
|
||||||
|
return (regNum >= 0 &&
|
||||||
|
(opType == MO_VirtualRegister || opType == MO_CCRegister ||
|
||||||
|
opType == MO_MachineRegister));
|
||||||
|
}
|
||||||
|
|
||||||
|
// used to get the reg number if when one is allocated
|
||||||
inline int getAllocatedRegNum() const {
|
inline int getAllocatedRegNum() const {
|
||||||
assert(opType == MO_VirtualRegister || opType == MO_CCRegister ||
|
assert(opType == MO_VirtualRegister || opType == MO_CCRegister ||
|
||||||
opType == MO_MachineRegister);
|
opType == MO_MachineRegister);
|
||||||
return regNum;
|
return regNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
friend std::ostream& operator<<(std::ostream& os, const MachineOperand& mop);
|
friend std::ostream& operator<<(std::ostream& os, const MachineOperand& mop);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user