fcml  1.2.2
Public Member Functions | List of all members
fcml::Instruction Class Reference

Describes an instruction. More...

#include <fcml_common.hpp>

Public Member Functions

 Instruction ()
 Creates an empty instruction. More...
 
 Instruction (const fcml_cstring &mnemonic)
 Creates an empty instruction for given mnemonic. More...
 
void add (const Operand &operand)
 Adds a new operand to the instruction. More...
 
void setOperand (const Operand &operand, fcml_int index)
 Sets a new oeprand for the instruction at given index. More...
 
const Operandoperator[] (fcml_int index) const
 Gets reference to the constant operand at given index. More...
 
Operandoperator[] (fcml_int index)
 Gets reference to the operand at given index. More...
 
void clean ()
 Cleans the instruction by removing all operands from it. More...
 
const ConditiongetCondition () const
 Gets a pointer to the constant condition associated with the instruction. More...
 
ConditiongetCondition ()
 Gets a pointer to the condition associated with the instruction. More...
 
InstructionsetCondition (const Condition &condition)
 Sets a new condition for the instruction. More...
 
fcml_hints getHints () const
 Gets instruction level hits associated with the instruction. More...
 
InstructionsetHints (fcml_hints hints)
 Sets new instruction hints. More...
 
bool isConditional () const
 Gets true if it's a conditional instruction. More...
 
InstructionsetConditional (bool isConditional)
 Sets conditional flag for the instruction. More...
 
const fcml_cstringgetMnemonic () const
 Gets the mnemonic associated with the instruction. More...
 
InstructionsetMnemonic (const fcml_cstring &mnemonic)
 Sets a new mnemonic for the instruction. More...
 
fcml_int getOperandsCount () const
 Gets number of operands associated with the instruction. More...
 
InstructionsetOperandsCount (fcml_int operandsCount)
 Sets number of operands available in the instruction. More...
 
fcml_prefixes getPrefixes () const
 Gets prefixes associated with the instruction. More...
 
InstructionsetPrefixes (fcml_prefixes prefixes)
 Sets a new set of prefixes for the instruction. More...
 
bool isLock () const
 Returns true if lock prefix is set. More...
 
bool isRepne () const
 Returns true if repne prefix is set. More...
 
bool isRepnz () const
 Returns true if lock repnz is set. More...
 
bool isRep () const
 Returns true if rep prefix is set. More...
 
bool isRepe () const
 Returns true if repe prefix is set. More...
 
bool isRepz () const
 Returns true if repz prefix is set. More...
 
bool isXAcquire () const
 Returns true if xacquire prefix is set. More...
 
bool isXRelease () const
 Returns true if xrelease prefix is set. More...
 
bool isBranchHint () const
 Returns true if branch_hint prefix is set. More...
 
bool isNoBranchHint () const
 Returns true if no_branch_hint prefix is set. More...
 
bool isFarPointer () const
 Returns true if far pointer hint is set. More...
 
bool isNearPointer () const
 Returns true if near pointer hint is set. More...
 
bool isLongFormPointer () const
 Returns true if long form pointer hint is set. More...
 
bool isIndirectPointer () const
 Returns true if indirect pointer hint is set. More...
 
bool isDirectPointer () const
 Returns true if direct pointer hint is set. More...
 

Detailed Description

Describes an instruction.

It's counterpart to the fcml_st_instruction structure.

Since
1.1.0

Constructor & Destructor Documentation

◆ Instruction() [1/2]

fcml::Instruction::Instruction ( )
inline

Creates an empty instruction.

Since
1.1.0

◆ Instruction() [2/2]

fcml::Instruction::Instruction ( const fcml_cstring mnemonic)
inline

Creates an empty instruction for given mnemonic.

Parameters
mnemonicThe mnemonic for the newly created instruction.
Since
1.1.0

Member Function Documentation

◆ add()

void fcml::Instruction::add ( const Operand operand)
inline

Adds a new operand to the instruction.

Parameters
operandThe operand to be added to the instruction.
Exceptions
IllegalStateExceptionNo more operands allowed.
Since
1.1.0

◆ clean()

void fcml::Instruction::clean ( )
inline

Cleans the instruction by removing all operands from it.

Since
1.1.0

◆ getCondition() [1/2]

const Condition& fcml::Instruction::getCondition ( ) const
inline

Gets a pointer to the constant condition associated with the instruction.

Returns
A reference to the condition.
Since
1.1.0

◆ getCondition() [2/2]

Condition& fcml::Instruction::getCondition ( )
inline

Gets a pointer to the condition associated with the instruction.

Returns
A reference to the condition.
Since
1.1.0

◆ getHints()

fcml_hints fcml::Instruction::getHints ( ) const
inline

Gets instruction level hits associated with the instruction.

Returns
The instruction level hits associated with the instruction.
Since
1.1.0

◆ getMnemonic()

const fcml_cstring& fcml::Instruction::getMnemonic ( ) const
inline

Gets the mnemonic associated with the instruction.

Returns
The mnemonic associated with the instruction.
Since
1.1.0

◆ getOperandsCount()

fcml_int fcml::Instruction::getOperandsCount ( ) const
inline

Gets number of operands associated with the instruction.

Returns
The number of operands in the instruction.
Since
1.1.0

◆ getPrefixes()

fcml_prefixes fcml::Instruction::getPrefixes ( ) const
inline

Gets prefixes associated with the instruction.

Returns
The prefixes.
Since
1.1.0

◆ isBranchHint()

