ROSE 0.11.145.147
Architecture/Cil.h
1#ifndef ROSE_BinaryAnalysis_Architecture_Cil_H
2#define ROSE_BinaryAnalysis_Architecture_Cil_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
22class Cil: public Base {
23public:
24 using Ptr = CilPtr;
25
26protected:
27 Cil(); // use `instance` instead
28public:
29 ~Cil();
30
31public:
33 static Ptr instance();
34
35public:
37 bool matchesHeader(SgAsmGenericHeader*) const override;
38
41 std::string instructionMnemonic(const SgAsmInstruction*) const override;
42 std::string instructionDescription(const SgAsmInstruction*) const override;
43 bool isUnknown(const SgAsmInstruction*) const override;
45 bool isFunctionCallFast(const std::vector<SgAsmInstruction*>&, rose_addr_t *target, rose_addr_t *ret) const override;
46 bool isFunctionReturnFast(const std::vector<SgAsmInstruction*>&) const override;
48 AddressSet getSuccessors(SgAsmInstruction*, bool &complete) const override;
49
52};
53
54} // namespace
55} // namespace
56} // namespace
57
58#endif
59#endif
Information about alignments.
Definition Alignment.h:16
Base class for architecture definitions.
Architecture-specific information for the Common Intermediate Language.
bool matchesHeader(SgAsmGenericHeader *) const override
Tests whether this architecture matches a file header.
RegisterDictionary::Ptr registerDictionary() const override
Property: Register dictionary.
bool isFunctionReturnFast(const std::vector< SgAsmInstruction * > &) const override
Returns true if the specified basic block looks like a function return.
bool isUnknown(const SgAsmInstruction *) const override
Returns true if the instruction is the special "unknown" instruction.
Sawyer::Optional< rose_addr_t > branchTarget(SgAsmInstruction *) const override
Obtains the virtual address for a branching 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.
bool terminatesBasicBlock(SgAsmInstruction *) const override
Determines whether the specified instruction normally terminates a basic block.
std::string instructionMnemonic(const SgAsmInstruction *) const override
Mnemonic for an instruction.
Sawyer::Container::Interval< size_t > bytesPerInstruction() const override
Valid sizes for encoded machine instructions.
static Ptr instance()
Allocating constructor.
Unparser::BasePtr newUnparser() const override
Construct and return a new instruction unparser.
Disassembler::BasePtr newInstructionDecoder() const override
Construct and return a new instruction decoder.
std::string instructionDescription(const SgAsmInstruction *) const override
Description for an instruction.
Alignment instructionAlignment() const override
Alignment for encoded machine instructions.
AddressSet getSuccessors(SgAsmInstruction *, bool &complete) const override
Control flow successors for a single instruction.
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< Cil > CilPtr
Reference counted pointer for Cil.
The ROSE library.
const char * Architecture(int64_t)
Convert Rose::BinaryAnalysis::Disassembler::Mips::Decoder::Architecture enum constant to a string.