Otawa  0.10
otawa::Inst Class Referenceabstract

This class represents assembly instruction of a piece of code. More...

#include <otawa/prog/Inst.h>

Inheritance diagram for otawa::Inst:
otawa::ProgItem otawa::PropList elm::inhstruct::DLNode otawa::loader::new_gliss::Inst otawa::loader::old_gliss::Inst otawa::loader::new_gliss::BranchInst otawa::loader::old_gliss::BranchInst

Public Types

typedef elm::t::uint32 kind_t
 

Public Member Functions

InstnextInst (void) const
 
InstprevInst (void) const
 
virtual void dump (io::Output &out)
 Output a displayable representation of the instruction. More...
 
virtual kind_t kind (void)=0
 Get the kind of the current instruction. More...
 
bool meets (kind_t mask)
 
bool oneOf (kind_t mask)
 
bool noneOf (kind_t mask)
 
bool isIntern (void)
 Test if the instruction neither access memory, nor modify control flow. More...
 
bool isMem (void)
 Test if the instruction access memory. More...
 
bool isControl (void)
 Test if the instruction changes the control flow. More...
 
bool isLoad (void)
 Test if the instruction is a load, that is, it performs only one simple memory read. More...
 
bool isStore (void)
 Test if the instruction is a store, that is, it performs only one simple memory write. More...
 
bool isBranch (void)
 Test if the instruction is a branch, that is, it changes the control flow but performs neither a memory access, nor a context storage. More...
 
bool isCall (void)
 Test if the instruction is a sub-program call, that is, it changes the control flow but stores the current state for allowing performing a return. More...
 
bool isReturn (void)
 Test if the instruction is a sub-program return, that is, it modifies the control flow retrieving its context from a preceding call instruction. More...
 
bool isConditional (void)
 Test if this instruction is conditional. More...
 
bool isMulti (void)
 Test if the instruction is multi-memory accesss load / store. More...
 
bool isSpecial (void)
 Test if the instruction is a complex special instruction. More...
 
bool isMul (void)
 Test if the instruction is a multiplication. More...
 
bool isDiv (void)
 Test if the instruction is a division. More...
 
bool isIndirect (void)
 
bool isUnknown (void)
 Test if an instruction is unknown. More...
 
bool isAtomic (void)
 Test if the instruction is an atomic synchronization instruction, that is, performing an atomic read-write memory. More...
 
bool isBundle (void)
 On VLIW architecture, mark an instruction that is part of a bundle but not last instruction. More...
 
bool isBundleEnd (void)
 On VLIW architecture, mark an instruction that is the last instruction of a bundle. More...
 
virtual Insttarget (void)
 Get the target of the branch. More...
 
virtual Typetype (void)
 
virtual void semInsts (sem::Block &block)
 Return a list of semantics pseudo-instruction representing the effect of the instruction. More...
 
virtual int semInsts (sem::Block &block, int temp)
 Same as Inst::semInsts(sem::Block& block) to transform a machine instruction into machine instructions but temp is used as a base to encode temporaries. More...
 
virtual int semWriteBack (sem::Block &block, int temp)
 VLIW instructions of a bundle perform read and write-back of registers in parallel. More...
 
virtual delayed_t delayType (void)
 For a branch instruction, returns the type of management for delay slots. More...
 
virtual int delaySlots (void)
 For a branch instruction, returns the number of delayed instructions. More...
 
virtual void readRegSet (RegSet &set)
 Get the list of register read by the instruction. More...
 
virtual void writeRegSet (RegSet &set)
 Get the list of register written by the instruction. More...
 
virtual InsttoInst (void)
 Return the instruction matching the current item. More...
 
virtual const
elm::genstruct::Table
< hard::Register * > & 
readRegs (void)
 Get the registers read by the instruction. More...
 
virtual const
elm::genstruct::Table
< hard::Register * > & 
writtenRegs (void)
 Get the registers written by the instruction. More...
 
virtual int multiCount (void)
 This function is only defined for ISA supporting the IS_MULTI attribute. More...
 
ProgItemnext (void) const
 Get the next program item. More...
 
