2003-08-01 04:38:38 +00:00
|
|
|
//===- RegisterInfoEmitter.h - Generate a Register File Desc. ---*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// This tablegen backend is responsible for emitting a description of a target
|
|
|
|
// register file for a code generator. It uses instances of the Register,
|
|
|
|
// RegisterAliases, and RegisterClass classes to gather this information.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef REGISTER_INFO_EMITTER_H
|
|
|
|
#define REGISTER_INFO_EMITTER_H
|
|
|
|
|
2003-08-06 04:36:35 +00:00
|
|
|
#include "TableGenBackend.h"
|
2003-08-01 04:38:38 +00:00
|
|
|
|
2003-08-06 04:36:35 +00:00
|
|
|
class RegisterInfoEmitter : public TableGenBackend {
|
2003-08-01 04:38:38 +00:00
|
|
|
RecordKeeper &Records;
|
|
|
|
public:
|
|
|
|
RegisterInfoEmitter(RecordKeeper &R) : Records(R) {}
|
|
|
|
|
|
|
|
// run - Output the register file description, returning true on failure.
|
|
|
|
void run(std::ostream &o);
|
|
|
|
|
|
|
|
// runHeader - Emit a header fragment for the register info emitter.
|
|
|
|
void runHeader(std::ostream &o);
|
2003-08-01 05:59:20 +00:00
|
|
|
|
|
|
|
// runEnums - Print out enum values for all of the registers.
|
|
|
|
void runEnums(std::ostream &o);
|
2003-08-01 04:38:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|