bool fcml::Instruction::isBranchHint ( ) const
inline

Returns true if branch_hint prefix is set.

Returns
True if branch_hint prefix is set.
Since
1.1.0

◆ isConditional()

bool fcml::Instruction::isConditional ( ) const
inline

Gets true if it's a conditional instruction.

Returns
True in case of the conditional instruction.
Since
1.1.0

◆ isDirectPointer()

bool fcml::Instruction::isDirectPointer ( ) const
inline

Returns true if direct pointer hint is set.

Returns
True if direct pointer hint is set.
Since
1.1.0

◆ isFarPointer()

bool fcml::Instruction::isFarPointer ( ) const
inline

Returns true if far pointer hint is set.

Returns
True if far pointer hint is set.
Since
1.1.0

◆ isIndirectPointer()

bool fcml::Instruction::isIndirectPointer ( ) const
inline

Returns true if indirect pointer hint is set.

Returns
True if indirect pointer hint is set.
Since
1.1.0

◆ isLock()

bool fcml::Instruction::isLock ( ) const
inline

Returns true if lock prefix is set.

Returns
True if lock prefix is set.
Since
1.1.0

◆ isLongFormPointer()

bool fcml::Instruction::isLongFormPointer ( ) const
inline

Returns true if long form pointer hint is set.

See manual for more information about this hint.

Returns
True if long form pointer hint is set.
Since
1.1.0

◆ isNearPointer()

bool fcml::Instruction::isNearPointer ( ) const
inline

Returns true if near pointer hint is set.

Returns
True if near pointer hint is set.
Since
1.1.0

◆ isNoBranchHint()

bool fcml::Instruction::isNoBranchHint ( ) const
inline

Returns true if no_branch_hint prefix is set.

Returns
True if no_branch_hint prefix is set.
Since
1.1.0

◆ isRep()

bool fcml::Instruction::isRep ( ) const
inline

Returns true if rep prefix is set.

Returns
True if rep prefix is set.
Since
1.1.0

◆ isRepe()

bool fcml::Instruction::isRepe ( ) const
inline

Returns true if repe prefix is set.

Returns
True if repe prefix is set.
Since
1.1.0

◆ isRepne()

bool fcml::Instruction::isRepne ( ) const
inline

Returns true if repne prefix is set.

Returns
True if repne prefix is set.
Since
1.1.0

◆ isRepnz()

bool fcml::Instruction::isRepnz ( ) const
inline

Returns true if lock repnz is set.

Returns
True if lock repnz is set.
Since
1.1.0

◆ isRepz()

bool fcml::Instruction::isRepz ( ) const
inline

Returns true if repz prefix is set.

Returns
True if repz prefix is set.
Since
1.1.0

◆ isXAcquire()

bool fcml::Instruction::isXAcquire ( ) const
inline

Returns true if xacquire prefix is set.

Returns
True if xacquire prefix is set.
Since
1.1.0

◆ isXRelease()

bool fcml::Instruction::isXRelease ( ) const
inline

Returns true if xrelease prefix is set.

Returns
True if xrelease prefix is set.
Since
1.1.0

◆ operator[]() [1/2]

const Operand& fcml::Instruction::operator[] ( fcml_int  index) const
inline

Gets reference to the constant operand at given index.

Parameters
indexThe operand index.
Returns
The operand available at given index.
Since
1.1.0

◆ operator[]() [2/2]

Operand& fcml::Instruction::operator[] ( fcml_int  index)
inline

Gets reference to the operand at given index.

Parameters
indexThe operand index.
Returns
The operand available at given index.
Since
1.1.0

◆ setCondition()

Instruction& fcml::Instruction::setCondition ( const Condition condition)
inline

Sets a new condition for the instruction.

Parameters
conditionThe condition to be set for the instruction.
Returns
The instruction itself.
Since
1.1.0

◆ setConditional()

Instruction& fcml::Instruction::setConditional ( bool  isConditional)
inline

Sets conditional flag for the instruction.

Parameters
isConditionalSet to true in order to mark instruction as conditional one.
Returns
The instruction itself.
Since
1.1.0

◆ setHints()

Instruction& fcml::Instruction::setHints ( fcml_hints  hints)
inline

Sets new instruction hints.

Parameters
hintsThe hints to be set.
Returns
The instruction itself.
Since
1.1.0

◆ setMnemonic()

Instruction& fcml::Instruction::setMnemonic ( const fcml_cstring mnemonic)
inline

Sets a new mnemonic for the instruction.

Parameters
mnemonicThe new mnemonic.
Returns
The instruction itself.
Since
1.1.0

◆ setOperand()

void fcml::Instruction::setOperand ( const Operand operand,
fcml_int  index 
)
inline

Sets a new oeprand for the instruction at given index.

Parameters
operandThe operand to be set.
indexThe index operand should be set at.
Exceptions
IllegalStateExceptionOperand's number exceeds maximal number of operands allowed.
Since
1.1.0

◆ setOperandsCount()

Instruction& fcml::Instruction::setOperandsCount ( fcml_int  operandsCount)
inline

Sets number of operands available in the instruction.

Parameters
operandsCountNumber of operands.
Returns
The number of instructions.
Since
1.1.0

◆ setPrefixes()

Instruction& fcml::Instruction::setPrefixes ( fcml_prefixes  prefixes)
inline

Sets a new set of prefixes for the instruction.

Parameters
prefixesThe set of prefixes to be set for the instruction.
Returns
The instruction itself.
Since
1.1.0

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