ROSE  0.9.9.109
BinaryUnparserMips.h
1 #ifndef ROSE_BinaryAnalysis_UnparserMips_H
2 #define ROSE_BinaryAnalysis_UnparserMips_H
3 
4 #include <BinaryUnparserBase.h>
5 
6 namespace Rose {
7 namespace BinaryAnalysis {
8 namespace Unparser {
9 
10 struct MipsSettings: public Settings {};
11 
12 class Mips: public Base {
13  MipsSettings settings_;
14 
15 protected:
16  explicit Mips(const MipsSettings &settings)
17  : settings_(settings) {}
18 
19 public:
20  static Ptr instance(const MipsSettings &settings = MipsSettings()) {
21  return Ptr(new Mips(settings));
22  }
23 
24  Ptr copy() const ROSE_OVERRIDE {
25  return instance(settings());
26  }
27 
28  const MipsSettings& settings() const ROSE_OVERRIDE { return settings_; }
29  MipsSettings& settings() ROSE_OVERRIDE { return settings_; }
30 
31 protected:
32  void emitInstruction(std::ostream&, SgAsmInstruction*, State&) const ROSE_OVERRIDE;
33  void emitOperandBody(std::ostream&, SgAsmExpression*, State&) const ROSE_OVERRIDE;
34 
35 private:
36  void outputExpr(std::ostream&, SgAsmExpression*, State&) const;
37 };
38 
39 } // namespace
40 } // namespace
41 } // namespace
42 
43 #endif
void emitOperandBody(std::ostream &, SgAsmExpression *, State &) const ROSE_OVERRIDE
Mid-level unparser function.
Base class for machine instructions.
Abstract base class for unparsers.
Main namespace for the ROSE library.
Settings that control unparsing.
Base class for expressions.
void emitInstruction(std::ostream &, SgAsmInstruction *, State &) const ROSE_OVERRIDE
Mid-level unparser function.