1#ifndef ROSE_BinaryAnalysis_InstructionSemantics_BaseSemantics_MemoryState_H
2#define ROSE_BinaryAnalysis_InstructionSemantics_BaseSemantics_MemoryState_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_BINARY_ANALYSIS
5#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/AddressSpace.h>
6#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/SValue.h>
8#include <Rose/BinaryAnalysis/ByteOrder.h>
10#ifdef ROSE_ENABLE_BOOST_SERIALIZATION
11#include <boost/serialization/access.hpp>
12#include <boost/serialization/export.hpp>
13#include <boost/serialization/shared_ptr.hpp>
17namespace BinaryAnalysis {
18namespace InstructionSemantics {
42#ifdef ROSE_ENABLE_BOOST_SERIALIZATION
44 friend class boost::serialization::access;
47 void serialize(S &s,
const unsigned ) {
49 s & BOOST_SERIALIZATION_NVP(addrProtoval_);
50 s & BOOST_SERIALIZATION_NVP(valProtoval_);
51 s & BOOST_SERIALIZATION_NVP(byteOrder_);
53 s & BOOST_SERIALIZATION_NVP(byteRestricted_);
173 virtual SValuePtr readLocal(
size_t index)
const;
174 virtual void writeLocal(
size_t index,
const SValuePtr &value);
197#ifdef ROSE_ENABLE_BOOST_SERIALIZATION
Base class for address spaces.
const std::string & name() const
Property: Name for this address space.
AddressSpacePurpose Purpose
Purpose for the address space.
Represents all memory in the state.
void set_byteOrder(ByteOrder::Endianness)
Memory byte order.
virtual MemoryStatePtr create(const SValuePtr &addrProtoval, const SValuePtr &valProtoval) const =0
Virtual allocating constructor.
virtual SValuePtr popOperand()
Pop an operand value.
virtual SValuePtr peekMemory(const SValuePtr &address, const SValuePtr &dflt, RiscOperators *addrOps, RiscOperators *valOps)=0
Read a value from memory without side effects.
SValuePtr get_val_protoval() const
Return the value protoval.
void merger(const MergerPtr &)
Property: Merger.
virtual void writeMemory(const SValuePtr &addr, const SValuePtr &value, RiscOperators *addrOps, RiscOperators *valOps)=0
Write a value to memory.
MergerPtr merger() const
Property: Merger.
ByteOrder::Endianness get_byteOrder() const
Memory byte order.
virtual void pushOperand(const SValuePtr &value)
Push an operand value.
virtual SValuePtr peekOperand(size_t depth=0)
Peek at an operand value.
MemoryStatePtr Ptr
Shared-ownership pointer.
SValuePtr get_addr_protoval() const
Return the address protoval.
virtual void clear()=0
Clear memory.
bool byteRestricted() const
Indicates whether memory cell values are required to be eight bits wide.
virtual SValuePtr readMemory(const SValuePtr &address, const SValuePtr &dflt, RiscOperators *addrOps, RiscOperators *valOps)=0
Read a value from memory.
void byteRestricted(bool)
Indicates whether memory cell values are required to be eight bits wide.
Base class for most instruction semantics RISC operators.
Base classes for instruction semantics.
boost::shared_ptr< MemoryState > MemoryStatePtr
Shared-ownership pointer to a memory state.
boost::shared_ptr< AddressSpace > AddressSpacePtr
Shared-ownership pointer for AddressSpace objects.