ROSE 0.11.145.192
ArmAarch32.h
1#ifndef ROSE_BinaryAnalysis_Architecture_ArmAarch32_H
2#define ROSE_BinaryAnalysis_Architecture_ArmAarch32_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_ASM_AARCH32
5#include <Rose/BinaryAnalysis/Architecture/Base.h>
6
7namespace Rose {
8namespace BinaryAnalysis {
9namespace Architecture {
10
46class ArmAarch32: public Base {
48 // Types
50public:
51 using Ptr = ArmAarch32Ptr;
52
56 enum class InstructionSet {
57 T32,
58 A32
59 };
60
62 // Data members
64private:
65 InstructionSet instructionSet_ = InstructionSet::A32;
66
68 // Construction
70protected:
71 explicit ArmAarch32(InstructionSet); // use `instance` instead
72public:
73 ~ArmAarch32();
74
75public:
77 static Ptr instance(InstructionSet);
78
80 // Properties
82public:
86 InstructionSet instructionSet() const;
87
89 // Overrides
91public:
92 RegisterDictionary::Ptr registerDictionary() const override;
93 bool matchesHeader(SgAsmGenericHeader*) const override;
94
95 Sawyer::Container::Interval<size_t> bytesPerInstruction() const override;
96 Alignment instructionAlignment() const override;
97 std::string instructionMnemonic(const SgAsmInstruction*) const override;
98 std::string instructionDescription(const SgAsmInstruction*) const override;
99 bool isUnknown(const SgAsmInstruction*) const override;
100 bool terminatesBasicBlock(SgAsmInstruction*) const override;
101 bool isFunctionCallFast(const std::vector<SgAsmInstruction*>&, rose_addr_t *target, rose_addr_t *ret) const override;
102 bool isFunctionReturnFast(const std::vector<SgAsmInstruction*>&) const override;
103 Sawyer::Optional<rose_addr_t> branchTarget(SgAsmInstruction*) const override;
104 AddressSet getSuccessors(SgAsmInstruction*, bool &complete) const override;
105
106 Disassembler::BasePtr newInstructionDecoder() const override;
107 Unparser::BasePtr newUnparser() const override;
108
109 virtual InstructionSemantics::BaseSemantics::DispatcherPtr
110 newInstructionDispatcher(const InstructionSemantics::BaseSemantics::RiscOperatorsPtr&) const override;
111};
112
113} // namespace
114} // namespace
115} // namespace
116
117#endif
118#endif
Range of values delimited by endpoints.
Definition Interval.h:31
Holds a value or nothing.
Definition Optional.h:56
Base class for container file headers.
Base class for machine instructions.
std::shared_ptr< ArmAarch32 > ArmAarch32Ptr
Reference counted pointer for ArmAarch32.
InstructionSemantics::BaseSemantics::DispatcherPtr newInstructionDispatcher(const std::string &name, const InstructionSemantics::BaseSemantics::RiscOperatorsPtr &)
Create a new instruction dispatcher by name.
Sawyer::SharedPointer< Node > Ptr
Reference counting pointer.
Sawyer::Container::Set< Address > AddressSet
Set of addresses.
Definition AddressSet.h:13
The ROSE library.
const char * InstructionSet(int64_t)
Convert Rose::BinaryAnalysis::Architecture::ArmAarch32::InstructionSet enum constant to a string.
const char * Architecture(int64_t)
Convert Rose::BinaryAnalysis::Disassembler::Mips::Decoder::Architecture enum constant to a string.
const char * Alignment(int64_t)
Convert Rose::FormattedTable::Alignment enum constant to a string.