ROSE  0.11.2.0
BinaryUnparserM68k.h
1 #ifndef ROSE_BinaryAnalysis_UnparserM68k_H
2 #define ROSE_BinaryAnalysis_UnparserM68k_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 M68kSettings: public Settings {};
12 
13 class M68k: public Base {
14  M68kSettings settings_;
15 
16 protected:
17  explicit M68k(const M68kSettings &settings)
18  : settings_(settings) {}
19 
20 public:
21  static Ptr instance(const M68kSettings &settings = M68kSettings()) {
22  return Ptr(new M68k(settings));
23  }
24 
25  Ptr copy() const ROSE_OVERRIDE {
26  return instance(settings());
27  }
28 
29  const M68kSettings& settings() const ROSE_OVERRIDE { return settings_; }
30  M68kSettings& 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.