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