ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
Loading...
Searching...
No Matches
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
 
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
 

Public Attributes

Id_
 
unsigned intcount_
 

Detailed Description

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

Definition at line 45 of file Instruction.h.

Constructor & Destructor Documentation

◆ Buffer() [1/5]

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

Definition at line 52 of file Instruction.h.

◆ Buffer() [2/5]

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

Definition at line 53 of file Instruction.h.

◆ Buffer() [3/5]

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

Definition at line 54 of file Instruction.h.

◆ Buffer() [4/5]

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

Definition at line 55 of file Instruction.h.

References d_, and intcount_.

◆ Buffer() [5/5]

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

Definition at line 60 of file Instruction.h.

References d_.

◆ ~Buffer()

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

Definition at line 61 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 81 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 97 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 31 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 35 of file Instruction.cpp.

References intcount_.

◆ operator=() [1/2]

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

Definition at line 72 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 63 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 40 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_

◆ intcount_

unsigned etiss::instr::Buffer::intcount_

Definition at line 49 of file Instruction.h.

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


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