ROSE  0.9.9.109
BinaryUnparserM68k.h
1 #ifndef ROSE_BinaryAnalysis_UnparserM68k_H
2 #define ROSE_BinaryAnalysis_UnparserM68k_H
3 
4 #include <BinaryUnparserBase.h>
5 
6 namespace Rose {
7 namespace BinaryAnalysis {
8 namespace Unparser {
9 
10 struct M68kSettings: public Settings {};
11 
12 class M68k: public Base {
13  M68kSettings settings_;
14 
15 protected:
16  explicit M68k(const M68kSettings &settings)
17  : settings_(settings) {}
18 
19 public:
20  static Ptr instance(const M68kSettings &settings = M68kSettings()) {
21  return Ptr(new M68k(settings));
22  }
23 
24  Ptr copy() const ROSE_OVERRIDE {
25  return instance(settings());
26  }
27 
28  const M68kSettings& settings() const ROSE_OVERRIDE { return settings_; }
29  M68kSettings& 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
Base class for machine instructions.
void emitOperandBody(std::ostream &, SgAsmExpression *, State &) const ROSE_OVERRIDE
Mid-level unparser function.
Abstract base class for unparsers.
Main namespace for the ROSE library.
Settings that control unparsing.
void emitInstruction(std::ostream &, SgAsmInstruction *, State &) const ROSE_OVERRIDE
Mid-level unparser function.
Base class for expressions.