1#ifndef ROSE_BinaryAnalysis_InstructionSemantics_DispatcherAarch64_H 
    2#define ROSE_BinaryAnalysis_InstructionSemantics_DispatcherAarch64_H 
    3#include <featureTests.h> 
    4#ifdef ROSE_ENABLE_ASM_AARCH64 
    6#include <Rose/BinaryAnalysis/BasicTypes.h> 
    7#include <Rose/BinaryAnalysis/InstructionEnumsAarch64.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 DispatcherAarch64Ptr = boost::shared_ptr<class DispatcherAarch64>;
 
   30    using Ptr = DispatcherAarch64Ptr;
 
   39    RegisterDescriptor REG_PC, REG_SP, REG_LR;
 
   40    RegisterDescriptor REG_CPSR_N, REG_CPSR_Z, REG_CPSR_C, REG_CPSR_V;
 
   43#ifdef ROSE_ENABLE_BOOST_SERIALIZATION 
   45    friend class boost::serialization::access;
 
   48    void save(S &s, 
const unsigned )
 const {
 
   49        s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Super);
 
   53    void load(S &s, 
const unsigned ) {
 
   54        s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Super);
 
   55        initializeRegisterDescriptors();
 
   56        initializeInsnDispatchTable();
 
   60    BOOST_SERIALIZATION_SPLIT_MEMBER();
 
   68    DispatcherAarch64(
const Architecture::BaseConstPtr&);
 
   78    static DispatcherAarch64Ptr instance(
const Architecture::BaseConstPtr&);
 
   91    void initializeRegisterDescriptors();
 
   96    void initializeInsnDispatchTable();
 
   99    void initializeMemory();
 
  118            : n(n), z(z), c(c), v(v) {}
 
  131    std::pair<uint64_t, uint64_t> decodeBitMasks(
size_t m, 
bool immN, uint64_t imms, uint64_t immr, 
bool immediate);
 
  135                      uint64_t immR, uint64_t immS);
 
  139                              uint64_t immR, uint64_t immS);
 
  143                            uint64_t immR, uint64_t immS);
 
  147    RegisterDescriptor instructionPointerRegister() 
const override;
 
  148    RegisterDescriptor stackPointerRegister() 
const override;
 
  149    RegisterDescriptor callReturnRegister() 
const override;
 
  156#ifdef ROSE_ENABLE_BOOST_SERIALIZATION 
  157BOOST_CLASS_EXPORT_KEY(Rose::BinaryAnalysis::InstructionSemantics::DispatcherAarch64);
 
Dispatches instructions through the RISC layer.
 
Base class for most instruction semantics RISC operators.
 
Base class for expressions.
 
Base class for machine instructions.
 
Base class for binary types.
 
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.
 
ROSE_DLL_API void load(SgProject *project, std::list< std::string > const &filepaths)
Load ASTs that have been saved to files.