ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
Public Member Functions | Public Attributes | List of all members
etiss::instr::Buffer Class Reference

Buffer for reading data from memory while instructions are being fetched. More...

#include <Instruction.h>

Collaboration diagram for etiss::instr::Buffer:
Collaboration graph
[legend]

Public Member Functions

 Buffer ()
 
 Buffer (const Buffer &o)
 
 Buffer (Buffer &&o)
 
 Buffer (unsigned intcount)
 
 Buffer (unsigned intcount, I val)
 
 ~Buffer ()
 
Bufferoperator= (const Buffer &o)
 
Bufferoperator= (Buffer &&o)
 
void clear ()
 
char * internalBuffer ()
 get the internal buffer More...
 
unsigned internalBufferSize ()
 
I data ()
 
void recoverFromEndianness (unsigned alignment, endian_t endianness)
 changes byte positions as needed to resove endiannes incompabilities after using the internal buffer to write More...
 

Public Attributes

Id_
 
unsigned intcount_
 

Detailed Description

Buffer for reading data from memory while instructions are being fetched.

Definition at line 92 of file Instruction.h.

Constructor & Destructor Documentation

◆ Buffer() [1/5]

etiss::instr::Buffer::Buffer ( )
inline

Definition at line 97 of file Instruction.h.

◆ Buffer() [2/5]

etiss::instr::Buffer::Buffer ( const Buffer o)
inline

Definition at line 98 of file Instruction.h.

◆ Buffer() [3/5]

etiss::instr::Buffer::Buffer ( Buffer &&  o)
inline

Definition at line 101 of file Instruction.h.

◆ Buffer() [4/5]

etiss::instr::Buffer::Buffer ( unsigned  intcount)
inline

Definition at line 104 of file Instruction.h.

References d_, and intcount_.

◆ Buffer() [5/5]

etiss::instr::Buffer::Buffer ( unsigned  intcount,
I  val 
)
inline

Definition at line 107 of file Instruction.h.

References d_.

◆ ~Buffer()

etiss::instr::Buffer::~Buffer ( )
inline

Definition at line 110 of file Instruction.h.

References clear().

Here is the call graph for this function:

Member Function Documentation

◆ clear()

void etiss::instr::Buffer::clear ( )
inline

Definition at line 130 of file Instruction.h.

References d_.

Referenced by operator=(), and ~Buffer().

Here is the caller graph for this function:

◆ data()

I etiss::instr::Buffer::data ( )
inline

Definition at line 144 of file Instruction.h.

References d_.

Referenced by etiss::CPUArch::compensateEndianess(), etiss::Translation::disasm(), and etiss::Translation::translateBlock().

Here is the caller graph for this function:

◆ internalBuffer()

char * etiss::instr::Buffer::internalBuffer ( )

get the internal buffer

Attention
call recoverFromEndianness() to order the bytes after writing data
selective write operations together with recoverFromEndianness() are not supported

Definition at line 69 of file Instruction.cpp.

References d_.

Referenced by etiss::Translation::disasm(), and etiss::Translation::translateBlock().

Here is the caller graph for this function:

◆ internalBufferSize()

unsigned etiss::instr::Buffer::internalBufferSize ( )
Returns
same as width * sizeof(I)

Definition at line 73 of file Instruction.cpp.

References intcount_.

◆ operator=() [1/2]

Buffer& etiss::instr::Buffer::operator= ( Buffer &&  o)
inline

Definition at line 122 of file Instruction.h.

References clear(), d_, and intcount_.

Here is the call graph for this function:

◆ operator=() [2/2]

Buffer& etiss::instr::Buffer::operator= ( const Buffer o)
inline

Definition at line 114 of file Instruction.h.

References d_, and intcount_.

◆ recoverFromEndianness()

void etiss::instr::Buffer::recoverFromEndianness ( unsigned  alignment,
endian_t  endianness 
)

changes byte positions as needed to resove endiannes incompabilities after using the internal buffer to write

Definition at line 78 of file Instruction.cpp.

References d_, ETISS_SRCLOC, etiss::FATALERROR, etiss::getEndianness(), int8_t, intcount_, and etiss::log().

Referenced by etiss::CPUArch::compensateEndianess().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ d_

I* etiss::instr::Buffer::d_

Definition at line 94 of file Instruction.h.

Referenced by Buffer(), clear(), data(), internalBuffer(), operator=(), and recoverFromEndianness().

◆ intcount_

unsigned etiss::instr::Buffer::intcount_

Definition at line 95 of file Instruction.h.

Referenced by Buffer(), internalBufferSize(), operator=(), and recoverFromEndianness().


The documentation for this class was generated from the following files: