Fix typo pointed out in pr9339.
[llvm/stm8.git] / utils / TableGen / CodeEmitterGen.h
bloba874d970feac6c4116a31bb1ddc1bf365196b18d
1 //===- CodeEmitterGen.h - Code Emitter Generator ----------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // FIXME: document
12 //===----------------------------------------------------------------------===//
14 #ifndef CODEMITTERGEN_H
15 #define CODEMITTERGEN_H
17 #include "TableGenBackend.h"
18 #include <vector>
19 #include <string>
21 namespace llvm {
23 class RecordVal;
24 class BitsInit;
25 class CodeGenTarget;
27 class CodeEmitterGen : public TableGenBackend {
28 RecordKeeper &Records;
29 public:
30 CodeEmitterGen(RecordKeeper &R) : Records(R) {}
32 // run - Output the code emitter
33 void run(raw_ostream &o);
34 private:
35 void emitMachineOpEmitter(raw_ostream &o, const std::string &Namespace);
36 void emitGetValueBit(raw_ostream &o, const std::string &Namespace);
37 void reverseBits(std::vector<Record*> &Insts);
38 int getVariableBit(const std::string &VarName, BitsInit *BI, int bit);
39 std::string getInstructionCase(Record *R, CodeGenTarget &Target);
40 void
41 AddCodeToMergeInOperand(Record *R, BitsInit *BI, const std::string &VarName,
42 unsigned &NumberedOp,
43 std::string &Case, CodeGenTarget &Target);
47 } // End llvm namespace
49 #endif