ROSE 0.11.145.147
Unparser/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#include <Rose/BinaryAnalysis/BasicTypes.h>
8
9namespace Rose {
10namespace BinaryAnalysis {
11namespace Unparser {
12
13std::string unparseM68kMnemonic(SgAsmM68kInstruction*);
14std::string unparseM68kExpression(SgAsmExpression*, const LabelMap*, RegisterDictionaryPtr);
15
17struct M68kSettings: public Settings {};
18
20class M68k: public Base {
21 M68kSettings settings_;
22
23protected:
24 explicit M68k(const Architecture::BaseConstPtr&, const M68kSettings&);
25
26public:
27 ~M68k();
28
29public:
30 static Ptr instance(const Architecture::BaseConstPtr&, const M68kSettings& = M68kSettings());
31
32 Ptr copy() const override;
33
34 const M68kSettings& settings() const override { return settings_; }
35 M68kSettings& settings() override { return settings_; }
36
37protected:
38 void emitInstruction(std::ostream&, SgAsmInstruction*, State&) const override;
39 void emitOperandBody(std::ostream&, SgAsmExpression*, State&) const override;
40
41private:
42 void outputExpr(std::ostream&, SgAsmExpression*, State&) const;
43};
44
45} // namespace
46} // namespace
47} // namespace
48
49#endif
50#endif
Abstract base class for unparsers.
Unparser for Motorola M68k and related instruction sets.
const M68kSettings & settings() const override
Property: Settings associated with this unparser.
void emitOperandBody(std::ostream &, SgAsmExpression *, State &) const override
Mid-level unparser function.
void emitInstruction(std::ostream &, SgAsmInstruction *, State &) const override
Mid-level unparser function.
M68kSettings & settings() override
Property: Settings associated with this unparser.
Base class for expressions.
Base class for machine instructions.
std::shared_ptr< const Base > BaseConstPtr
Reference counted pointer for Architecture::Base.
std::map< uint64_t, std::string > LabelMap
Map from address to label.
Sawyer::SharedPointer< RegisterDictionary > RegisterDictionaryPtr
Reference counting pointer.
The ROSE library.
Settings specific to the M68k unparser.
Settings that control unparsing.