1#ifndef ROSE_BinaryAnalysis_InstructionSemantics_DispatcherMips_H
2#define ROSE_BinaryAnalysis_InstructionSemantics_DispatcherMips_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_BINARY_ANALYSIS
6#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/Dispatcher.h>
8#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
9#include <boost/serialization/access.hpp>
10#include <boost/serialization/base_object.hpp>
11#include <boost/serialization/export.hpp>
12#include <boost/serialization/nvp.hpp>
13#include <boost/serialization/split_member.hpp>
17namespace BinaryAnalysis {
18namespace InstructionSemantics {
48#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
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 initializeDispatchTable();
61 initializeMemoryState();
64 BOOST_SERIALIZATION_SPLIT_MEMBER();
70 DispatcherMips() =
delete;
93 void initializeDispatchTable();
96 void initializeMemoryState();
104 friend struct Mips::IP_lwl;
105 friend struct Mips::IP_lwr;
112#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
Dispatches instructions through the RISC layer.
Dispatches MIPS instructions through the semantics layer.
DispatcherMipsPtr Ptr
Shared-ownership pointer.
virtual BaseSemantics::DispatcherPtr create(const BaseSemantics::RiscOperatorsPtr &) const override
Virtual constructor.
const RegisterDescriptor REG_HI
Cached register.
const RegisterDescriptor REG_FP
Cached register.
const RegisterDescriptor REG_SP
Cached register.
static Ptr instance(const Architecture::BaseConstPtr &, const BaseSemantics::RiscOperatorsPtr &)
Constructor.
const RegisterDescriptor REG_R1
Cached register.
static Ptr promote(const BaseSemantics::DispatcherPtr &)
Dynamic cast to DispatcherMipsPtr with assertion.
BaseSemantics::Dispatcher Super
Base type.
const RegisterDescriptor REG_LO
Cached register.
const RegisterDescriptor REG_R0
Cached register.
static Ptr instance(const Architecture::BaseConstPtr &)
Construct a prototypical dispatcher.
virtual int iprocKey(SgAsmInstruction *) const override
Given an instruction, return the InsnProcessor key that can be used as an index into the iproc_table.
const RegisterDescriptor REG_RA
Cached register.
const RegisterDescriptor REG_PC
Cached register.
Describes (part of) a physical CPU register.
Base class for machine instructions.
std::shared_ptr< const Base > BaseConstPtr
Reference counted pointer for Architecture::Base.
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.
boost::shared_ptr< class DispatcherMips > DispatcherMipsPtr
Shared-ownership pointer to a MIPS instruction dispatcher.