1#ifndef ROSE_BinaryAnalysis_InstructionSemantics_DispatcherAarch32_H 
    2#define ROSE_BinaryAnalysis_InstructionSemantics_DispatcherAarch32_H 
    3#include <featureTests.h> 
    4#ifdef ROSE_ENABLE_ASM_AARCH32 
    6#include <Rose/BinaryAnalysis/BasicTypes.h> 
    7#include <Rose/BinaryAnalysis/InstructionEnumsAarch32.h> 
    8#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics.h> 
   10#ifdef ROSE_ENABLE_BOOST_SERIALIZATION 
   11#include <boost/serialization/access.hpp> 
   12#include <boost/serialization/base_object.hpp> 
   13#include <boost/serialization/export.hpp> 
   14#include <boost/serialization/split_member.hpp> 
   18namespace BinaryAnalysis {
 
   19namespace InstructionSemantics {
 
   22using DispatcherAarch32Ptr = boost::shared_ptr<class DispatcherAarch32>;
 
   30    using Ptr = DispatcherAarch32Ptr;
 
   39    RegisterDescriptor REG_PC, REG_SP, REG_LR;
 
   40    RegisterDescriptor REG_PSTATE_N, REG_PSTATE_Z, REG_PSTATE_C, REG_PSTATE_V, REG_PSTATE_T; 
 
   41    RegisterDescriptor REG_PSTATE_E, REG_PSTATE_Q, REG_PSTATE_GE;
 
   42    RegisterDescriptor REG_PSTATE_NZCV;                 
 
   43    RegisterDescriptor REG_SPSR, REG_CPSR;
 
   44    RegisterDescriptor REG_DTRTX;                       
 
   45    RegisterDescriptor REG_UNKNOWN;                     
 
   48#ifdef ROSE_ENABLE_BOOST_SERIALIZATION 
   50    friend class boost::serialization::access;
 
   53    void save(S &s, 
const unsigned )
 const {
 
   54        s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Super);
 
   58    void load(S &s, 
const unsigned ) {
 
   59        s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Super);
 
   60        initializeRegisterDescriptors();
 
   61        initializeInsnDispatchTable();
 
   65    BOOST_SERIALIZATION_SPLIT_MEMBER();
 
   73    DispatcherAarch32(
const Architecture::BaseConstPtr&);
 
   83    static DispatcherAarch32Ptr instance(
const Architecture::BaseConstPtr&);
 
   96    void initializeRegisterDescriptors();
 
  101    void initializeInsnDispatchTable();
 
  104    void initializeMemory();
 
  108    RegisterDescriptor instructionPointerRegister() 
const override;
 
  109    RegisterDescriptor stackPointerRegister() 
const override;
 
  110    RegisterDescriptor callReturnRegister() 
const override;
 
  132    void setThumbMode(SgAsmAarch32Instruction*);        
 
  159    using TwoValues = std::tuple<BaseSemantics::SValuePtr, BaseSemantics::SValuePtr>;
 
  161    enum class SrType { LSL, LSR, ASR, ROR, RRX };      
 
  195                       BranchType branchType); 
 
  223#ifdef ROSE_ENABLE_BOOST_SERIALIZATION 
  224BOOST_CLASS_EXPORT_KEY(Rose::BinaryAnalysis::InstructionSemantics::DispatcherAarch32);
 
Dispatches instructions through the RISC layer.
 
Base class for expressions.
 
Base class for machine instructions.
 
bool signBit(T value)
Returns true if the sign bit is set, false if clear.
 
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< Node > Ptr
Reference counting pointer.
 
Unsigned signExtend(Unsigned src, size_t n)
Sign extend part of a value to the full width of the src type.
 
ROSE_DLL_API void load(SgProject *project, std::list< std::string > const &filepaths)
Load ASTs that have been saved to files.
 
std::string join(const std::string &separator, const Container &container)
Join individual items to form a single string.
 
const char * SrType(int64_t)
Convert Rose::BinaryAnalysis::InstructionSemantics::DispatcherAarch32::SrType enum constant to a stri...
 
const char * BranchType(int64_t)
Convert Rose::BinaryAnalysis::InstructionSemantics::DispatcherAarch32::BranchType enum constant to a ...