ProgItemprevious (void) const
 Get the previous program item. More...
 
virtual address_t address (void) const =0
 Get the address of the item . More...
 
virtual t::uint32 size (void) const =0
 Get the size of the item in bytes. More...
 
address_t topAddress (void) const
 Compute the address of the item immediately following the current item. More...
 
PropertygetProp (const AbstractIdentifier *id) const
 Find a property by its identifier. More...
 
void setProp (Property *prop)
 Set the property in the property list removing any double. More...
 
void setProp (const AbstractIdentifier *id)
 
void removeProp (const AbstractIdentifier *id)
 Remove a property matching the given identifier. More...
 
void removeProp (const AbstractIdentifier &id)
 
PropertyextractProp (const AbstractIdentifier *id)
 Remove a property matching the given identifier and return it. More...
 
PropertyextractProp (const AbstractIdentifier &id)
 Remove a property matching the given identifier and return it. More...
 
void addProp (Property *prop)
 Add property to the list without checking of duplication. More...
 
void removeAllProp (const AbstractIdentifier *id)
 Remove all the properties matching the given identifier. More...
 
bool hasProp (const AbstractIdentifier &id) const
 Test if the property list contains a property matching the given identifier. More...
 
void clearProps (void)
 Remove all properties from the list. More...
 
void addProps (const PropList &props)
 Add all properties from the given property list, in a reverse order. More...
 
void print (elm::io::Output &out) const
 Display the current property list. More...
 

Static Public Attributes

static const kind_t IS_COND = 0x00001
 Mask of a conditional instruction of an instruction kind. More...
 
static const kind_t IS_CONTROL = 0x00002
 Mask of a control instruction. More...
 
static const kind_t IS_CALL = 0x00004
 Mask of a call instruction. More...
 
static const kind_t IS_RETURN = 0x00008
 Mask of a return instruction. More...
 
static const kind_t IS_MEM = 0x00010
 Mask of an instruction accessing the memory. More...
 
static const kind_t IS_LOAD = 0x00020
 Mask of an instruction performing a memory load. More...
 
static const kind_t IS_STORE = 0x00040
 
static const kind_t IS_INT = 0x00080
 Mask of an instruction processing integer. More...
 
static const kind_t IS_FLOAT = 0x00100
 Mask of an instruction processing floats. More...
 
static const kind_t IS_ALU = 0x00200
 Mask of an instruction performing a computation. More...
 
static const kind_t IS_MUL = 0x00400
 Mask of a multiplication instruction. More...
 
static const kind_t IS_DIV = 0x00800
 Mask of a division instruction. More...
 
static const kind_t IS_SHIFT = 0x01000
 Mask of an instruction performing a shift (this includes logicial shifts, arithmetic shifts and rotations). More...
 
static const kind_t IS_TRAP = 0x02000
 Mask of a trap instruction. More...
 
static const kind_t IS_INTERN = 0x04000
 Mask of an instruction performing setup internal to the processor. More...
 
static const kind_t IS_MULTI = 0x08000
 This mask denotes an instructions that perform multi-value store or load. More...
 
static const kind_t IS_SPECIAL = 0x10000
 This mask denotes an instruction that is processed in a special way in the pipeline. More...
 
static const kind_t IS_INDIRECT = 0x10000
 
static const kind_t IS_UNKNOWN = 0x20000
 This mask denotes an unknown instruction: its opcode does not match any known instruction in the loader. More...
 
static const kind_t IS_ATOMIC = 0x40000
 
static const kind_t IS_BUNDLE = 0x80000
 Applied on a VLIW architecture, marks instructions part of a bundle but not at end of the bundle. More...
 
static Instnull = static_null
 Null instruction with null address and null size (no kind). More...
 
static const PropList EMPTY
 This is an empty proplist for convenience. More...
 

Protected Member Functions

virtual ~Inst (void)
 
void insertPseudo (ProgItem *pos)
 
bool atBegin (void) const
 
bool atEnd (void) const
 
void replace (DLNode *node)
 
void insertAfter (DLNode *node)
 
void insertBefore (DLNode *node)
 
void remove (void)
 
void removeNext (void)
 
