mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
Define DAGOperand, an empty base class for RegisterClass and Operand. This allows one to write multiclasses that are polymorphic over both registers and non-register operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159162 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
58fb3401fa
commit
2c5fbb9bcb
@ -111,13 +111,20 @@ class RegisterWithSubRegs<string n, list<Register> subregs> : Register<n> {
|
||||
let SubRegs = subregs;
|
||||
}
|
||||
|
||||
// DAGOperand - An empty base class that unifies RegisterClass's and other forms
|
||||
// of Operand's that are legal as type qualifiers in DAG patterns. This should
|
||||
// only ever be used for defining multiclasses that are polymorphic over both
|
||||
// RegisterClass's and other Operand's.
|
||||
class DAGOperand { }
|
||||
|
||||
// RegisterClass - Now that all of the registers are defined, and aliases
|
||||
// between registers are defined, specify which registers belong to which
|
||||
// register classes. This also defines the default allocation order of
|
||||
// registers by register allocators.
|
||||
//
|
||||
class RegisterClass<string namespace, list<ValueType> regTypes, int alignment,
|
||||
dag regList, RegAltNameIndex idx = NoRegAltName> {
|
||||
dag regList, RegAltNameIndex idx = NoRegAltName>
|
||||
: DAGOperand {
|
||||
string Namespace = namespace;
|
||||
|
||||
// RegType - Specify the list ValueType of the registers in this register
|
||||
@ -537,7 +544,7 @@ def ImmAsmOperand : AsmOperandClass {
|
||||
/// Operand Types - These provide the built-in operand types that may be used
|
||||
/// by a target. Targets can optionally provide their own operand types as
|
||||
/// needed, though this should not be needed for RISC targets.
|
||||
class Operand<ValueType ty> {
|
||||
class Operand<ValueType ty> : DAGOperand {
|
||||
ValueType Type = ty;
|
||||
string PrintMethod = "printOperand";
|
||||
string EncoderMethod = "";
|
||||
|
Loading…
x
Reference in New Issue
Block a user