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

structure to store additional information with a function pointer to the translated code More...

#include <Translation.h>

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

Public Member Functions

 BlockLink (etiss::uint64 start, etiss::uint64 end, ExecBlockCall execBlock, std::shared_ptr< void > lib)
 
 ~BlockLink ()
 

Static Public Member Functions

static void incrRef (BlockLink *link)
 increase reference count to a BlockLink More...
 
static void decrRef (BlockLink *&link)
 decrease reference count to a BlockLink and delete the instance if no other references exist More...
 
static void updateRef (BlockLink *&link, BlockLink *newValue)
 change the value of a BlockLink pointer. More...
 

Public Attributes

const etiss::uint64 start
 start instruction index More...
 
const etiss::uint64 end
 end instruction index (excluded) More...
 
BlockLinknext
 next block; ONLY MODIFY WITH updateRef More...
 
BlockLinkbranch
 last branch block; ONLY MODIFY WITH updateRef More...
 
unsigned refcount
 number of references to this instance; DO NOT MODIFY More...
 
const ExecBlockCall execBlock
 function pointer More...
 
bool valid
 true if the associated function implements current code More...
 
const std::shared_ptr< void > jitlib
 library of the associated function More...
 

Detailed Description

structure to store additional information with a function pointer to the translated code

Definition at line 62 of file Translation.h.

Constructor & Destructor Documentation

◆ BlockLink()

etiss::BlockLink::BlockLink ( etiss::uint64  start,
etiss::uint64  end,
ExecBlockCall  execBlock,
std::shared_ptr< void >  lib 
)

Definition at line 49 of file Translation.cpp.

References branch, next, refcount, and valid.

◆ ~BlockLink()

etiss::BlockLink::~BlockLink ( )

Definition at line 58 of file Translation.cpp.

References branch, decrRef(), and next.

Here is the call graph for this function:

Member Function Documentation

◆ decrRef()

static void etiss::BlockLink::decrRef ( BlockLink *&  link)
inlinestatic

decrease reference count to a BlockLink and delete the instance if no other references exist

Parameters
linkMAY NOT BE 0

Definition at line 84 of file Translation.h.

References refcount, and unlikely.

Referenced by etiss::Translation::getBlock(), etiss::Translation::unloadBlocks(), and ~BlockLink().

Here is the caller graph for this function:

◆ incrRef()

static void etiss::BlockLink::incrRef ( BlockLink link)
inlinestatic

increase reference count to a BlockLink

Parameters
linkMAY NOT BE 0

Definition at line 79 of file Translation.h.

References refcount.

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

Here is the caller graph for this function:

◆ updateRef()

static void etiss::BlockLink::updateRef ( BlockLink *&  link,
BlockLink newValue 
)
inlinestatic

change the value of a BlockLink pointer.

handles reference count updates and cleanup of unreferenced BlockLinks

Parameters
linkmay be 0
newValuemay be 0

Definition at line 99 of file Translation.h.

References incrRef(), likely, refcount, and unlikely.

Referenced by etiss::Translation::getBlock(), etiss::Translation::getBlockFast(), and etiss::Translation::unloadBlocks().

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

Member Data Documentation

◆ branch

BlockLink* etiss::BlockLink::branch

last branch block; ONLY MODIFY WITH updateRef

Definition at line 68 of file Translation.h.

Referenced by BlockLink(), etiss::Translation::getBlock(), etiss::Translation::getBlockFast(), etiss::Translation::unloadBlocks(), and ~BlockLink().

◆ end

const etiss::uint64 etiss::BlockLink::end

◆ execBlock

const ExecBlockCall etiss::BlockLink::execBlock

function pointer

Definition at line 70 of file Translation.h.

Referenced by etiss::CPUCore::execute().

◆ jitlib

const std::shared_ptr<void> etiss::BlockLink::jitlib

library of the associated function

Definition at line 72 of file Translation.h.

◆ next

BlockLink* etiss::BlockLink::next

next block; ONLY MODIFY WITH updateRef

Definition at line 67 of file Translation.h.

Referenced by BlockLink(), etiss::Translation::getBlock(), etiss::Translation::getBlockFast(), etiss::Translation::unloadBlocks(), and ~BlockLink().

◆ refcount

unsigned etiss::BlockLink::refcount

number of references to this instance; DO NOT MODIFY

Definition at line 69 of file Translation.h.

Referenced by BlockLink(), decrRef(), incrRef(), and updateRef().

◆ start

const etiss::uint64 etiss::BlockLink::start

start instruction index

Definition at line 65 of file Translation.h.

Referenced by etiss::Translation::getBlock(), etiss::Translation::getBlockFast(), and etiss::Translation::unloadBlocks().

◆ valid

bool etiss::BlockLink::valid

true if the associated function implements current code

Definition at line 71 of file Translation.h.

Referenced by BlockLink(), etiss_CPUCore_handleException(), etiss::Translation::getBlock(), etiss::Translation::getBlockFast(), and etiss::Translation::unloadBlocks().


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