void removePrevious (void)
 

Static Protected Attributes

static const
elm::genstruct::Table
< hard::Register * > 
no_regs
 A table containing no sets. More...
 

Friends

class CodeItem
 

Detailed Description

This class represents assembly instruction of a piece of code.

As they must represents a large set of machine language that may contain unusual instruction, it provides a very generic way to access information about the instruction. When the instruction is usual or simple enough, it may be derived in more accurate and specialized representation like MemInst or ControlInst.

Member Typedef Documentation

Constructor & Destructor Documentation

virtual otawa::Inst::~Inst ( void  )
inlineprotectedvirtual

Member Function Documentation

address_t otawa::ProgItem::address ( void  ) const
pure virtualinherited

Get the address of the item .

Returns
Address of the item or address 0 if none is assigned.
Note
In workstation systems, it is commonly accepted that the address 0 is ever invalid because it is the usual value of NULL in C. It should also work the same for embedded systems.

Implemented in otawa::loader::new_gliss::Inst, and otawa::loader::old_gliss::Inst.

Referenced by otawa::ParExeGraph::addEdgesForFetch(), otawa::PFGBuilder::addFunction(), otawa::ccg::LBlockBuilder::addLBlock(), otawa::LBlockBuilder::addLBlock(), otawa::LBlock::address(), otawa::ccg::LBlock::address(), otawa::BasicBlock::Bundle::address(), otawa::BasicBlock::address(), otawa::ets::ACSComputation::applyProcess(), otawa::CFGBuilder::buildCFG(), otawa::ets::WCETComputation::computation(), otawa::ast::BlockAST::countInstructions(), otawa::LBlock::countInsts(), otawa::ccg::LBlock::countInsts(), otawa::ipet::FlowFactLoader::enteringCall(), otawa::Virtualizer::enteringCall(), otawa::CFGInfo::findCFG(), otawa::Segment::findItemAt(), otawa::WorkSpace::format(), otawa::se::getFilterForAddr(), otawa::se::getFilterForReg(), otawa::VarTextDecoder::getInst(), otawa::ets::ACSComputation::initialization(), otawa::Segment::insert(), otawa::ipet::FlowFactLoader::lookLineAt(), otawa::ast::ASTLoader::makeBlock(), otawa::se::FilterBuilder::makeFilters(), otawa::DelayedBuilder::makeNOp(), otawa::LBlockManager::next(), otawa::DelayedBuilder::next(), otawa::FlowFactLoader::onLoop(), otawa::AccessedAddress::print(), otawa::dcache::BlockAccess::print(), otawa::ets::FlowFactLoader::processAST(), otawa::CFGChecker::processBB(), otawa::branch::OnlyConsBuilder::processBB(), otawa::branch::CondNumber::processBB(), otawa::LBlockBuilder::processBB(), otawa::ccg::LBlockBuilder::processBB(), otawa::dcache::CLPBlockBuilder::processBB(), otawa::etime::StandardEventBuilder::processBB(), otawa::dcache::BlockBuilder::processBB(), otawa::BBStatCollector::processCFG(), otawa::VarTextDecoder::processEntry(), otawa::VarTextDecoder::processWorkSpace(), otawa::dcache::CatConstraintBuilder::processWorkSpace(), otawa::CFGBuilder::processWorkSpace(), otawa::FlowFactLoader::scanIgnoreControl(), otawa::FlowFactLoader::scanIgnoreSeq(), otawa::FlowFactLoader::scanMultiBranch(), otawa::FlowFactLoader::scanMultiCall(), otawa::FlowFactLoader::scanNoInline(), otawa::FlowFactLoader::scanSetInlining(), otawa::DelayedBuilder::size(), otawa::CFGProcessor::str(), otawa::ProgItem::topAddress(), and otawa::BranchProblem::update().

void otawa::PropList::clearProps ( void  )
inherited
int otawa::Inst::delaySlots ( void  )
virtual

For a branch instruction, returns the number of delayed instructions.

As a default, return 0.

Returns
Number of delayed instructions.
delayed_t otawa::Inst::delayType ( void  )
virtual

