ROSE  0.11.2.0
BinaryUnparserX86.h
1 #ifndef ROSE_BinaryAnalysis_UnparserX86_H
2 #define ROSE_BinaryAnalysis_UnparserX86_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 X86Settings: public Settings {};
12 
13 class X86: public Base {
14  X86Settings settings_;
15 
16 protected:
17  explicit X86(const X86Settings &settings)
18  : settings_(settings) {}
19 
20 public:
21  static Ptr instance(const X86Settings &settings = X86Settings()) {
22  return Ptr(new X86(settings));
23  }
24 
25  Ptr copy() const ROSE_OVERRIDE {
26  return instance(settings());
27  }
28 
29  const X86Settings& settings() const ROSE_OVERRIDE { return settings_; }
30  X86Settings& settings() ROSE_OVERRIDE { return settings_; }
31 
32 protected:
33  void emitInstructionMnemonic(std::ostream&, SgAsmInstruction*, State&) const ROSE_OVERRIDE;
34  void emitOperandBody(std::ostream&, SgAsmExpression*, State&) const ROSE_OVERRIDE;
35  void emitTypeName(std::ostream&, SgAsmType*, 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.
Base class for binary types.