Instructions.push_back(II.take());
}
+ // Parse all of the InstAlias definitions.
+ std::vector<Record*> AllInstAliases =
+ Records.getAllDerivedDefinitions("InstAlias");
+ for (unsigned i = 0, e = AllInstAliases.size(); i != e; ++i) {
+ CodeGenInstAlias *Alias = new CodeGenInstAlias(AllInstAliases[i]);
+
+
+ (void)Alias;
+ }
// Build info for the register classes.
BuildRegisterClasses(SingletonRegisters);
return Res;
}
+
+//===----------------------------------------------------------------------===//
+/// CodeGenInstAlias Implementation
+//===----------------------------------------------------------------------===//
+
+CodeGenInstAlias::CodeGenInstAlias(Record *R) : TheDef(R), Operands(R) {
+ AsmString = R->getValueAsString("AsmString");
+
+
+}
static std::string FlattenAsmStringVariants(StringRef AsmString,
unsigned Variant);
};
- }
+
+
+ /// CodeGenInstAlias - This represents an InstAlias definition.
+ class CodeGenInstAlias {
+ public:
+ Record *TheDef; // The actual record defining this InstAlias.
+
+ /// AsmString - The format string used to emit a .s file for the
+ /// instruction.
+ std::string AsmString;
+
+ /// Operands - This is information about the (ins) and (outs) list specified
+ /// to the alias.
+ CGIOperandList Operands;
+
+ CodeGenInstAlias(Record *R);
+ };
+}
#endif