For a branch instruction, returns the type of management for delay slots.

As a default, consider there is no delay slots.

Returns
Type of management of delay slots.
Note
Branches without delay slots does not need to overload this method.

References otawa::DELAYED_None.

void otawa::Inst::dump ( io::Output out)
virtual

Output a displayable representation of the instruction.

The implementation of this method is not mandatory.

Parameters
outOutput channel to use.

Reimplemented in otawa::loader::new_gliss::Inst, and otawa::loader::old_gliss::Inst.

Referenced by otawa::operator<<().

Property * otawa::PropList::extractProp ( const AbstractIdentifier id)
inherited

Remove a property matching the given identifier and return it.

Caller is responsible of the management of the obtained property.

Parameters
idIdentifier of the property to extract.

References otawa::Property::_next, and otawa::Property::next().

Referenced by otawa::script::Script::makeConfig().

Property * otawa::PropList::extractProp ( const AbstractIdentifier id)
inlineinherited

Remove a property matching the given identifier and return it.

Caller is responsible of the management of the obtained property.

Parameters
idIdentifier of the property to extract.

References otawa::PropList::extractProp().

Referenced by otawa::PropList::extractProp().

bool otawa::PropList::hasProp ( const AbstractIdentifier id) const
inlineinherited

Test if the property list contains a property matching the given identifier.

Parameters
idProperty identifier to look for.
Returns
True if the list contains the matching property, false else.

References otawa::PropList::getProp().

Referenced by otawa::ipet::BasicConstraintsBuilder::addEntryConstraint(), otawa::Monitor::configure(), otawa::ImmutableRef< T, I >::exists(), and otawa::Manager::setVerbosity().

void otawa::ProgItem::insertPseudo ( ProgItem pos)
inlineprotectedinherited
bool otawa::Inst::isAtomic ( void  )
inline

Test if the instruction is an atomic synchronization instruction, that is, performing an atomic read-write memory.

Returns
True if it is an synchronization function.

References IS_ATOMIC, and oneOf().

bool otawa::Inst::isBranch ( void  )
inline

Test if the instruction is a branch, that is, it changes the control flow but performs neither a memory access, nor a context storage.

References IS_CALL, IS_CONTROL, IS_RETURN, IS_TRAP, noneOf(), and oneOf().

Referenced by otawa::FlowFactLoader::scanMultiBranch().

bool otawa::Inst::isBundle ( void  )
inline

On VLIW architecture, mark an instruction that is part of a bundle but not last instruction.

Returns
True if it is a not bundle-ending instruction, false else.
See also
Inst::IS_BUNDLE, Inst::isBundleEnd()

References IS_BUNDLE, and oneOf().

bool otawa::Inst::isBundleEnd ( void  )
inline

On VLIW architecture, mark an instruction that is the last instruction of a bundle.

Returns
True if it is a bundle-ending instruction, false else.
See also
Inst::IS_BUNDLE, Inst::isBundle.

References IS_BUNDLE, and oneOf().

Referenced by otawa::BasicBlock::Bundle::move().

bool otawa::Inst::isCall ( void  )
inline

Test if the instruction is a sub-program call, that is, it changes the control flow but stores the current state for allowing performing a return.

Returns
True if it is a sub-program call.

References IS_CALL, and oneOf().

Referenced by otawa::PFGBuilder::addFunction(), otawa::CFGBuilder::buildCFG(), otawa::ipet::FlowFactLoader::enteringCall(), otawa::Virtualizer::enteringCall(), and otawa::FlowFactLoader::scanMultiCall().

bool otawa::Inst::isConditional ( void  )
inline

Test if this instruction is conditional.

Returns
True if the instruction is conditional, false else.

References IS_COND, and oneOf().

Referenced by otawa::PFGBuilder::addFunction(), otawa::CFGBuilder::buildCFG(), otawa::branch::CondNumber::processBB(), otawa::etime::StandardEventBuilder::processBB(), and otawa::branch::ConsBuilder::processBB().

bool otawa::Inst::isControl ( void  )
inline
bool otawa::Inst::isDiv ( void  )
inline

Test if the instruction is a division.

