ROSE 0.11.145.192
Mips32.h
1#ifndef ROSE_BinaryAnalysis_Architecture_Mips32_H
2#define ROSE_BinaryAnalysis_Architecture_Mips32_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
25class Mips32: public Base {
26public:
27 using Ptr = Mips32Ptr;
28
29protected:
30 explicit Mips32(ByteOrder::Endianness); // use `instance` instead
31public:
32 ~Mips32();
33
34public:
37
38public:
41 bool matchesHeader(SgAsmGenericHeader*) const override;
42
45 std::string instructionMnemonic(const SgAsmInstruction*) const override;
46 std::string instructionDescription(const SgAsmInstruction*) const override;
47 bool isUnknown(const SgAsmInstruction*) const override;
48 bool isControlTransfer(const SgAsmInstruction*) const override;
50 bool isFunctionCallFast(const std::vector<SgAsmInstruction*>&, rose_addr_t *target, rose_addr_t *ret) const override;
51 bool isFunctionReturnFast(const std::vector<SgAsmInstruction*>&) const override;
53 AddressSet getSuccessors(SgAsmInstruction*, bool &complete) const override;
54
57
60
61 std::vector<Partitioner2::FunctionPrologueMatcherPtr>
63};
64
65} // namespace
66} // namespace
67} // namespace
68
69#endif
70#endif
Information about alignments.
Definition Alignment.h:16
Base class for architecture definitions.
Architecture-specific information for MIPS with 32-bit word size.
Definition Mips32.h:25
RegisterDictionaryPtr interruptDictionary() const override
Property: Interrupt dictionary.
bool isControlTransfer(const SgAsmInstruction *) const override
Returns true if the specified instruction is a control transfer instruction.
Sawyer::Optional< rose_addr_t > branchTarget(SgAsmInstruction *) const override
Obtains the virtual address for a branching instruction.
bool isUnknown(const SgAsmInstruction *) const override
Returns true if the instruction is the special "unknown" instruction.
RegisterDictionaryPtr registerDictionary() const override
Property: Register dictionary.
Sawyer::Container::Interval< size_t > bytesPerInstruction() const override
Valid sizes for encoded machine instructions.
Alignment instructionAlignment() const override
Alignment for encoded machine instructions.
bool terminatesBasicBlock(SgAsmInstruction *) const override
Determines whether the specified instruction normally terminates a basic block.
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.
Unparser::BasePtr newUnparser() const override
Construct and return a new instruction unparser.
static Ptr instance(ByteOrder::Endianness)
Allocating constructor.
InstructionSemantics::BaseSemantics::DispatcherPtr newInstructionDispatcher(const InstructionSemantics::BaseSemantics::RiscOperatorsPtr &) const override
Construct and return a new instruction dispatcher.
std::vector< Partitioner2::FunctionPrologueMatcherPtr > functionPrologueMatchers(const Partitioner2::EnginePtr &) const override
Instruction patterns matching function prologues.
AddressSet getSuccessors(SgAsmInstruction *, bool &complete) const override
Control flow successors for a single instruction.
Disassembler::BasePtr newInstructionDecoder() const override
Construct and return a new instruction decoder.
bool isFunctionReturnFast(const std::vector< SgAsmInstruction * > &) const override
Returns true if the specified basic block looks like a function return.
std::string instructionDescription(const SgAsmInstruction *) const override
Description for an instruction.
std::string instructionMnemonic(const SgAsmInstruction *) const override
Mnemonic for an instruction.
bool matchesHeader(SgAsmGenericHeader *) const override
Tests whether this architecture matches a file header.
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< Mips32 > Mips32Ptr
Reference counted pointer for Mips32.
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.
The ROSE library.
const char * Architecture(int64_t)
Convert Rose::BinaryAnalysis::Disassembler::Mips::Decoder::Architecture enum constant to a string.