Otawa  0.10
otawa::sim::BBPathDriver Class Reference

#include <otawa/sim/BBPathDriver.h>

Inheritance diagram for otawa::sim::BBPathDriver:
otawa::sim::Driver

Public Member Functions

 BBPathDriver (tsim::BBPath &bbpath)
 
virtual ~BBPathDriver ()
 
virtual InstfirstInstruction (State &state)
 
virtual InstnextInstruction (State &state, Inst *inst)
 This method is called each time the simulator needs the next instruction to execute. More...
 
virtual void terminateInstruction (State &state, Inst *inst)
 This method is called when an instruction is terminated. More...
 
virtual Address lowerRead (void)
 Get the lower read address of the last executed instruction. More...
 
virtual Address upperRead (void)
 Get the upper read address of the last executed instruction. More...
 
virtual Address lowerWrite (void)
 Get the lower written address of the last executed instruction. More...
 
virtual Address upperWrite (void)
 Get the upper written address of the last executed instruction. More...
 
virtual void redirect (State &state, Inst *branch, bool direction)
 
virtual bool PredictBranch (State &state, Inst *branch, bool pred)
 

Private Attributes

tsim::BBPath::BBIterator bb_iter
 
BasicBlock::InstIterinst_iter
 
bool ended
 

Constructor & Destructor Documentation

otawa::sim::BBPathDriver::~BBPathDriver ( )
virtual

References inst_iter.

Member Function Documentation

Inst * otawa::sim::BBPathDriver::firstInstruction ( State state)
virtual

References nextInstruction().

Address otawa::sim::Driver::lowerRead ( void  )
virtualinherited

Get the lower read address of the last executed instruction.

Returns
Lower read address.

References otawa::Address::null.

Address otawa::sim::Driver::lowerWrite ( void  )
virtualinherited

Get the lower written address of the last executed instruction.

Returns
Lower written address.

References otawa::Address::null.

Inst * otawa::sim::BBPathDriver::nextInstruction ( State state,
Inst inst 
)
virtual

This method is called each time the simulator needs the next instruction to execute.

Parameters
stateCurrent state of the simulator.
instNext instruction proposed by the simulator. If the simulator does not handle the semantics of instructions, it is juste the next instruction.
Returns
Next instruction to execute or null if there is no more instruction to execute.

Implements otawa::sim::Driver.

References bb_iter, ended, otawa::BasicBlock::InstIter::ended(), otawa::tsim::BBPath::BBIterator::ended(), inst_iter, otawa::BasicBlock::InstIter::item(), otawa::tsim::BBPath::BBIterator::item(), otawa::BasicBlock::InstIter::next(), and otawa::tsim::BBPath::BBIterator::next().

Referenced by firstInstruction().

virtual bool otawa::sim::Driver::PredictBranch ( State state,
Inst branch,
bool  pred 
)
inlinevirtualinherited
virtual void otawa::sim::Driver::redirect ( State state,
Inst branch,
bool  direction 
)
inlinevirtualinherited
void otawa::sim::BBPathDriver::terminateInstruction ( State state,
Inst inst 
)
virtual

This method is called when an instruction is terminated.

Parameters
stateCurrent state of the simulator.
instTerminated instruction.

Implements otawa::sim::Driver.

Address otawa::sim::Driver::upperRead ( void  )
virtualinherited

Get the upper read address of the last executed instruction.

Returns
Upper read address.

References otawa::Address::null.

Address otawa::sim::Driver::upperWrite ( void  )
virtualinherited

Get the upper written address of the last executed instruction.

Returns
Lower written address.

References otawa::Address::null.

Member Data Documentation

tsim::BBPath::BBIterator otawa::sim::BBPathDriver::bb_iter
private

Referenced by BBPathDriver(), and nextInstruction().

bool otawa::sim::BBPathDriver::ended
private

Referenced by BBPathDriver(), and nextInstruction().

BasicBlock::InstIter* otawa::sim::BBPathDriver::inst_iter
private

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