mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-24 23:19:03 +00:00
Fix PR10059 and future variations by handling all register subclasses.
Add TargetRegisterInfo::hasSubClassEq and use it to check for compatible register classes instead of trying to list all register classes in X86's getLoadStoreRegOpcode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132398 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -182,6 +182,12 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
/// hasSubClassEq - Returns true if RC is a subclass of or equal to this
|
||||
/// class.
|
||||
bool hasSubClassEq(const TargetRegisterClass *RC) const {
|
||||
return RC == this || hasSubClass(RC);
|
||||
}
|
||||
|
||||
/// subclasses_begin / subclasses_end - Loop over all of the classes
|
||||
/// that are proper subsets of this register class.
|
||||
sc_iterator subclasses_begin() const {
|
||||
@@ -203,6 +209,12 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
/// hasSuperClassEq - Returns true if RC is a superclass of or equal to this
|
||||
/// class.
|
||||
bool hasSuperClassEq(const TargetRegisterClass *RC) const {
|
||||
return RC == this || hasSuperClass(RC);
|
||||
}
|
||||
|
||||
/// superclasses_begin / superclasses_end - Loop over all of the classes
|
||||
/// that are proper supersets of this register class.
|
||||
sc_iterator superclasses_begin() const {
|
||||
|
||||
Reference in New Issue
Block a user