ROSE  0.9.9.109
BinaryUnparserArm.h
1 #ifndef ROSE_BinaryAnalysis_UnparserArm_H
2 #define ROSE_BinaryAnalysis_UnparserArm_H
3 
4 #include <BinaryUnparserBase.h>
5 
6 namespace Rose {
7 namespace BinaryAnalysis {
8 namespace Unparser {
9 
10 struct ArmSettings: public Settings {};
11 
12 class Arm: public Base {
13  ArmSettings settings_;
14 
15 protected:
16  explicit Arm(const ArmSettings &settings)
17  : settings_(settings) {}
18 
19 public:
20  ~Arm() {}
21 
22  static Ptr instance(const ArmSettings &settings = ArmSettings()) {
23  return Ptr(new Arm(settings));
24  }
25 
26  Ptr copy() const ROSE_OVERRIDE {
27  return instance(settings());
28  }
29 
30  const ArmSettings& settings() const ROSE_OVERRIDE { return settings_; }
31  ArmSettings& settings() ROSE_OVERRIDE { return settings_; }
32 
33 protected:
34  void emitInstructionMnemonic(std::ostream&, SgAsmInstruction*, State&) const ROSE_OVERRIDE;
35  void emitOperandBody(std::ostream&, SgAsmExpression*, State&) const ROSE_OVERRIDE;
36 
37 protected:
38  static std::string unparseArmCondition(ArmInstructionCondition);
39  void outputExpr(std::ostream&, SgAsmExpression*, State&, std::string sign, std::string *suffix = NULL) const;
40 };
41 
42 } // namespace
43 } // namespace
44 } // namespace
45 
46 #endif
Base class for machine instructions.
Abstract base class for unparsers.
void emitOperandBody(std::ostream &, SgAsmExpression *, State &) const ROSE_OVERRIDE
Mid-level unparser function.
Main namespace for the ROSE library.
Settings that control unparsing.
void emitInstructionMnemonic(std::ostream &, SgAsmInstruction *, State &) const ROSE_OVERRIDE
Mid-level unparser function.
Base class for expressions.