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