ROSE 0.11.145.147
Motorola.h
1#ifndef ROSE_BinaryAnalysis_Architecture_Motorola_H
2#define ROSE_BinaryAnalysis_Architecture_Motorola_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_BINARY_ANALYSIS
5#include <Rose/BinaryAnalysis/Architecture/Base.h>
6
7namespace Rose {
8namespace BinaryAnalysis {
9namespace Architecture {
10
12class Motorola: public Base {
13public:
14 using Ptr = MotorolaPtr;
15
16protected:
17 explicit Motorola(const std::string &name);
18public:
19 ~Motorola();
20
21public:
23
26 std::string instructionMnemonic(const SgAsmInstruction*) const override;
27 std::string instructionDescription(const SgAsmInstruction*) const override;
28 bool isUnknown(const SgAsmInstruction*) const override;
30 bool isFunctionCallFast(const std::vector<SgAsmInstruction*>&, rose_addr_t *target, rose_addr_t *ret) const override;
31 bool isFunctionCallSlow(const std::vector<SgAsmInstruction*>&, rose_addr_t *target, rose_addr_t *ret) const override;
32 bool isFunctionReturnFast(const std::vector<SgAsmInstruction*>&) const override;
34 AddressSet getSuccessors(SgAsmInstruction*, bool &complete) const override;
35 AddressSet getSuccessors(const std::vector<SgAsmInstruction*> &basicBlock, bool &complete,
36 const MemoryMapPtr &initial_memory = MemoryMapPtr()) const override;
37
39
42
43 std::vector<Partitioner2::FunctionPrologueMatcherPtr>
45
46 virtual std::vector<Partitioner2::BasicBlockCallbackPtr>
48};
49
50} // namespace
51} // namespace
52} // namespace
53
54#endif
55#endif
Information about alignments.
Definition Alignment.h:16
Base class for architecture definitions.
const std::string & name() const
Property: Architecture definition name.
Base class for Motorola processors.
Definition Motorola.h:12
bool isFunctionCallSlow(const std::vector< SgAsmInstruction * > &, rose_addr_t *target, rose_addr_t *ret) const override
Returns true if the specified basic block looks like a function call.
virtual InstructionSemantics::BaseSemantics::DispatcherPtr newInstructionDispatcher(const InstructionSemantics::BaseSemantics::RiscOperatorsPtr &) const override
Construct and return a new instruction dispatcher.
AddressSet getSuccessors(SgAsmInstruction *, bool &complete) const override
Control flow successors for a single instruction.
bool isFunctionCallFast(const std::vector< SgAsmInstruction * > &, rose_addr_t *target, rose_addr_t *ret) const override
Returns true if the specified basic block looks like a function call.
Sawyer::Container::Interval< size_t > bytesPerInstruction() const override
Valid sizes for encoded machine instructions.
AddressSet getSuccessors(const std::vector< SgAsmInstruction * > &basicBlock, bool &complete, const MemoryMapPtr &initial_memory=MemoryMapPtr()) const override
Control flow successors for a basic block.
std::vector< Partitioner2::FunctionPrologueMatcherPtr > functionPrologueMatchers(const Partitioner2::EnginePtr &) const override
Instruction patterns matching function prologues.
Unparser::BasePtr newUnparser() const override
Construct and return a new instruction unparser.
Sawyer::Optional< rose_addr_t > branchTarget(SgAsmInstruction *) const override
Obtains the virtual address for a branching instruction.
bool isFunctionReturnFast(const std::vector< SgAsmInstruction * > &) const override
Returns true if the specified basic block looks like a function return.
bool terminatesBasicBlock(SgAsmInstruction *) const override
Determines whether the specified instruction normally terminates a basic block.
std::string instructionDescription(const SgAsmInstruction *) const override
Description for an instruction.
bool isUnknown(const SgAsmInstruction *) const override
Returns true if the instruction is the special "unknown" instruction.
Alignment instructionAlignment() const override
Alignment for encoded machine instructions.
virtual std::vector< Partitioner2::BasicBlockCallbackPtr > basicBlockCreationHooks(const Partitioner2::EnginePtr &) const override
Architecture-specific basic block callbacks for partitioning.
const CallingConvention::Dictionary & callingConventions() const override
Property: Calling convention definitions.
std::string instructionMnemonic(const SgAsmInstruction *) const override
Mnemonic for an instruction.
Range of values delimited by endpoints.
Definition Interval.h:31
Holds a value or nothing.
Definition Optional.h:56
Base class for machine instructions.
std::shared_ptr< Motorola > MotorolaPtr
Reference counted pointer for Motorola.
std::vector< DefinitionPtr > Dictionary
An ordered collection of calling convention definitions.
boost::shared_ptr< RiscOperators > RiscOperatorsPtr
Shared-ownership pointer to a RISC operators object.
boost::shared_ptr< Dispatcher > DispatcherPtr
Shared-ownership pointer to a semantics instruction dispatcher.
Sawyer::SharedPointer< MemoryMap > MemoryMapPtr
Reference counting pointer.
The ROSE library.
const char * Architecture(int64_t)
Convert Rose::BinaryAnalysis::Disassembler::Mips::Decoder::Architecture enum constant to a string.