Returns
True if it is a division, false else.
See also
Inst::IS_DIV

References IS_DIV, and oneOf().

bool otawa::Inst::isIndirect ( void  )
inline
bool otawa::Inst::isIntern ( void  )
inline

Test if the instruction neither access memory, nor modify control flow.

Returns
True if the instruction is internal.

References IS_INTERN, and oneOf().

bool otawa::Inst::isLoad ( void  )
inline

Test if the instruction is a load, that is, it performs only one simple memory read.

Returns
True if it is a load.

References IS_LOAD, and oneOf().

Referenced by otawa::ParExeGraph::addEdgesForMemoryOrder().

bool otawa::Inst::isMem ( void  )
inline

Test if the instruction access memory.

Returns
True if it perform memory access.

References IS_MEM, and oneOf().

bool otawa::Inst::isMul ( void  )
inline

Test if the instruction is a multiplication.

Returns
True if it is a multiplication, false else.
See also
Inst::IS_MUL

References IS_MUL, and oneOf().

bool otawa::Inst::isMulti ( void  )
inline

Test if the instruction is multi-memory accesss load / store.

Returns
True if it is multi-memory accesses, false else.
See also
IS_MULTI

References IS_MEM, IS_MULTI, and meets().

bool otawa::Inst::isReturn ( void  )
inline

Test if the instruction is a sub-program return, that is, it modifies the control flow retrieving its context from a preceding call instruction.

Returns
True if it is a sub-program return.

References IS_RETURN, and oneOf().

Referenced by otawa::PFGBuilder::addFunction().

bool otawa::Inst::isSpecial ( void  )
inline

Test if the instruction is a complex special instruction.

Returns
True if it is a complex special instruction, false else.
See also
IS_SPECIAL

References IS_SPECIAL, and oneOf().

bool otawa::Inst::isStore ( void  )
inline

Test if the instruction is a store, that is, it performs only one simple memory write.

Returns
True if it is a store.

References IS_STORE, and oneOf().

Referenced by otawa::ParExeGraph::addEdgesForMemoryOrder().

bool otawa::Inst::isUnknown ( void  )
inline

Test if an instruction is unknown.

Returns
True if it is unknown, false else.
See also
Inst::IS_UNKNOWN

References IS_UNKNOWN, and oneOf().

Referenced by otawa::VarTextDecoder::getInst().

kind_t otawa::Inst::kind ( void  )
pure virtual

Get the kind of the current instruction.

In fact, the kind is composed as bit array representing an instruction property.

Returns
The kind of the instruction.

Implemented in otawa::loader::new_gliss::Inst, and otawa::loader::old_gliss::Inst.

Referenced by otawa::instCategory(), meets(), oneOf(), otawa::ParExeGraph::pipeline(), and otawa::hard::Stage::select().

bool otawa::Inst::meets ( kind_t  mask)
inline

References kind().

Referenced by isMulti().

int otawa::Inst::multiCount ( void  )
virtual

This function is only defined for ISA supporting the IS_MULTI attribute.

It returns the number of stored during the multi-memory access (in term of memory accesses).

Returns
Number of memory accesses.
ProgItem * otawa::ProgItem::next ( void  ) const
inherited

Get the next program item.

Returns
Next program item, null at the end of the list.

References elm::inhstruct::DLNode::atEnd().

Referenced by otawa::Segment::findItemAt(), otawa::Segment::insert(), and nextInst().

bool otawa::Inst::noneOf ( kind_t  mask)
inline

References oneOf().

Referenced by isBranch().

Inst* otawa::Inst::prevInst ( void  ) const
inline
ProgItem * otawa::ProgItem::previous ( void  ) const
inherited

Get the previous program item.

Returns
Previous program item, null at the begin of the list.

References elm::inhstruct::DLNode::atBegin().

Referenced by otawa::Segment::insert(), and prevInst().

void otawa::PropList::print ( elm::io::Output out) const
inherited

Display the current property list.

Parameters
outOutput to use.

Referenced by otawa::operator<<(), and otawa::ContextualProperty::print().

const elm::genstruct::Table< hard::Register * > & otawa::Inst::readRegs ( void  )
virtual

