ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
Classes | Public Member Functions | Private Attributes | Friends | List of all members
etiss::CodeBlock Class Reference

A list of CodeSets. More...

#include <CodePart.h>

Collaboration diagram for etiss::CodeBlock:
Collaboration graph
[legend]

Classes

class  Line
 equivalent of a translated instruction More...
 

Public Member Functions

 CodeBlock (etiss::uint64 startindex)
 
void reserve (int num)
 
Lineget (unsigned index)
 
Lineappend (etiss::uint64 addr)
 
unsigned length () const
 
std::set< std::string > & fileglobalCode ()
 
std::set< std::string > & functionglobalCode ()
 
void toCode (std::stringstream &out, const std::string &funcname, std::set< std::string > *fileglobalcode)
 

Private Attributes

std::vector< Linelines_
 
etiss::uint64 startindex_
 
etiss::uint64 endaddress_
 
std::set< std::string > fileglobal_code
 
std::set< std::string > functionglobal_code
 

Friends

class Translation
 

Detailed Description

A list of CodeSets.

this structure corresponds to the content of the switch statement of the translated block where one CodeSet is one translates instruction is one section after a case label.

e.g.: switch (instructionpointer){ case 0: { ... // CodeSet number 0 } case 1: { ... // CodeSet number 1 } }

Definition at line 569 of file CodePart.h.

Constructor & Destructor Documentation

◆ CodeBlock()

etiss::CodeBlock::CodeBlock ( etiss::uint64  startindex)
inline

Definition at line 595 of file CodePart.h.

Member Function Documentation

◆ append()

Line& etiss::CodeBlock::append ( etiss::uint64  addr)
inline

Definition at line 598 of file CodePart.h.

References lines_.

Referenced by etiss::Translation::translateBlock().

Here is the caller graph for this function:

◆ fileglobalCode()

std::set<std::string>& etiss::CodeBlock::fileglobalCode ( )
inline

◆ functionglobalCode()

std::set<std::string>& etiss::CodeBlock::functionglobalCode ( )
inline

◆ get()

Line& etiss::CodeBlock::get ( unsigned  index)
inline

Definition at line 597 of file CodePart.h.

References lines_.

◆ length()

unsigned etiss::CodeBlock::length ( ) const
inline

Definition at line 603 of file CodePart.h.

References lines_.

◆ reserve()

void etiss::CodeBlock::reserve ( int  num)
inline

Definition at line 596 of file CodePart.h.

References lines_.

Referenced by etiss::Translation::translateBlock().

Here is the caller graph for this function:

◆ toCode()

void CodeBlock::toCode ( std::stringstream &  out,
const std::string &  funcname,
std::set< std::string > *  fileglobalcode 
)

Definition at line 146 of file CodePart.cpp.

References etiss::FATALERROR, fileglobal_code, functionglobal_code, lines_, etiss::log(), and startindex_.

Referenced by etiss::Translation::getBlock().

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

Friends And Related Function Documentation

◆ Translation

friend class Translation
friend

Definition at line 571 of file CodePart.h.

Member Data Documentation

◆ endaddress_

etiss::uint64 etiss::CodeBlock::endaddress_
private

Definition at line 611 of file CodePart.h.

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

◆ fileglobal_code

std::set<std::string> etiss::CodeBlock::fileglobal_code
private

Definition at line 612 of file CodePart.h.

Referenced by fileglobalCode(), and toCode().

◆ functionglobal_code

std::set<std::string> etiss::CodeBlock::functionglobal_code
private

Definition at line 613 of file CodePart.h.

Referenced by functionglobalCode(), and toCode().

◆ lines_

std::vector<Line> etiss::CodeBlock::lines_
private

Definition at line 609 of file CodePart.h.

Referenced by append(), get(), length(), reserve(), and toCode().

◆ startindex_

etiss::uint64 etiss::CodeBlock::startindex_
private

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