fcml
1.2.2
|
Instruction operand. More...
#include <fcml_common.hpp>
Public Types | |
enum | OperandType { OT_NONE = FCML_OT_NONE, OT_IMMEDIATE = FCML_OT_IMMEDIATE, OT_FAR_POINTER = FCML_OT_FAR_POINTER, OT_ADDRESS = FCML_OT_ADDRESS, OT_REGISTER = FCML_OT_REGISTER, OT_VIRTUAL = FCML_OT_VIRTUAL } |
See fcml_en_operand_type structure for more details. More... | |
Public Member Functions | |
Operand () | |
Creates an undefined operand. More... | |
Operand (const Integer &imm, fcml_hints hints=FCML_OP_HINT_UNDEFIEND) | |
Creates an immediate value operand for given integer. More... | |
Operand (const FarPointer &pointer, fcml_hints hints=FCML_OP_HINT_UNDEFIEND) | |
Creates a far pointer operand for given far pointer. More... | |
Operand (const Address &address, fcml_hints hints=FCML_OP_HINT_UNDEFIEND) | |
Creates an address operand for given address. More... | |
Operand (const Register ®, fcml_hints hints=FCML_OP_HINT_UNDEFIEND) | |
Creates a new register operand for given register. More... | |
bool | operator== (const Operand &op) const |
Checks if two operands are equal or not. More... | |
bool | operator!= (const Operand &op) const |
Checks if two operands are equal or not. More... | |
void | undef () |
Converts operand to the undefined one. More... | |
void | imm (const Integer &imm) |
Sets given immediate value for the operand and makes it to be an immediate operand. More... | |
void | far_ptr (fcml_uint16_t seg, fcml_int16_t addr) |
Converts operand to the far pointer and sets the segment selector and offset for it. More... | |
void | far_ptr (fcml_uint16_t seg, fcml_int32_t addr) |
Prepares far pointer operand for given components. More... | |
void | far_ptr (const FarPointer &pointer) |
Prepares far pointer operand for given far pointer. More... | |
void | addr (const Address &address) |
Prepares address operand for given address. More... | |
void | off (const Integer &offset, fcml_usize sizeOperator=FCML_DS_UNDEF) |
Prepares address operand for given offset. More... | |
void | addr (const EffectiveAddress &effectiveAddress, fcml_usize sizeOperator=FCML_DS_UNDEF) |
Prepares an address operand for given effective address and optional size operator. More... | |
void | addr (const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector, fcml_usize sizeOperator=FCML_DS_UNDEF) |
Prepares address operator for given parameters. More... | |
void | reg (const Register ®) |
Prepares operator for the given register. More... | |
void | reg (fcml_uint8_t reg, fcml_usize size, Register::RegisterType type=Register::REG_GPR, fcml_bool x64_exp=FCML_FALSE) |
Prepares an register operator for given register compounds. More... | |
bool | isImm () const |
Returns true if operand is an immediate value operand. More... | |
bool | isReg () const |
Returns true if operand is a register operand. More... | |
bool | isAddr () const |
Returns true if operand is an address operand. More... | |
bool | isFar () const |
Returns true if operand is a far pointer operand. More... | |
const Address & | getAddress () const |
Gets reference to the constant address associated with the operand. More... | |
Address & | getAddress () |
Gets reference to the address associated with the operand. More... | |
Operand & | setAddress (const Address &address) |
Sets a new address for the operand. More... | |
const FarPointer & | getFarPointer () const |
Gets a reference to the constant far pointer instance associated with the address. More... | |
FarPointer & | getFarPointer () |
Gets a reference to the far pointer instance associated with the address. More... | |
Operand & | setFarPointer (const FarPointer &farPointer) |
Sets a new far pointer for the operand. More... | |
const Integer & | getImmediate () const |
Gets a reference to the constant immediate value associated with the operand. More... | |
Integer & | getImmediate () |
Gets a reference to the immediate value associated with the operand. More... | |
Operand & | setImmediate (const Integer &immediate) |
Sets a new immediate value for the address. More... | |
OperandType | getOperandType () const |
Gets operand type. More... | |
Operand & | setOperandType (OperandType operandType) |
Sets a new operand type. More... | |
const Register & | getRegister () const |
Returns a reference to the constant register associated with the operand. More... | |
Register & | getRegister () |
Returns a reference to the register associated with the operand. More... | |
Operand & | setRegister (const Register ®) |
Sets a new register for the operand. More... | |
fcml_hints | getHints () const |
Gets hits associated with the operand. More... | |
Operand & | setHints (fcml_hints hints) |
Sets new operand level hits for the operand. More... | |
const Decorators & | getDecorators () const |
Gets constant decorators associated with the operand. More... | |
Decorators & | getDecorators () |
Gets decorators associated with the operand. More... | |
Operand & | setDecorators (const Decorators &decorators) |
Sets new operand decorators for the operand. More... | |
bool | isMultimedia () const |
Returns information if the operand is multimedia one or not. More... | |
bool | isDisRelativeAddress () const |
Returns true if it's an displacement relative address. More... | |
bool | isPseudoOpcode () const |
Returns true if it's pseudo opcode operand. More... | |
bool | isAbsoluteAddressing () const |
Returns true if it's an absolute offset being set in the operand. More... | |
bool | isRelativeAddressing () const |
Returns true is relative addressing is used. More... | |
bool | isSIBEncoding () const |
Returns true if the SIB byte is used. More... | |
operator const Integer & () const | |
A casting operator. More... | |
operator const FarPointer & () const | |
A casting operator. More... | |
operator const Address & () const | |
A casting operator. More... | |
operator const Register & () const | |
A casting operator. More... | |
Instruction operand.
See fcml_en_operand_type structure for more details.
Enumerator | |
---|---|
OT_NONE | Operand not used. |
OT_IMMEDIATE | Immediate integer value. |
OT_FAR_POINTER | Direct far pointer. |
OT_ADDRESS | Memory address. |
OT_REGISTER | Processor register. |
OT_VIRTUAL | Virtual operand. |
|
inline |
Creates an undefined operand.
|
inline |
Creates an immediate value operand for given integer.
imm | The immediate value as integer. |
hints | Optional operand level hints. |
|
inline |
Creates a far pointer operand for given far pointer.
pointer | The far pointer for the operand. |
hints | Optional operand level hints. |
|
inline |
Creates an address operand for given address.
address | The address for the created operand. |
hints | Optional operand level hints. |
|
inline |
Creates a new register operand for given register.
reg | The register for the new operand being created. |
hints | Optional operand level hints. |
|
inline |
Prepares address operand for given address.
address | The address to be set for the operand. |
|
inline |
Prepares an address operand for given effective address and optional size operator.
effectiveAddress | The effective address. |
sizeOperator | The size operator. |
|
inline |
Prepares address operator for given parameters.
effectiveAddress | The effective address. |
segmentSelector | The segment selector. |
sizeOperator | The size operator. |
|
inline |
Converts operand to the far pointer and sets the segment selector and offset for it.
seg | The segment selector. |
addr | Offset. |
|
inline |
Prepares far pointer operand for given components.
seg | The segment selector. |
addr | The offset. |
|
inline |
Prepares far pointer operand for given far pointer.
pointer | Far pointer to be set for the operand. |
|
inline |
Gets reference to the constant address associated with the operand.
|
inline |
Gets reference to the address associated with the operand.
|
inline |
Gets constant decorators associated with the operand.
|
inline |
Gets decorators associated with the operand.
|
inline |
Gets a reference to the constant far pointer instance associated with the address.
|
inline |
Gets a reference to the far pointer instance associated with the address.
|
inline |
Gets hits associated with the operand.
|
inline |
Gets a reference to the constant immediate value associated with the operand.
|
inline |
Gets a reference to the immediate value associated with the operand.
|
inline |
Gets operand type.
|
inline |
Returns a reference to the constant register associated with the operand.
|
inline |
Returns a reference to the register associated with the operand.
|
inline |
Sets given immediate value for the operand and makes it to be an immediate operand.
imm | The immediate value. |
|
inline |
Returns true if it's an absolute offset being set in the operand.
|
inline |
Returns true if operand is an address operand.
|
inline |
Returns true if it's an displacement relative address.
|
inline |
Returns true if operand is a far pointer operand.
|
inline |
Returns true if operand is an immediate value operand.
|
inline |
Returns information if the operand is multimedia one or not.
For more details about the multimedia operand head over to the manual pages.
|
inline |
Returns true if it's pseudo opcode operand.
More information about pseudo opcodes in the manual.
|
inline |
Returns true if operand is a register operand.
|
inline |
Returns true is relative addressing is used.
|
inline |
Returns true if the SIB byte is used.
|
inline |
Prepares address operand for given offset.
offset | The offset to be set for the operand. |
sizeOperator | The size operator to be set for the address. |
|
inline |
A casting operator.
|
inline |
A casting operator.
|
inline |
A casting operator.
|
inline |
A casting operator.
|
inline |
Checks if two operands are equal or not.
op | The operand to be compared with the current one. |
|
inline |
Checks if two operands are equal or not.
op | The operand to be compared with the current one. |
|
inline |
Prepares operator for the given register.
reg | The register for the operator. |
|
inline |
Prepares an register operator for given register compounds.
reg | A register number. |
size | A register size. |
type | A register type. |
x64_exp | An optional marker for the SPL, BPL, SIL etc. registers. See manual for more information. |
Sets a new address for the operand.
address | The new address. |
|
inline |
Sets new operand decorators for the operand.
decorators | The new decorators to be set. |
|
inline |
Sets a new far pointer for the operand.
farPointer | The new far pointer instance. |
|
inline |
Sets new operand level hits for the operand.
hints | The new hits to be set. |
Sets a new immediate value for the address.
immediate | The new immediate value. |
|
inline |
Sets a new operand type.
operandType | The new operand type. |
Sets a new register for the operand.
reg | The new register. |
|
inline |
Converts operand to the undefined one.