X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=utils%2FTableGen%2FCodeEmitterGen.h;h=cb272bd56d25e009166adc2e59be1dfa3292b7ba;hb=0d52ff1f7b993750a74a5d4432273092de9af069;hp=18ebcd4bd4d0942652fc20b2569361dba22fc7f3;hpb=9fff7e194a2d8aa3abe92efa506b1fbe83583f53;p=oota-llvm.git diff --git a/utils/TableGen/CodeEmitterGen.h b/utils/TableGen/CodeEmitterGen.h index 18ebcd4bd4d..cb272bd56d2 100644 --- a/utils/TableGen/CodeEmitterGen.h +++ b/utils/TableGen/CodeEmitterGen.h @@ -1,23 +1,43 @@ //===- CodeEmitterGen.h - Code Emitter Generator ----------------*- C++ -*-===// // +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// FIXME: document // //===----------------------------------------------------------------------===// #ifndef CODEMITTERGEN_H #define CODEMITTERGEN_H -#include "Record.h" -#include +#include "TableGenBackend.h" +#include +#include +#include -struct CodeEmitterGen { +namespace llvm { + +class RecordVal; +class BitsInit; + +class CodeEmitterGen : public TableGenBackend { RecordKeeper &Records; - public: CodeEmitterGen(RecordKeeper &R) : Records(R) {} - - void createEmitter(std::ostream &o); + + // run - Output the code emitter + void run(std::ostream &o); +private: void emitMachineOpEmitter(std::ostream &o, const std::string &Namespace); void emitGetValueBit(std::ostream &o, const std::string &Namespace); + void reverseBits(std::vector &Insts); + int getVariableBit(const std::string &VarName, BitsInit *BI, int bit); }; +} // End llvm namespace + #endif