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