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