mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-12 07:37:34 +00:00
Test if a register is sub- or super-register of another.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36433 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cdee1c4272
commit
b2f2e64c07
@ -321,6 +321,22 @@ public:
|
||||
return areAliases(regA, regB);
|
||||
}
|
||||
|
||||
/// isSubRegister - Returns true if regB is a sub-register of regA.
|
||||
///
|
||||
bool isSubRegister(unsigned regA, unsigned regB) const {
|
||||
for (const unsigned *SR = getSubRegisters(regA); *SR; ++SR)
|
||||
if (*SR == regB) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// isSuperRegister - Returns true if regB is a super-register of regA.
|
||||
///
|
||||
bool isSuperRegister(unsigned regA, unsigned regB) const {
|
||||
for (const unsigned *SR = getSuperRegisters(regA); *SR; ++SR)
|
||||
if (*SR == regB) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// getCalleeSavedRegs - Return a null-terminated list of all of the
|
||||
/// callee saved registers on this target. The register should be in the
|
||||
/// order of desired callee-save stack frame offset. The first register is
|
||||
|
Loading…
x
Reference in New Issue
Block a user