9 #ifndef ROSE_DispatcherPpc_H
10 #define ROSE_DispatcherPpc_H
12 #include "BaseSemantics2.h"
14 #include <boost/serialization/access.hpp>
15 #include <boost/serialization/base_object.hpp>
16 #include <boost/serialization/export.hpp>
17 #include <boost/serialization/split_member.hpp>
21 namespace InstructionSemantics2 {
36 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
38 friend class boost::serialization::access;
41 void save(S &s,
const unsigned )
const {
42 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Super);
46 void load(S &s,
const unsigned ) {
47 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Super);
53 BOOST_SERIALIZATION_SPLIT_MEMBER();
62 ASSERT_require(32==addrWidth);
97 return instance(ops, addrWidth, regs);
103 assert(retval!=NULL);
127 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
RegisterDescriptor REG_CTR
Cached register.
virtual RegisterDescriptor stackPointerRegister() const ROSE_OVERRIDE
Returns the stack pointer register.
RegisterDescriptor REG_CR
Cached register.
Base class for machine instructions.
RegisterDescriptor REG_LR
Cached register.
Main namespace for the ROSE library.
Describes (part of) a physical CPU register.
void regcache_init()
Load the cached register descriptors.
virtual const RegisterDictionary * get_register_dictionary() const
Access the register dictionary.
void memory_init()
Make sure memory is set up correctly.
virtual void set_register_dictionary(const RegisterDictionary *regdict) ROSE_OVERRIDE
Access the register dictionary.
RegisterDescriptor REG_CR0
Cached register.
boost::shared_ptr< class Dispatcher > DispatcherPtr
Shared-ownership pointer to a semantics instruction dispatcher.
virtual RegisterDescriptor instructionPointerRegister() const ROSE_OVERRIDE
Returns the instruction pointer register.
Base classes for instruction semantics.
virtual BaseSemantics::DispatcherPtr create(const BaseSemantics::RiscOperatorsPtr &ops, size_t addrWidth=0, const RegisterDictionary *regs=NULL) const ROSE_OVERRIDE
Virtual constructor.
size_t addressWidth() const
Property: Width of memory addresses.
boost::shared_ptr< class RiscOperators > RiscOperatorsPtr
Shared-ownership pointer to a RISC operators object.
RegisterDescriptor REG_XER
Cached register.
boost::shared_ptr< class DispatcherPowerpc > DispatcherPowerpcPtr
Shared-ownership pointer to a PowerPC instruction dispatcher.
virtual int iproc_key(SgAsmInstruction *insn_) const ROSE_OVERRIDE
Given an instruction, return the InsnProcessor key that can be used as an index into the iproc_table...
PowerpcInstructionKind get_kind() const
Property: Instruction kind.
Represents one PowerPC machine instruction.
Defines registers available for a particular architecture.
void iproc_init()
Loads the iproc table with instruction processing functors.
const RegisterDictionary * regdict
See set_register_dictionary().
Dispatches instructions through the RISC layer.
virtual void record(const BaseSemantics::SValuePtr &result)
Write status flags for result.
static DispatcherPowerpcPtr instance()
Construct a prototypical dispatcher.
RegisterDescriptor REG_IAR
Cached register.
static DispatcherPowerpcPtr instance(const BaseSemantics::RiscOperatorsPtr &ops, size_t addrWidth, const RegisterDictionary *regs=NULL)
Constructor.
static DispatcherPowerpcPtr promote(const BaseSemantics::DispatcherPtr &d)
Dynamic cast to a DispatcherPowerpcPtr with assertion.