Get the registers read by the instruction.

Returns
Read register table.
Warning
This method is only implemented when the owner loader asserts the REGISTER_USAGE_FEATURE.

Reimplemented in otawa::loader::new_gliss::Inst, and otawa::loader::old_gliss::Inst.

References otawa::REGISTER_USAGE_FEATURE.

Referenced by readRegSet().

void otawa::Inst::readRegSet ( RegSet set)
virtual

Get the list of register read by the instruction.

Parameters
setSet filled with platform numbers of read registers.

References elm::genstruct::Vector< T >::add(), and readRegs().

void otawa::PropList::removeAllProp ( const AbstractIdentifier id)
inherited

Remove all the properties matching the given identifier.

Parameters
idIdentifier of properties to remove.

References otawa::Property::_next, and otawa::Property::next().

Referenced by otawa::LoopUnroller::unroll().

void otawa::PropList::removeProp ( const AbstractIdentifier id)
inherited
void otawa::PropList::removeProp ( const AbstractIdentifier id)
inlineinherited
void otawa::Inst::semInsts ( sem::Block block)
virtual

Return a list of semantics pseudo-instruction representing the effect of the instruction.

Parameters
blockBlock to write semantics instruction to. An empty vector means there is no operation.
Note
The passed block is not cleared by the method that accumulates instructions allowing to wholly translates parts of code.

Referenced by otawa::se::FilterBuilder::iterateBranchPaths(), semInsts(), and otawa::sem::PathIter::start().

int otawa::Inst::semInsts ( sem::Block block,
int  temp 
)
virtual

Same as Inst::semInsts(sem::Block& block) to transform a machine instruction into machine instructions but temp is used as a base to encode temporaries.

This is used for VLIW where instructions are executed in parallel and register write-back only occurs at end of the semantic instructions.

Parameters
blockBlock to translate instruction in.
tempBase number for temporaries used for write-back register saving.
Returns
Number of used temporaries for write-back.
See also
proc_vliw

References semInsts().

int otawa::Inst::semWriteBack ( sem::Block block,
int  temp 
)
virtual

VLIW instructions of a bundle perform read and write-back of registers in parallel.

This is mimicked in OTAWA by concatenating semantic instructions of each machine instruction and only writing into temporaries. by this method.

Parameters
blockBlock to fill with write-back semantic instructions.
tempBase number for temporaries used for write-back register saving.
Returns
Number of temporaries used by this instruction.
See also
VLIW Support
void otawa::PropList::setProp ( Property prop)
inherited

Set the property in the property list removing any double.

Parameters
propProperty to set.

References otawa::Property::_next, otawa::Property::id(), and otawa::Property::next().

void otawa::PropList::setProp ( const AbstractIdentifier id)
inlineinherited
size_t otawa::ProgItem::size ( void  ) const
pure virtualinherited

Get the size of the item in bytes.

Returns
Size of the item.

Referenced by otawa::Segment::insert(), otawa::DelayedBuilder::makeNOp(), otawa::DelayedBuilder::size(), and otawa::ProgItem::topAddress().

Inst * otawa::Inst::target ( void  )
virtual

Get the target of the branch.

Returns
Target address of the branch.

Reimplemented in otawa::loader::old_gliss::BranchInst, and otawa::loader::new_gliss::BranchInst.

Referenced by otawa::PFGBuilder::addFunction(), otawa::CFGBuilder::buildCFG(), and otawa::VarTextDecoder::processEntry().

Inst * otawa::Inst::toInst ( void  )
virtual

Return the instruction matching the current item.

Returns
Matching instruction or null if the current program item is not an instruction.

Reimplemented from otawa::ProgItem.

Type * otawa::Inst::type ( void  )
virtual
Deprecated:
Get the type of the accessed object.
Returns
Accessed data type.
void otawa::Inst::writeRegSet ( RegSet set)
virtual

Get the list of register written by the instruction.

Parameters
setSet filled with platform numbers of written registers.

References elm::genstruct::Vector< T >::add(), and writtenRegs().

const elm::genstruct::Table< hard::Register * > & otawa::Inst::writtenRegs ( void  )
virtual

