ROSE  0.9.9.139
BinaryUnparserPowerpc.h
1 #ifndef ROSE_BinaryAnalysis_UnparserPowerpc_H
2 #define ROSE_BinaryAnalysis_UnparserPowerpc_H
3 
4 #include <BinaryUnparserBase.h>
5 
6 namespace Rose {
7 namespace BinaryAnalysis {
8 namespace Unparser {
9 
10 struct PowerpcSettings: public Settings {};
11 
12 class Powerpc: public Base {
13  PowerpcSettings settings_;
14 
15 protected:
16  explicit Powerpc(const PowerpcSettings &settings)
17  : settings_(settings) {}
18 
19 public:
20  static Ptr instance(const PowerpcSettings &settings = PowerpcSettings()) {
21  return Ptr(new Powerpc(settings));
22  }
23 
24  Ptr copy() const ROSE_OVERRIDE {
25  return instance(settings());
26  }
27 
28  const PowerpcSettings& settings() const ROSE_OVERRIDE { return settings_; }
29  PowerpcSettings& 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
44 
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.