mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-21 03:32:29 +00:00
Add two static methods to avoid having client code explicitly compare against
FirstVirtualRegister git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11031 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
97017de187
commit
bd490d919b
@ -136,6 +136,18 @@ public:
|
||||
FirstVirtualRegister = 1024,
|
||||
};
|
||||
|
||||
/// isPhysicalRegister - Return true if the specified register number is in
|
||||
/// the physical register namespace.
|
||||
static bool isPhysicalRegister(unsigned Reg) {
|
||||
return Reg < FirstVirtualRegister;
|
||||
}
|
||||
|
||||
/// isVirtualRegister - Return true if the specified register number is in
|
||||
/// the virtual register namespace.
|
||||
static bool isVirtualRegister(unsigned Reg) {
|
||||
return Reg >= FirstVirtualRegister;
|
||||
}
|
||||
|
||||
const MRegisterDesc &operator[](unsigned RegNo) const {
|
||||
assert(RegNo < NumRegs &&
|
||||
"Attempting to access record for invalid register number!");
|
||||
|
Loading…
x
Reference in New Issue
Block a user