Get the registers written by the instruction.

Returns
Read register table.
Warning
This method is only implemented when the owner loader asserts the REGISTER_USAGE_FEATURE.

Reimplemented in otawa::loader::new_gliss::Inst, and otawa::loader::old_gliss::Inst.

References otawa::REGISTER_USAGE_FEATURE.

Referenced by writeRegSet().

Friends And Related Function Documentation

friend class CodeItem
friend

Member Data Documentation

const PropList otawa::PropList::EMPTY
staticinherited

This is an empty proplist for convenience.

otawa::Inst::IS_ALU = 0x00200
static

Mask of an instruction performing a computation.

Note
Memory accesses with a computed address must have this bit set.
const kind_t otawa::Inst::IS_ATOMIC = 0x40000
static

Referenced by isAtomic().

otawa::Inst::IS_BUNDLE = 0x80000
static

Applied on a VLIW architecture, marks instructions part of a bundle but not at end of the bundle.

Referenced by isBundle(), and isBundleEnd().

otawa::Inst::IS_CALL = 0x00004
static

Mask of a call instruction.

Referenced by isBranch(), and isCall().

otawa::Inst::IS_COND = 0x00001
static

Mask of a conditional instruction of an instruction kind.

Note that conditional property is not bound to branch but may also be found in guarded instructions.

Referenced by isConditional().

otawa::Inst::IS_CONTROL = 0x00002
static

Mask of a control instruction.

Referenced by isBranch(), and isControl().

otawa::Inst::IS_DIV = 0x00800
static

Mask of a division instruction.

Referenced by isDiv().

otawa::Inst::IS_FLOAT = 0x00100
static

Mask of an instruction processing floats.

Note
Conversion instruction must have both masks IS_INT and IS_FLOAT.
const kind_t otawa::Inst::IS_INDIRECT = 0x10000
static

Referenced by isIndirect().

otawa::Inst::IS_INT = 0x00080
static

Mask of an instruction processing integer.

Note
Conversion instruction must have both masks IS_INT and IS_FLOAT.
otawa::Inst::IS_INTERN = 0x04000
static

Mask of an instruction performing setup internal to the processor.

Referenced by isIntern().

otawa::Inst::IS_LOAD = 0x00020
static

Mask of an instruction performing a memory load.

Referenced by isLoad().

otawa::Inst::IS_MEM = 0x00010
static

Mask of an instruction accessing the memory.

Referenced by isMem(), and isMulti().

otawa::Inst::IS_MUL = 0x00400
static

Mask of a multiplication instruction.

Referenced by isMul().

otawa::Inst::IS_MULTI = 0x08000
static

This mask denotes an instructions that perform multi-value store or load.

For example, the "ldmfd" or "stmfd" in the ARM ISA.

Referenced by isMulti().

otawa::Inst::IS_RETURN = 0x00008
static

Mask of a return instruction.

Referenced by isBranch(), and isReturn().

otawa::Inst::IS_SHIFT = 0x01000
static

Mask of an instruction performing a shift (this includes logicial shifts, arithmetic shifts and rotations).

otawa::Inst::IS_SPECIAL = 0x10000
static

This mask denotes an instruction that is processed in a special way in the pipeline.

This concerns very complex instruction usually found in old CISC processors.

Referenced by isSpecial().

const kind_t otawa::Inst::IS_STORE = 0x00040
static

Referenced by isStore().

otawa::Inst::IS_TRAP = 0x02000
static

Mask of a trap instruction.

It may be a programmed interruption, a system call, a debugging break or any control instruction whose control target is computed by the system.

Referenced by isBranch().

otawa::Inst::IS_UNKNOWN = 0x20000
static

This mask denotes an unknown instruction: its opcode does not match any known instruction in the loader.

This may denotes either a limitation of the loader, or an execution path error in the program decoding.

Referenced by isUnknown().

const elm::genstruct::Table< hard::Register * > otawa::Inst::no_regs
staticprotected

A table containing no sets.

Inst & otawa::Inst::null = static_null
static

Null instruction with null address and null size (no kind).


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