27#ifndef FCML_COMMON_HPP_
28#define FCML_COMMON_HPP_
46#define FCML_TO_CPP_BOOL( x ) ( (x) ? true : false )
74 static fcml_string
strDup(
const fcml_string str ) {
79 fcml_string newStr = _strdup( str );
81 fcml_string newStr = strdup( str );
84 throw std::bad_alloc();
88 static void strFree( fcml_string str ) {
123 Nullable(
const T& value,
bool is_not_null =
true ) :
124 _value( value ), _is_not_null( is_not_null ) {
128 _is_not_null(
false ) {
131 bool isNotNull()
const {
135 void setNotNull(
bool isNull) {
136 _is_not_null = isNull;
147 void setValue(
const T& value) {
148 this->_value = value;
161 return _value == nullable._value &&
162 _is_not_null == nullable._is_not_null;
173 return !(nullable == *
this);
190 this->_error = error;
194 this->_error = error;
197 this->_msg = cpy._msg;
198 this->_error = cpy._error;
203 if ( &exc !=
this ) {
204 this->_msg = exc._msg;
205 this->_error = exc._error;
217 void*
operator new(
size_t size ) {
218 return ::operator
new( size );
321 instructionPrefix._prefix = prefix;
322 return instructionPrefix;
543 _addressSizeAttribute(FCML_DS_32),
544 _operandSizeAttribute(FCML_DS_32),
558 _addressSizeAttribute(addressSizeAttribute),
559 _operandSizeAttribute(operandSizeAttribute),
576 return _opMode == ep._opMode &&
578 _operandSizeAttribute == ep._operandSizeAttribute &&
579 _addressSizeAttribute == ep._addressSizeAttribute;
590 return !(ep == *
this);
602 return _addressSizeAttribute;
612 _addressSizeAttribute = addressSizeAttribute;
622 return _operandSizeAttribute;
632 _operandSizeAttribute = operandSizeAttribute;
689 fcml_usize _addressSizeAttribute;
691 fcml_usize _operandSizeAttribute;
705 _size( FCML_DS_64 ), _isSigned( FCML_FALSE ), _vint8( 0 ), _vint16( 0 ), _vint32( 0 ), _vint64( 0 ) {
710 _size( FCML_DS_8 ), _isSigned( FCML_TRUE ), _vint8( value ), _vint16( 0 ), _vint32( 0 ), _vint64( 0 ) {
715 _size( FCML_DS_16 ), _isSigned( FCML_TRUE ), _vint8( 0 ), _vint16( value ), _vint32( 0 ), _vint64( 0 ) {
720 _size( FCML_DS_32 ), _isSigned( FCML_TRUE ), _vint8( 0 ), _vint16( 0 ), _vint32( value ), _vint64( 0 ) {
725 _size( FCML_DS_64 ), _isSigned( FCML_TRUE ), _vint8( 0 ), _vint16( 0 ), _vint32( 0 ), _vint64( value ) {
730 _size( FCML_DS_8 ), _isSigned( FCML_FALSE ), _vint8( static_cast<fcml_uint8_t>( value ) ), _vint16( 0 ), _vint32( 0 ), _vint64( 0 ) {
735 _size( FCML_DS_16 ), _isSigned( FCML_FALSE ), _vint8( 0 ), _vint16( static_cast<fcml_uint16_t>( value ) ), _vint32( 0 ), _vint64( 0 ) {
740 _size( FCML_DS_32 ), _isSigned( FCML_FALSE ), _vint8( 0 ), _vint16( 0 ), _vint32( static_cast<fcml_uint32_t>( value ) ), _vint64( 0 ) {
745 _size( FCML_DS_64 ), _isSigned( FCML_FALSE ), _vint8( 0 ), _vint16( 0 ), _vint32( 0 ), _vint64( static_cast<fcml_uint64_t>( value ) ) {
828 return _isSigned ?
static_cast<fcml_int64_t
>( *this ) ==
static_cast<fcml_int64_t
>( value ) :
static_cast<fcml_uint64_t
>( *this ) ==
static_cast<fcml_uint64_t
>( value );
839 return _isSigned ?
static_cast<fcml_int64_t
>( *this ) ==
static_cast<fcml_int64_t
>( value ) :
static_cast<fcml_uint64_t
>( *this ) ==
static_cast<fcml_uint64_t
>( value );
850 return _isSigned ?
static_cast<fcml_int64_t
>( *this ) ==
static_cast<fcml_int64_t
>( value ) :
static_cast<fcml_uint64_t
>( *this ) ==
static_cast<fcml_uint64_t
>( value );
861 return _isSigned ?
static_cast<fcml_int64_t
>( *this ) ==
static_cast<fcml_int64_t
>( value ) :
static_cast<fcml_uint64_t
>( *this ) ==
static_cast<fcml_uint64_t
>( value );
872 return _isSigned ?
static_cast<fcml_int64_t
>( *this ) ==
static_cast<fcml_int64_t
>( value ) :
static_cast<fcml_uint64_t
>( *this ) ==
static_cast<fcml_uint64_t
>( value );
883 return _isSigned ?
static_cast<fcml_int64_t
>( *this ) ==
static_cast<fcml_int64_t
>( value ) :
static_cast<fcml_uint64_t
>( *this ) ==
static_cast<fcml_uint64_t
>( value );
894 return _isSigned ?
static_cast<fcml_int64_t
>( *this ) ==
static_cast<fcml_int64_t
>( value ) :
static_cast<fcml_uint64_t
>( *this ) ==
static_cast<fcml_uint64_t
>( value );
905 return _isSigned ?
static_cast<fcml_int64_t
>( *this ) ==
static_cast<fcml_int64_t
>( value ) :
static_cast<fcml_uint64_t
>( *this ) ==
static_cast<fcml_uint64_t
>( value );
916 return _isSigned ?
static_cast<fcml_int64_t
>( *this ) ==
static_cast<fcml_int64_t
>( value ) :
static_cast<fcml_uint64_t
>( *this ) ==
static_cast<fcml_uint64_t
>( value );
927 return _isSigned ?
static_cast<fcml_int64_t
>( *this ) !=
static_cast<fcml_int64_t
>( value ) :
static_cast<fcml_uint64_t
>( *this ) !=
static_cast<fcml_uint64_t
>( value );
938 return _isSigned ?
static_cast<fcml_int64_t
>( *this ) !=
static_cast<fcml_int64_t
>( value ) :
static_cast<fcml_uint64_t
>( *this ) !=
static_cast<fcml_uint64_t
>( value );
949 return _isSigned ?
static_cast<fcml_int64_t
>( *this ) !=
static_cast<fcml_int64_t
>( value ) :
static_cast<fcml_uint64_t
>( *this ) !=
static_cast<fcml_uint64_t
>( value );
960 return _isSigned ?
static_cast<fcml_int64_t
>( *this ) !=
static_cast<fcml_int64_t
>( value ) :
static_cast<fcml_uint64_t
>( *this ) !=
static_cast<fcml_uint64_t
>( value );
971 return _isSigned ?
static_cast<fcml_int64_t
>( *this ) !=
static_cast<fcml_int64_t
>( value ) :
static_cast<fcml_uint64_t
>( *this ) !=
static_cast<fcml_uint64_t
>( value );
982 return _isSigned ?
static_cast<fcml_int64_t
>( *this ) !=
static_cast<fcml_int64_t
>( value ) :
static_cast<fcml_uint64_t
>( *this ) !=
static_cast<fcml_uint64_t
>( value );
993 return _isSigned ?
static_cast<fcml_int64_t
>( *this ) !=
static_cast<fcml_int64_t
>( value ) :
static_cast<fcml_uint64_t
>( *this ) !=
static_cast<fcml_uint64_t
>( value );
1004 return _isSigned ?
static_cast<fcml_int64_t
>( *this ) !=
static_cast<fcml_int64_t
>( value ) :
static_cast<fcml_uint64_t
>( *this ) !=
static_cast<fcml_uint64_t
>( value );
1015 return _isSigned ?
static_cast<fcml_int64_t
>( *this ) !=
static_cast<fcml_int64_t
>( value ) :
static_cast<fcml_uint64_t
>( *this ) !=
static_cast<fcml_uint64_t
>( value );
1023 operator fcml_int8_t()
const {
1027 result =
static_cast<fcml_int8_t
>( _isSigned ? _vint8 : (fcml_uint8_t)_vint8 );
1030 result =
static_cast<fcml_int8_t
>( _isSigned ? _vint16 : (fcml_uint16_t)_vint16 );
1033 result =
static_cast<fcml_int8_t
>( _isSigned ? _vint32 : (fcml_uint32_t)_vint32 );
1036 result =
static_cast<fcml_int8_t
>( _isSigned ? _vint64 : (fcml_uint64_t)_vint64 );
1048 operator fcml_uint8_t()
const {
1049 fcml_uint8_t result;
1052 result =
static_cast<fcml_uint8_t
>( _isSigned ? _vint8 : (fcml_uint8_t)_vint8 );
1055 result =
static_cast<fcml_uint8_t
>( _isSigned ? _vint16 : (fcml_uint16_t)_vint16 );
1058 result =
static_cast<fcml_uint8_t
>( _isSigned ? _vint32 : (fcml_uint32_t)_vint32 );
1061 result =
static_cast<fcml_uint8_t
>( _isSigned ? _vint64 : (fcml_uint64_t)_vint64 );
1074 operator fcml_int16_t()
const {
1075 fcml_int16_t result;
1078 result =
static_cast<fcml_int16_t
>( _isSigned ? _vint8 : (fcml_uint8_t)_vint8 );
1081 result =
static_cast<fcml_int16_t
>( _isSigned ? _vint16 : (fcml_uint16_t)_vint16 );
1084 result =
static_cast<fcml_int16_t
>( _isSigned ? _vint32 : (fcml_uint32_t)_vint32 );
1087 result =
static_cast<fcml_int16_t
>( _isSigned ? _vint64 : (fcml_uint64_t)_vint64 );
1100 operator fcml_uint16_t()
const {
1101 fcml_uint16_t result;
1104 result =
static_cast<fcml_uint16_t
>( _isSigned ? _vint8 : (fcml_uint8_t)_vint8 );
1107 result =
static_cast<fcml_uint16_t
>( _isSigned ? _vint16 : (fcml_uint16_t)_vint16 );
1110 result =
static_cast<fcml_uint16_t
>( _isSigned ? _vint32 : (fcml_uint32_t)_vint32 );
1113 result =
static_cast<fcml_uint16_t
>( _isSigned ? _vint64 : (fcml_uint64_t)_vint64 );
1126 operator fcml_int32_t()
const {
1127 fcml_int32_t result;
1130 result =
static_cast<fcml_int32_t
>( _isSigned ? _vint8 : (fcml_uint8_t)_vint8 );
1133 result =
static_cast<fcml_int32_t
>( _isSigned ? _vint16 : (fcml_uint16_t)_vint16 );
1136 result =
static_cast<fcml_int32_t
>( _isSigned ? _vint32 : (fcml_uint32_t)_vint32 );
1139 result =
static_cast<fcml_int32_t
>( _isSigned ? _vint64 : (fcml_uint64_t)_vint64 );
1152 operator fcml_uint32_t()
const {
1153 fcml_uint32_t result;
1156 result =
static_cast<fcml_uint32_t
>( _isSigned ? _vint8 : (fcml_uint8_t)_vint8 );
1159 result =
static_cast<fcml_uint32_t
>( _isSigned ? _vint16 : (fcml_uint16_t)_vint16 );
1162 result =
static_cast<fcml_uint32_t
>( _isSigned ? _vint32 : (fcml_uint32_t)_vint32 );
1165 result =
static_cast<fcml_uint32_t
>( _isSigned ? _vint64 : (fcml_uint64_t)_vint64 );
1178 operator fcml_int64_t()
const {
1179 fcml_int64_t result;
1182 result =
static_cast<fcml_int64_t
>( _isSigned ? _vint8 : (fcml_uint8_t)_vint8 );
1185 result =
static_cast<fcml_int64_t
>( _isSigned ? _vint16 : (fcml_uint16_t)_vint16 );
1188 result =
static_cast<fcml_int64_t
>( _isSigned ? _vint32 : (fcml_uint32_t)_vint32 );
1191 result =
static_cast<fcml_int64_t
>( _isSigned ? _vint64 : (fcml_uint64_t)_vint64 );
1204 operator fcml_uint64_t()
const {
1205 fcml_uint64_t result;
1208 result =
static_cast<fcml_uint64_t
>( _isSigned ? _vint8 : (fcml_uint8_t)_vint8 );
1211 result =
static_cast<fcml_uint64_t
>( _isSigned ? _vint16 : (fcml_uint16_t)_vint16 );
1214 result =
static_cast<fcml_uint64_t
>( _isSigned ? _vint32 : (fcml_uint32_t)_vint32 );
1217 result =
static_cast<fcml_uint64_t
>( _isSigned ? _vint64 : (fcml_uint64_t)_vint64 );
1257 minus( *
this, arg );
1266 const Integer &thisRef = *
this;
1268 plus( result, src );
1277 const Integer &thisRef = *
this;
1279 minus( result, src );
1288 const Integer &thisRef = *
this;
1299 const Integer &thisRef = *
this;
1394 callMathExpression( &doMinus, &doUMinus, result, src );
1402 callMathExpression( &doMul, &doUMul, result, src );
1410 callMathExpression( &doDiv, &doUDiv, result, src );
1418 callMathExpression( &doPlus, &doUPlus, result, src );
1427 static fcml_int64_t doPlus( fcml_int64_t thisValue, fcml_int64_t thatValue ) {
1428 return thisValue + thatValue;
1435 static fcml_int64_t doMinus( fcml_int64_t thisValue, fcml_int64_t thatValue ) {
1436 return thisValue - thatValue;
1443 static fcml_int64_t doMul( fcml_int64_t thisValue, fcml_int64_t thatValue ) {
1444 return thisValue * thatValue;
1451 static fcml_int64_t doDiv( fcml_int64_t thisValue, fcml_int64_t thatValue ) {
1452 return thisValue / thatValue;
1459 static fcml_uint64_t doUPlus( fcml_uint64_t thisValue, fcml_uint64_t thatValue ) {
1460 return thisValue + thatValue;
1467 static fcml_uint64_t doUMinus( fcml_uint64_t thisValue, fcml_uint64_t thatValue ) {
1468 return thisValue - thatValue;
1475 static fcml_uint64_t doUMul( fcml_uint64_t thisValue, fcml_uint64_t thatValue ) {
1476 return thisValue * thatValue;
1483 static fcml_uint64_t doUDiv( fcml_uint64_t thisValue, fcml_uint64_t thatValue ) {
1484 return thisValue / thatValue;
1491 void callMathExpression( fcml_int64_t (*signedExpressionFn)( fcml_int64_t thisValue, fcml_int64_t thatValue ),
1492 fcml_uint64_t (*unsignedExpressionFn)( fcml_uint64_t thisValue, fcml_uint64_t thatValue ),
1497 fcml_int64_t thisValue;
1498 fcml_int64_t thatValue;
1501 switch( src._size ) {
1503 thatValue = src._isSigned ? src._vint8 :
static_cast<fcml_uint8_t
>( src._vint8 );
1506 thatValue = src._isSigned ? src._vint16 :
static_cast<fcml_uint16_t
>( src._vint16 );
1509 thatValue = src._isSigned ? src._vint32 :
static_cast<fcml_uint32_t
>( src._vint32 );
1512 thatValue = src._isSigned ? src._vint64 :
static_cast<fcml_uint64_t
>( src._vint64 );
1517 switch( result._size ) {
1519 thisValue = result._isSigned ? result._vint8 :
static_cast<fcml_uint8_t
>(result._vint8 );
1520 thisValue = (*signedExpressionFn)( thisValue, thatValue );
1521 result._vint8 =
static_cast<fcml_int8_t
>( thisValue );
1524 thisValue = result._isSigned ? result._vint16 :
static_cast<fcml_uint16_t
>( result._vint16 );
1525 thisValue = (*signedExpressionFn)( thisValue, thatValue );
1526 result._vint16 =
static_cast<fcml_int16_t
>( thisValue );
1529 thisValue = result._isSigned ? result._vint32 :
static_cast<fcml_uint32_t
>( result._vint32 );
1530 thisValue = (*signedExpressionFn)( thisValue, thatValue );
1531 result._vint32 =
static_cast<fcml_int32_t
>( thisValue );
1534 thisValue = result._isSigned ? result._vint64 :
static_cast<fcml_uint64_t
>( result._vint64 );
1535 thisValue = (*signedExpressionFn)( thisValue, thatValue );
1536 result._vint64 = thisValue;
1542 fcml_uint64_t thisValue;
1543 fcml_uint64_t thatValue;
1546 switch( src._size ) {
1548 thatValue = src._isSigned ? src._vint8 :
static_cast<fcml_uint8_t
>( src._vint8 );
1551 thatValue = src._isSigned ? src._vint16 :
static_cast<fcml_uint16_t
>( src._vint16 );
1554 thatValue = src._isSigned ? src._vint32 :
static_cast<fcml_uint32_t
>( src._vint32 );
1557 thatValue = src._isSigned ? src._vint64 :
static_cast<fcml_uint64_t
>( src._vint64 );
1562 switch( result._size ) {
1564 thisValue = result._isSigned ? result._vint8 :
static_cast<fcml_uint8_t
>( result._vint8 );
1565 thisValue = (*unsignedExpressionFn)( thisValue, thatValue );
1566 result._vint8 =
static_cast<fcml_int8_t
>( thisValue );
1569 thisValue = result._isSigned ? result._vint16 :
static_cast<fcml_uint16_t
>( result._vint16 );
1570 thisValue = (*unsignedExpressionFn)( thisValue, thatValue );
1571 result._vint16 =
static_cast<fcml_int16_t
>( thisValue );
1574 thisValue = result._isSigned ? result._vint32 :
static_cast<fcml_uint32_t
>( result._vint32 );
1575 thisValue = (*unsignedExpressionFn)( thisValue, thatValue );
1576 result._vint32 =
static_cast<fcml_int32_t
>( thisValue );
1579 thisValue = result._isSigned ? result._vint64 :
static_cast<fcml_uint64_t
>( result._vint64 );
1580 thisValue = (*unsignedExpressionFn)( thisValue, thatValue );
1581 result._vint64 = thisValue;
1590 fcml_bool _isSigned;
1592 fcml_int16_t _vint16;
1593 fcml_int32_t _vint32;
1594 fcml_int64_t _vint64;
1639 _x64_exp(FCML_FALSE) {
1651 _x64_exp(reg.x64_exp? true : false) {
1666 _x64_exp(x64_exp?true:false) {
1758 return _reg == reg._reg && _type == reg._type && _size == reg._size && _x64_exp == reg._x64_exp;
1768 return !( reg == *this );
3925 _offset_size(FCML_DS_16),
3926 _offset16(offset16),
3937 _offset_size(FCML_DS_32),
3939 _offset32(offset32) {
3954 fcml_int32_t thisOffset;
3955 switch( _offset_size ) {
3957 thisOffset = _offset32;
3960 thisOffset = _offset16;
3963 fcml_int32_t thatOffset;
3964 switch( fp._offset_size ) {
3966 thatOffset = fp._offset32;
3969 thatOffset = fp._offset16;
3972 return thisOffset == thatOffset;
3982 return !(fp == *
this);
4019 return _offset_size;
4029 _offset_size = offsetSize;
4049 _offset16 = offset16;
4069 _offset32 = offset32;
4095 fcml_uint16_t _segment;
4097 fcml_usize _offset_size;
4099 fcml_int16_t _offset16;
4101 fcml_int32_t _offset32;
4118 _isDefaultReg(false) {
4128 _segmentSelector(segmentSelector),
4145 return segmentSelector._segmentSelector == _segmentSelector;
4155 return !(*
this == segmentSelector);
4164 return _segmentSelector;
4174 if( ® !=
this ) {
4175 _isDefaultReg = reg._isDefaultReg;
4176 _segmentSelector = reg._segmentSelector;
4205 return _isDefaultReg;
4225 return _segmentSelector;
4235 return _segmentSelector;
4245 _segmentSelector = segmentSelector;
4279 _displacement(displacement) {
4301 _displacement(displacement) {
4313 _scaleFactor(scaleFactor),
4314 _displacement(displacement) {
4339 _scaleFactor(scaleFactor) {
4353 _scaleFactor(scaleFactor),
4354 _displacement(displacement) {
4372 if( &address ==
this ) {
4375 return _base == address._base &&
4376 _index == address._index &&
4377 _scaleFactor == address._scaleFactor &&
4378 _displacement == address._displacement;
4388 return !(address == *
this);
4506 return _displacement;
4516 return _displacement;
4527 _displacement = displacement;
4570 return _scaleFactor;
4581 _scaleFactor = scaleFactor;
4591 fcml_uint8_t _scaleFactor;
4622 _size_operator( FCML_DS_UNDEF ),
4634 _size_operator( sizeOperator ),
4647 _size_operator( sizeOperator ),
4649 _effective_address( effectiveAddress ) {
4661 _size_operator( sizeOperator ),
4663 _segment_selector( segmentSelector ),
4664 _effective_address( effectiveAddress ) {
4762 if( &address ==
this ) {
4765 return _size_operator == address._size_operator &&
4766 _address_form == address._address_form &&
4767 _segment_selector == address._segment_selector &&
4768 _effective_address == address._effective_address &&
4769 _offset == address._offset;
4779 return !(address == *this );
4794 return Address( effectiveAddress, segmentSelector, sizeOperator );
4806 return Address( effectiveAddress, sizeOperator );
4850 return _address_form;
4862 _address_form = addressForm;
4873 return _effective_address;
4883 return _effective_address;
4894 _effective_address = effectiveAddress;
4937 return _segment_selector;
4947 return _segment_selector;
4958 _segment_selector = segmentSelector;
4969 return _size_operator;
4979 _size_operator = sizeOperator;
4986 fcml_usize _size_operator;
5053 _operandMaskReg = opmaskReg;
5106 return _operandMaskReg;
5116 return _operandMaskReg;
5148 if(&decorators ==
this) {
5151 return _z == decorators._z &&
5152 _bcast == decorators._bcast &&
5153 _operandMaskReg == decorators._operandMaskReg &&
5154 _er == decorators._er &&
5155 _sae == decorators._sae;
5165 return !(decorators == *
this);
5237 _farPointer( pointer ) {
5250 _address( address ) {
5280 switch( _operandType ) {
5282 equal = _address == op._address;
5285 equal = _farPointer == op._farPointer;
5288 equal = _immediate == op._immediate;
5291 equal = _register == op._register;
5300 return equal && op._hints == _hints && op._decorators == _decorators;
5311 return !(op == *
this);
5367 _farPointer = pointer;
5388 void off(
const Integer &offset, fcml_usize sizeOperator = FCML_DS_UNDEF ) {
5390 _address =
Address( offset, sizeOperator );
5402 _address =
Address( effectiveAddress, sizeOperator );
5415 _address =
Address( effectiveAddress, segmentSelector, sizeOperator );
5545 _farPointer = farPointer;
5577 _immediate = immediate;
5588 return _operandType;
5599 _operandType = operandType;
5631 this->_register =
reg;
5685 _decorators = decorators;
5990 return Operand(
Address( effectiveAddress, segmentSelector, sizeOperator ) );
6001 return Operand(
Address( effectiveAddress, segmentSelector, FCML_DS_8 ) );
6012 return Operand(
Address( effectiveAddress, segmentSelector, FCML_DS_16 ) );
6023 return Operand(
Address( effectiveAddress, segmentSelector, FCML_DS_32 ) );
6034 return Operand(
Address( effectiveAddress, segmentSelector, FCML_DS_64 ) );
6227 static Operand eff(
const Register &index, fcml_uint8_t scaleFactor,
const Integer &displacement, fcml_usize sizeOperator = FCML_DS_UNDEF ) {
6502 _isNegation(false) {
6513 _conditionType( type ),
6514 _isNegation( negation ) {
7099 return cond._conditionType == _conditionType && cond._isNegation == _isNegation;
7110 return !(*
this == cond);
7122 return _conditionType;
7132 _conditionType = conditionType;
7167 bool check(
ConditionType type,
bool negation =
false )
const {
7168 return _conditionType == type && _isNegation == negation;
7195 _isConditional(false),
7208 _mnemonic(mnemonic),
7209 _isConditional(false),
7226 _operands[_operandsCount++] = operand;
7241 _operands[index] = operand;
7252 checkArrayAccess(index);
7253 return _operands[index];
7264 checkArrayAccess(index);
7265 return _operands[index];
7310 _condition = condition;
7343 return _isConditional;
7376 _mnemonic = mnemonic;
7387 return _operandsCount;
7398 _operandsCount = operandsCount;
7420 _prefixes = prefixes;
7570 void checkArrayAccess( fcml_int index)
const {
7585 bool _isConditional;
7587 Condition _condition;
7591 fcml_int _operandsCount;
7614 _mnemonic(mnemonic),
7627 _prefixes(prefixes),
7628 _mnemonic(mnemonic),
7642 _mnemonic(mnemonic),
7656 _prefixes(prefixes),
7657 _mnemonic(mnemonic),
7698 _operands[_operandsCount++] = operand;
7709 return IB(mnemonic);
8108 _operands[_operandsCount++].
imm(
imm);
8146 _operands[_operandsCount++].
far_ptr( pointer );
8158 _operands[_operandsCount++].
addr(address);
8169 IB&
off(
const Integer &offset, fcml_usize sizeOperator = FCML_DS_UNDEF ) {
8171 _operands[_operandsCount++].
off( offset, sizeOperator );
8183 _operands[_operandsCount++].
off( offset, FCML_DS_8 );
8195 _operands[_operandsCount++].
off( offset, FCML_DS_16 );
8207 _operands[_operandsCount++].
off( offset, FCML_DS_32 );
8219 _operands[_operandsCount++].
off( offset, FCML_DS_64 );
8232 _operands[_operandsCount++].
addr( effectiveAddress, sizeOperator );
8244 _operands[_operandsCount++].
addr( effectiveAddress, FCML_DS_8 );
8256 _operands[_operandsCount++].
addr( effectiveAddress, FCML_DS_16 );
8268 _operands[_operandsCount++].
addr( effectiveAddress, FCML_DS_32 );
8280 _operands[_operandsCount++].
addr( effectiveAddress, FCML_DS_64 );
8294 _operands[_operandsCount++].
addr( effectiveAddress, segmentSelector, sizeOperator );
8307 _operands[_operandsCount++].
addr( effectiveAddress, segmentSelector, FCML_DS_8 );
8320 _operands[_operandsCount++].
addr( effectiveAddress, segmentSelector, FCML_DS_8 );
8333 _operands[_operandsCount++].
addr( effectiveAddress, segmentSelector, FCML_DS_8 );
8346 _operands[_operandsCount++].
addr( effectiveAddress, segmentSelector, FCML_DS_8 );
8358 _operands[_operandsCount++].
reg(
reg );
8373 _operands[_operandsCount++].
reg(
Register(
reg, size, type, x64_exp ) );
8384 IB&
eff(
const Integer &displacement, fcml_usize sizeOperator = FCML_DS_UNDEF ) {
8559 IB&
eff(
const Register &index, fcml_uint8_t scaleFactor,
const Integer &displacement, fcml_usize sizeOperator = FCML_DS_UNDEF ) {
8686 IB&
eff(
const Register &base,
const Register &index, fcml_uint8_t scaleFactor, fcml_usize sizeOperator = FCML_DS_UNDEF ) {
8862 _prefixes |= prefix._prefix;
8873 _hints |= hint._hint;
8884 if( _operandsCount == 0 ) {
8887 _operands[_operandsCount-1].
setHints( _operands[_operandsCount-1].getHints() | hint._hint );
8900 return _operands[_operandsCount++];
8908 void sanityCheck()
const {
8910 throw IllegalStateException(
FCML_TEXT(
"Operand's number exceeds maximal number of operands allowed." ) );
8923 fcml_int _operandsCount;
8944 dest.
ip = src.getIP();
8960 dest.int8 = src.getInt8();
8961 dest.int16 = src.getInt16();
8962 dest.int32 = src.getInt32();
8963 dest.int64 = src.getInt64();
8964 dest.is_signed = src.isSigned();
8965 dest.size = src.getSize();
8977 dest.
off16 = src.getSize() == FCML_DS_8 ? src.getInt8() : src.getInt16();
8978 dest.
off32 = src.getInt32();
8979 dest.
off64 = src.getInt64();
8981 dest.
size = src.getSize();
8988 dest.
setX64Exp( src.x64_exp ?
true :
false );
8992 dest.
reg = src.getReg();
8993 dest.
size = src.getSize();
8995 dest.
x64_exp = src.getX64Exp();
9009 dest.
segment = src.getSegment();
9023 convert( src.base, dest.
getBase() );
9024 convert( src.index, dest.
getIndex() );
9030 convert( src.getBase(), dest.
base );
9031 convert( src.getIndex(), dest.
index );
9041 convert( src.offset, dest.
getOffset() );
9049 convert( src.getOffset(), dest.
offset );
9063 dest.
hints = src.getHints();
9065 convert(src.getAddress(), dest.
address);
9067 convert(src.getImmediate(), dest.
immediate);
9068 convert(src.getRegister(), dest.
reg);
9069 convert(src.getDecorators(), dest.
decorators);
9075 bcast.setNotNull(FCML_TO_CPP_BOOL(src.bcast.is_not_null));
9076 bcast.setValue(src.bcast.value);
9079 er.setNotNull(FCML_TO_CPP_BOOL(src.er.is_not_null));
9088 dest.
bcast.is_not_null = src.getBcast().isNotNull();
9089 dest.
bcast.value = src.getBcast().getValue();
9090 dest.
er.is_not_null = src.getEr().isNotNull();
9091 dest.
er.value =
static_cast<fcml_uint8_t
>(src.getEr().getValue());
9093 dest.
sae = src.isSae();
9099 dest.
setNegation( src.is_negation ?
true :
false );
9104 dest.is_negation = src.isNegation();
9114 convert( src.operands[i], dest[i] );
9122 convert( src.getCondition(), dest.
condition );
9123 dest.
hints = src.getHints();
9127 convert( src[i], dest.
operands[i] );
9134 Env::strFree( instruction.
mnemonic );
Address operand.
Definition fcml_common.hpp:4601
static Address effective(const Register &base, const Register &index, fcml_usize sizeOperator=FCML_DS_UNDEF)
Factory method which creates an effective address instance with the base register and index register.
Definition fcml_common.hpp:4723
static Address effective(const Register &base, const Integer &displacement, fcml_usize sizeOperator=FCML_DS_UNDEF)
Factory method which creates an effective address instance with the base register and displacement.
Definition fcml_common.hpp:4700
EffectiveAddress & getEffectiveAddress()
Gets reference to the effective address associated with the address.
Definition fcml_common.hpp:4882
Address & setOffset(const Integer &offset)
Sets a new offset for the address.
Definition fcml_common.hpp:4925
Integer & getOffset()
Gets the offset associated with the address.
Definition fcml_common.hpp:4914
const EffectiveAddress & getEffectiveAddress() const
Gets reference to the constant effective address associated with the address.
Definition fcml_common.hpp:4872
const SegmentSelector & getSegmentSelector() const
Gets the constant segment selector associated with the address.
Definition fcml_common.hpp:4936
Address & setEffectiveAddress(const EffectiveAddress &effectiveAddress)
Sets a new effective address for the address.
Definition fcml_common.hpp:4893
static Address effective(const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement, fcml_usize sizeOperator=FCML_DS_UNDEF)
Factory method which creates an effective address instance with the index register,...
Definition fcml_common.hpp:4712
Address()
Creates an empty address.
Definition fcml_common.hpp:4621
SegmentSelector & getSegmentSelector()
Gets the segment selector associated with the address.
Definition fcml_common.hpp:4946
Address & setSegmentSelector(const SegmentSelector &segmentSelector)
Sets a new segment selector for the address.
Definition fcml_common.hpp:4957
static Address effective(const EffectiveAddress &effectiveAddress, fcml_usize sizeOperator=FCML_DS_UNDEF)
Factor method which creates an address instance with an effective address and optional size operator ...
Definition fcml_common.hpp:4805
static Address effective(const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement, fcml_usize sizeOperator=FCML_DS_UNDEF)
Factory method which creates an effective address instance with the base register,...
Definition fcml_common.hpp:4748
bool operator!=(const Address &address) const
Checks if two addresses are equal or not.
Definition fcml_common.hpp:4778
static Address offset(const Integer &offset, fcml_usize sizeOperator=FCML_DS_UNDEF)
Factor method which creates an address instance with an offset and optional size operator set.
Definition fcml_common.hpp:4817
static Address effective(const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector, fcml_usize sizeOperator=FCML_DS_UNDEF)
Factor method which creates an instance of the address for an effective address, segment selector and...
Definition fcml_common.hpp:4793
Address & setAddressForm(AddressForm addressForm)
Sets a new address form for the effective address.
Definition fcml_common.hpp:4861
static Address effective(const Register &base, const Register &index, fcml_uint8_t scaleFactor, fcml_usize sizeOperator=FCML_DS_UNDEF)
Factory method which creates an effective address instance with the base register,...
Definition fcml_common.hpp:4735
AddressForm
Addressing type, see fcml_en_address_form enumerator.
Definition fcml_common.hpp:4608
@ AF_UNDEFINED
Default value set if memory addressing hasn't been configured.
Definition fcml_common.hpp:4610
@ AF_COMBINED
Effective address combined from address components like base register, index registers,...
Definition fcml_common.hpp:4614
@ AF_OFFSET
Absolute offset (address).
Definition fcml_common.hpp:4612
bool isEffectiveAddress() const
Returns true if address holds effective address.
Definition fcml_common.hpp:4829
bool operator==(const Address &address) const
Checks if two addresses are equal or not.
Definition fcml_common.hpp:4761
Address & setSizeOperator(fcml_usize sizeOperator)
Sets a new size operator for the address.
Definition fcml_common.hpp:4978
Address(const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector, fcml_usize sizeOperator=FCML_DS_UNDEF)
Creates an address instance with an effective address, segment selector and optional size operator se...
Definition fcml_common.hpp:4660
Address(const EffectiveAddress &effectiveAddress, fcml_usize sizeOperator=FCML_DS_UNDEF)
Creates an address instance with an effective address and optional size operator set.
Definition fcml_common.hpp:4646
static Address effective(const Register &base, fcml_usize sizeOperator=FCML_DS_UNDEF)
Factory method which creates an effective address instance with the base register only.
Definition fcml_common.hpp:4689
static Address effective(const Integer &displacement, fcml_usize sizeOperator=FCML_DS_UNDEF)
Factory method which creates an effective address instance with the displacement only.
Definition fcml_common.hpp:4679
fcml_usize getSizeOperator() const
Gets the size operator associated with the address.
Definition fcml_common.hpp:4968
const Integer & getOffset() const
Gets the constant offset associated with the address.
Definition fcml_common.hpp:4904
bool isOffset() const
Returns true if address holds an offset only.
Definition fcml_common.hpp:4839
AddressForm getAddressForm() const
Gets an address form.
Definition fcml_common.hpp:4849
Address(const Integer &offset, fcml_usize sizeOperator=FCML_DS_UNDEF)
Creates an address instance with an offset and optional size operator set.
Definition fcml_common.hpp:4633
virtual ~Address()
Definition fcml_common.hpp:4668
Bad arguments.
Definition fcml_common.hpp:242
Base exception for all exceptions exposed by FCML library.
Definition fcml_common.hpp:187
Instruction condition.
Definition fcml_common.hpp:6470
bool isPE() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6885
bool isNE() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6714
static const Condition NBE()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6799
static const Condition AE()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6628
static const Condition BE()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6761
bool isNA() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6771
bool isNLE() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:7056
bool isPO() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6923
bool isNGE() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6961
static const Condition G()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:7084
static const Condition S()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6837
static const Condition LE()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:7027
bool isNZ() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6733
Condition & setConditionType(ConditionType conditionType)
Sets condition type.
Definition fcml_common.hpp:7131
bool isNG() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:7037
static const Condition O()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6533
bool isE() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6676
static const Condition NC()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6666
static const Condition NL()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6989
Condition(ConditionType type, bool negation=false)
Creates a condition for given parameters.
Definition fcml_common.hpp:6512
static const Condition L()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6951
bool isAE() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6619
bool operator==(const Condition &cond) const
Checks if two condition are equal.
Definition fcml_common.hpp:7098
bool isG() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:7075
bool isNP() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6904
static const Condition A()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6818
static const Condition NP()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6913
static const Condition E()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6685
ConditionType getConditionType() const
Gets a type of the condition.
Definition fcml_common.hpp:7121
Condition & setNegation(bool isNegation)
Sets negation flag for the condition.
Definition fcml_common.hpp:7152
static const Condition NG()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:7046
static const Condition Z()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6704
static const Condition NZ()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6742
bool isNegation() const
Returns true if condition is negated.
Definition fcml_common.hpp:7142
bool isGE() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6999
bool isBE() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6752
Condition()
Creates an empty condition.
Definition fcml_common.hpp:6500
static const Condition NAE()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6609
static const Condition P()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6875
bool isNB() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6581
static const Condition NO()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6552
static const Condition PE()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6894
static const Condition NB()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6590
bool isO() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6524
bool isL() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6942
bool isNS() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6847
ConditionType
See fcml_st_condition for more details.
Definition fcml_common.hpp:6477
@ CONDITION_L
6 Less than
Definition fcml_common.hpp:6491
@ CONDITION_P
5 Parity
Definition fcml_common.hpp:6489
@ CONDITION_LE
7 Less than or equal to
Definition fcml_common.hpp:6493
@ CONDITION_E
2 Equal
Definition fcml_common.hpp:6483
@ CONDITION_O
0 Overflow
Definition fcml_common.hpp:6479
@ CONDITION_BE
3 Below or equal
Definition fcml_common.hpp:6485
@ CONDITION_S
4 Sign
Definition fcml_common.hpp:6487
@ CONDITION_B
1 Below
Definition fcml_common.hpp:6481
bool operator!=(const Condition &cond) const
Checks if two condition are equal.
Definition fcml_common.hpp:7109
static const Condition NE()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6723
static const Condition NGE()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6970
bool isS() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6828
bool isLE() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:7018
bool isC() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6638
static const Condition B()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6571
bool isNBE() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6790
bool isA() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6809
bool isP() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6866
static const Condition PO()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6932
bool isNL() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6980
static const Condition NLE()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:7065
bool isNC() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6657
static const Condition NS()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6856
static const Condition GE()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:7008
bool isB() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6562
static const Condition C()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6647
bool isNO() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6543
bool isZ() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6695
bool isNAE() const
Gets true the condition is of a given type.
Definition fcml_common.hpp:6600
static const Condition NA()
Factory method which creates a condition of a given type.
Definition fcml_common.hpp:6780
Holds operand decorators.
Definition fcml_common.hpp:5001
fcml_bool isZ() const
Gets AVX-512 {z} operator.
Definition fcml_common.hpp:5085
Decorators & setZ(fcml_bool z)
Sets a new AVX-512 {z} decorator.
Definition fcml_common.hpp:5029
Decorators & setEr(const Nullable< EmbeededRoundingControl > &er)
Sets AVX-512 {er} decorator.
Definition fcml_common.hpp:5063
Decorators & setOpmaskReg(const Register &opmaskReg)
Sets AVX-512 opmask register for {k} decorator.
Definition fcml_common.hpp:5052
bool operator==(const Decorators &decorators) const
Checks if two decorators containers are equal or not.
Definition fcml_common.hpp:5147
Register & getOpmaskReg()
Gets AVX-512 opmask register for {k} decorator.
Definition fcml_common.hpp:5115
const Nullable< fcml_uint8_t > & getBcast() const
Gets AVX-512 {bcast} decorator.
Definition fcml_common.hpp:5095
const Nullable< EmbeededRoundingControl > & getEr() const
Gets AVX-512 {er} decorator.
Definition fcml_common.hpp:5125
Decorators()
Creates an empty operand decorators container.
Definition fcml_common.hpp:5018
Decorators & setSae(const fcml_bool sae)
Sets AVX-512 {sae} decorator.
Definition fcml_common.hpp:5074
const Register & getOpmaskReg() const
Gets constant AVX-512 opmask register for {k} decorator.
Definition fcml_common.hpp:5105
Decorators & setBcast(const Nullable< fcml_uint8_t > &bcast)
Sets a new AVX-512 {bcast} decorator.
Definition fcml_common.hpp:5041
fcml_bool isSae() const
Gets AVX-512 {sae} decorator.
Definition fcml_common.hpp:5135
EmbeededRoundingControl
Rounding mode.
Definition fcml_common.hpp:5007
bool operator!=(const Decorators &decorators) const
Checks if two decorators are equal or not.
Definition fcml_common.hpp:5164
Describes effective address.
Definition fcml_common.hpp:4261
EffectiveAddress(const Register &base, const Integer &displacement)
Creates an effective address instance with the base register and displacement only.
Definition fcml_common.hpp:4298
EffectiveAddress(const Integer &displacement)
Creates an effective address instance with the displacement only.
Definition fcml_common.hpp:4277
virtual ~EffectiveAddress()
Definition fcml_common.hpp:4360
Register & getBase()
Gets the base register associated with the effective address.
Definition fcml_common.hpp:4483
static EffectiveAddress addr(const Register &base, const Register &index)
Factory method which creates an effective address instance with the base register and index register.
Definition fcml_common.hpp:4438
EffectiveAddress()
Creates an empry effective address.
Definition fcml_common.hpp:4268
Integer & getDisplacement()
Gets the displacement associated with the effective address.
Definition fcml_common.hpp:4515
EffectiveAddress(const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement)
Creates an effective address instance with the base register, index register, scale factor and displa...
Definition fcml_common.hpp:4350
const Integer & getDisplacement() const
Gets the constant displacement associated with the effective address.
Definition fcml_common.hpp:4505
bool operator!=(const EffectiveAddress &address) const
Checks whether two effective addresses are equal or not.
Definition fcml_common.hpp:4387
EffectiveAddress(const Register &base, const Register &index)
Creates an effective address instance with the base register and index register.
Definition fcml_common.hpp:4323
static EffectiveAddress addr(const Integer &displacement)
Factory method which creates an effective address instance with the displacement only.
Definition fcml_common.hpp:4398
EffectiveAddress(const Register &base, const Register &index, fcml_uint8_t scaleFactor)
Creates an effective address instance with the base register, index register and scale factor set.
Definition fcml_common.hpp:4336
EffectiveAddress(const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement)
Creates an effective address instance with the index register, scale factor and displacement.
Definition fcml_common.hpp:4311
Register & getIndex()
Gets the index register associated with the effective address.
Definition fcml_common.hpp:4547
EffectiveAddress & setIndex(const Register &index)
Sets a new index register for the effective address.
Definition fcml_common.hpp:4558
static EffectiveAddress addr(const Register &base, const Integer &displacement)
Factory method which creates an effective address instance with the base register and displacement.
Definition fcml_common.hpp:4417
const Register & getIndex() const
Gets the constant index register associated with the effective address.
Definition fcml_common.hpp:4537
EffectiveAddress & setDisplacement(const Integer &displacement)
Sets a new displacement value for the effective address.
Definition fcml_common.hpp:4526
fcml_uint8_t getScaleFactor() const
Gets a scale factor value associated with the effective address.
Definition fcml_common.hpp:4569
const Register & getBase() const
Gets the constant base register associated with the effective address.
Definition fcml_common.hpp:4473
static EffectiveAddress addr(const Register &base)
Factory method which creates an effective address instance with the base register only.
Definition fcml_common.hpp:4407
bool operator==(const EffectiveAddress &address) const
Checks whether two effective addresses are equal or not.
Definition fcml_common.hpp:4371
EffectiveAddress & setScaleFactor(fcml_uint8_t scaleFactor)
Sets a new scale factor for the effective address.
Definition fcml_common.hpp:4580
static EffectiveAddress addr(const Register &base, const Register &index, fcml_uint8_t scaleFactor)
Factory method which creates an effective address instance with the base register,...
Definition fcml_common.hpp:4449
static EffectiveAddress addr(const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement)
Factory method which creates an effective address instance with the index register,...
Definition fcml_common.hpp:4428
EffectiveAddress & setBase(const Register &base)
Sets a new base register for the effective address.
Definition fcml_common.hpp:4494
EffectiveAddress(const Register &base)
Creates an effective address instance with the base register only.
Definition fcml_common.hpp:4287
static EffectiveAddress addr(const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement)
Factory method which creates an effective address instance with the base register,...
Definition fcml_common.hpp:4461
Holds instruction pointer, processor operating mode and memory segment flags.
Definition fcml_common.hpp:524
fcml_ip getIP() const
Gets instruction pointer held by the entry point.
Definition fcml_common.hpp:641
void setIP(fcml_ip ip)
Sets a new instruction pointer for the entry point.
Definition fcml_common.hpp:651
void setAddressSizeAttribute(fcml_usize addressSizeAttribute)
Sets a new address size attribute for the entry point.
Definition fcml_common.hpp:611
fcml_usize getAddressSizeAttribute() const
Gets address size attribute held by the entry point.
Definition fcml_common.hpp:601
OperatingMode getOpMode() const
Gets processor operating mode.
Definition fcml_common.hpp:661
EntryPoint(OperatingMode opMode, fcml_ip ip=0, fcml_usize addressSizeAttribute=FCML_DS_UNDEF, fcml_usize operandSizeAttribute=FCML_DS_UNDEF)
Creates an entry point instance for given processor operating mode, instruction pointer and optionall...
Definition fcml_common.hpp:556
void setOpMode(OperatingMode opMode)
Sets a new processor operating mode for the entry point.
Definition fcml_common.hpp:671
OperatingMode
Supported operating modes.
Definition fcml_common.hpp:531
void incrementIP(fcml_ip ip)
Increments the instruction pointer by given number of bytes.
Definition fcml_common.hpp:681
EntryPoint()
Creates an empty entry point instance.
Definition fcml_common.hpp:541
void setOperandSizeAttribute(fcml_usize operandSizeAttribute)
Sets a new operand size attribute for the entry point.
Definition fcml_common.hpp:631
bool operator==(const EntryPoint &ep) const
Checks if two entry points are equal.
Definition fcml_common.hpp:575
bool operator!=(const EntryPoint &ep) const
Checks if two entry points are not equal.
Definition fcml_common.hpp:589
fcml_usize getOperandSizeAttribute() const
Gets operand size attribute held by the entry point.
Definition fcml_common.hpp:621
Exposes API responsible for environment specific operations, even if standard CPP library is used to ...
Definition fcml_common.hpp:68
static fcml_string strDup(const fcml_string str)
Definition fcml_common.hpp:74
Describes far pointer.
Definition fcml_common.hpp:3902
fcml_int16_t getOffset16() const
Gets the 16-bit offset.
Definition fcml_common.hpp:4038
void setOffset16(fcml_int16_t offset16)
Sets 16-bit offset.
Definition fcml_common.hpp:4048
bool operator!=(const FarPointer &fp) const
Compares two far pointers.
Definition fcml_common.hpp:3981
FarPointer()
Creates an far pointer instance.
Definition fcml_common.hpp:3910
fcml_uint16_t getSegment() const
Gets segment selector.
Definition fcml_common.hpp:4078
static FarPointer off32(fcml_uint16_t segment, fcml_int32_t offset)
Creates FarPointer instance for 16 bit segment and 32-bit offset.
Definition fcml_common.hpp:4006
bool operator==(const FarPointer &fp) const
Compares two far pointers.
Definition fcml_common.hpp:3953
FarPointer(fcml_uint16_t segment, fcml_int16_t offset16)
Creates an far pointer instance.
Definition fcml_common.hpp:3923
static FarPointer off16(fcml_uint16_t segment, fcml_int16_t offset)
Creates FarPointer instance for 16 bit segment and 16-bit offset.
Definition fcml_common.hpp:3995
FarPointer(fcml_uint16_t segment, fcml_int32_t offset32)
Creates an far pointer instance.
Definition fcml_common.hpp:3935
fcml_usize getOffsetSize() const
Gets offset size.
Definition fcml_common.hpp:4018
void setOffsetSize(fcml_usize offsetSize)
Sets offset size.
Definition fcml_common.hpp:4028
fcml_int32_t getOffset32() const
Gets 32-bit offset.
Definition fcml_common.hpp:4058
void setOffset32(fcml_int32_t offset32)
Sets 32-bit offset.
Definition fcml_common.hpp:4068
void setSegment(fcml_uint16_t segment)
Sets segment selector.
Definition fcml_common.hpp:4088
An instruction builder.
Definition fcml_common.hpp:7602
IB(fcml_prefixes prefixes, const fcml_cstring &mnemonic)
Creates builder for the given mnemonic and prefixes.
Definition fcml_common.hpp:7625
IB & effq(const Register &base, const Integer &displacement)
Adds an an effective address based operator for a base register, displacement and quadro word size op...
Definition fcml_common.hpp:8545
IB & off(const Integer &offset, fcml_usize sizeOperator=FCML_DS_UNDEF)
Adds an offset operand.
Definition fcml_common.hpp:8169
IB & operandMultimediaHint()
Marks the lastly added operand as a multimedia one.
Definition fcml_common.hpp:8067
IB & effw(const Register &base)
Adds an an effective address based operator for a base register and word size operator.
Definition fcml_common.hpp:8462
IB & offq(const Integer &offset)
Adds an offset based address operand with quadro word size operator.
Definition fcml_common.hpp:8217
IB & eff(const Register &base, const Register &index, fcml_uint8_t scaleFactor, fcml_usize sizeOperator=FCML_DS_UNDEF)
Adds an an effective address based operator for a base register, index register, scale factor and opt...
Definition fcml_common.hpp:8686
IB & effb(const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement)
Adds an an effective address based operator for a base register, index register, scale factor and byt...
Definition fcml_common.hpp:8767
IB & addr(const EffectiveAddress &effectiveAddress, fcml_usize sizeOperator=FCML_DS_UNDEF)
Adds an address type operand for given effective address and optional size operator.
Definition fcml_common.hpp:8230
IB & effq(const Integer &displacement)
Adds an an effective address based operator for a displacement and quadro byte size operator.
Definition fcml_common.hpp:8428
IB & reg(fcml_uint8_t reg, fcml_usize size, Register::RegisterType type=Register::REG_GPR, fcml_bool x64_exp=FCML_FALSE)
Adds an an register based operator for given parameters.
Definition fcml_common.hpp:8371
IB & offb(const Integer &offset)
Adds an offset based address operand with byte size operator.
Definition fcml_common.hpp:8181
IB & eff(const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement, fcml_usize sizeOperator=FCML_DS_UNDEF)
Adds an an effective address based operator for an index register, scaleFactor, displacement and opti...
Definition fcml_common.hpp:8559
IB & xacquire()
Sets a prefix described by the name of the method for the instruction being built.
Definition fcml_common.hpp:7963
IB & addrb(const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector)
Adds an address type operand for given effective address and byte size operator.
Definition fcml_common.hpp:8305
static const OperandHint OP_MULTIMEDIA_HINT()
Gets multimedia hint for the operand.
Definition fcml_common.hpp:8035
IB & reg(const Register ®)
Adds an an register based operator for given register.
Definition fcml_common.hpp:8356
IB & directPtr()
Sets a hint described by the name of the method for the instruction being built.
Definition fcml_common.hpp:7814
IB & far_ptr(fcml_uint16_t seg, fcml_int16_t addr)
Adds a far pointer operand.
Definition fcml_common.hpp:8119
IB & repnz()
Sets a prefix described by the name of the method for the instruction being built.
Definition fcml_common.hpp:7879
IB & effq(const Register &base)
Adds an an effective address based operator for a base register and quadro word size operator.
Definition fcml_common.hpp:8484
IB & operandRelativeHint()
Marks the lastly added address operand as a relative one.
Definition fcml_common.hpp:8076
IB & effq(const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement)
Adds an an effective address based operator for a base register, index register, scale factor and qua...
Definition fcml_common.hpp:8809
static const InstructionPrefix REPE()
Creates a prefix instance described by the name of the method.
Definition fcml_common.hpp:7912
IB & effb(const Register &base, const Register &index)
Adds an an effective address based operator for a base register, index register and byte size operato...
Definition fcml_common.hpp:8636
static const InstructionPrefix REPZ()
Creates a prefix instance described by the name of the method.
Definition fcml_common.hpp:7933
IB & addr(const Address &address)
Adds an address operand.
Definition fcml_common.hpp:8156
static const OperandHint OP_SIB_ENCODING()
Gets SIB encoding hint for the operand.
Definition fcml_common.hpp:8059
IB & xrelease()
Sets a prefix described by the name of the method for the instruction being built.
Definition fcml_common.hpp:7984
IB & addrq(const EffectiveAddress &effectiveAddress)
Adds an address type operand for given effective address and quadro word size operator.
Definition fcml_common.hpp:8278
IB & far_ptr(fcml_uint16_t seg, fcml_int32_t addr)
Adds a far pointer operand.
Definition fcml_common.hpp:8132
IB & addrq(const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector)
Adds an address type operand for given effective address and quadro word size operator.
Definition fcml_common.hpp:8344
IB & repne()
Sets a prefix described by the name of the method for the instruction being built.
Definition fcml_common.hpp:7858
IB & repe()
Sets a prefix described by the name of the method for the instruction being built.
Definition fcml_common.hpp:7921
IB & operator<<(const Operand &operand)
Adds an operand to the instruction being built.
Definition fcml_common.hpp:8820
static const InstructionPrefix XACQUIRE()
Creates a prefix instance described by the name of the method.
Definition fcml_common.hpp:7954
IB & eff(const Register &base, fcml_usize sizeOperator=FCML_DS_UNDEF)
Adds an an effective address based operator for a base register and optional size operator.
Definition fcml_common.hpp:8440
IB & offd(const Integer &offset)
Adds an offset based address operand with double word size operator.
Definition fcml_common.hpp:8205
IB & effw(const Register &base, const Register &index, fcml_uint8_t scaleFactor)
Adds an an effective address based operator for a base register, index register, scale factor and wor...
Definition fcml_common.hpp:8712
IB & effb(const Register &base, const Register &index, fcml_uint8_t scaleFactor)
Adds an an effective address based operator for a base register, index register, scale factor and byt...
Definition fcml_common.hpp:8699
static const InstructionPrefix REPNZ()
Creates a prefix instance described by the name of the method.
Definition fcml_common.hpp:7870
IB & addrw(const EffectiveAddress &effectiveAddress)
Adds an address type operand for given effective address and word size operator.
Definition fcml_common.hpp:8254
void op(const Operand &operand)
Sets a next operand for the instruction.
Definition fcml_common.hpp:7694
IB & effd(const Register &base)
Adds an an effective address based operator for a base register and double word size operator.
Definition fcml_common.hpp:8473
IB & farPtr()
Sets a hint described by the name of the method for the instruction being built.
Definition fcml_common.hpp:7730
IB & addrw(const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector)
Adds an address type operand for given effective address and byte size operator.
Definition fcml_common.hpp:8318
static const InstructionHint DIRECT_PTR()
Creates a hint instance described by the name of the method.
Definition fcml_common.hpp:7805
IB & effd(const Register &base, const Integer &displacement)
Adds an an effective address based operator for a base register, displacement and double word size op...
Definition fcml_common.hpp:8533
IB & effd(const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement)
Adds an an effective address based operator for a base register, index register, scale factor and dou...
Definition fcml_common.hpp:8795
IB & effb(const Register &base)
Adds an an effective address based operator for a base register and byte size operator.
Definition fcml_common.hpp:8451
IB & addrd(const EffectiveAddress &effectiveAddress)
Adds an address type operand for given effective address and double word size operator.
Definition fcml_common.hpp:8266
IB & repz()
Sets a prefix described by the name of the method for the instruction being built.
Definition fcml_common.hpp:7942
IB & effb(const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement)
Adds an an effective address based operator for an index register, scaleFactor, displacement and byte...
Definition fcml_common.hpp:8572
IB & effd(const Integer &displacement)
Adds an an effective address based operator for a displacement and double word size operator.
Definition fcml_common.hpp:8417
IB & longFormPtr()
Sets a hint described by the name of the method for the instruction being built.
Definition fcml_common.hpp:7772
static const InstructionPrefix XRELEASE()
Creates a prefix instance described by the name of the method.
Definition fcml_common.hpp:7975
IB & set(const InstructionHint &hint)
Adds an instruction level hint to the instruction being built.
Definition fcml_common.hpp:8872
IB & addrd(const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector)
Adds an address type operand for given effective address and double word size operator.
Definition fcml_common.hpp:8331
static const InstructionPrefix LOCK()
Creates a prefix instance described by the name of the method.
Definition fcml_common.hpp:7828
IB & eff(const Register &base, const Register &index, fcml_usize sizeOperator=FCML_DS_UNDEF)
Adds an an effective address based operator for a base register, index register and optional size ope...
Definition fcml_common.hpp:8624
static const InstructionPrefix REPNE()
Creates a prefix instance described by the name of the method.
Definition fcml_common.hpp:7849
IB & operandAbsoluteHint()
Marks the lastly added address operand as a absolute one.
Definition fcml_common.hpp:8085
IB & effw(const Register &base, const Integer &displacement)
Adds an an effective address based operator for a base register, displacement and word size operator.
Definition fcml_common.hpp:8521
IB & lock()
Sets a prefix described by the name of the method for the instruction being built.
Definition fcml_common.hpp:7837
IB & effw(const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement)
Adds an an effective address based operator for an index register, scaleFactor, displacement and word...
Definition fcml_common.hpp:8585
static const OperandHint OP_ABSOLUTE_ADDRESSING()
Gets absolute hint for the operand.
Definition fcml_common.hpp:8051
IB & effb(const Register &base, const Integer &displacement)
Adds an an effective address based operator for a base register, displacement and byte size operator.
Definition fcml_common.hpp:8509
IB & branchHint()
Sets a prefix described by the name of the method for the instruction being built.
Definition fcml_common.hpp:8005
IB & addrb(const EffectiveAddress &effectiveAddress)
Adds an address type operand for given effective address and byte size operator.
Definition fcml_common.hpp:8242
IB(const fcml_cstring &mnemonic)
Creates builder for the given mnemonic.
Definition fcml_common.hpp:7611
IB & effq(const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement)
Adds an an effective address based operator for an index register, scaleFactor, displacement and quad...
Definition fcml_common.hpp:8611
IB & eff(const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement, fcml_usize sizeOperator=FCML_DS_UNDEF)
Adds an an effective address based operator for a base register, index register, scale factor and opt...
Definition fcml_common.hpp:8753
IB & effd(const Register &base, const Register &index, fcml_uint8_t scaleFactor)
Adds an an effective address based operator for a base register, index register, scale factor and dou...
Definition fcml_common.hpp:8725
IB & addr(const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector, fcml_usize sizeOperator=FCML_DS_UNDEF)
Adds an address type operand for given segment selector, effective address and optional size operator...
Definition fcml_common.hpp:8292
IB & indirectPtr()
Sets a hint described by the name of the method for the instruction being built.
Definition fcml_common.hpp:7793
IB & effw(const Integer &displacement)
Adds an an effective address based operator for a displacement and word size operator.
Definition fcml_common.hpp:8406
static const InstructionPrefix REP()
Creates a prefix instance described by the name of the method.
Definition fcml_common.hpp:7891
IB(const fcml_cstring &mnemonic, fcml_hints hints)
Creates an instruction builder for given mnemonic and hints.
Definition fcml_common.hpp:7639
static const InstructionHint FAR_PTR()
Creates a hint instance described by the name of the method.
Definition fcml_common.hpp:7721
IB & effd(const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement)
Adds an an effective address based operator for an index register, scaleFactor, displacement and doub...
Definition fcml_common.hpp:8598
IB & imm(const Integer &imm)
Adds an immediate operand.
Definition fcml_common.hpp:8106
IB & effd(const Register &base, const Register &index)
Adds an an effective address based operator for a base register, index register and double word size ...
Definition fcml_common.hpp:8660
IB & eff(const Register &base, const Integer &displacement, fcml_usize sizeOperator=FCML_DS_UNDEF)
Adds an an effective address based operator for a base register, displacement and optional size opera...
Definition fcml_common.hpp:8497
static const InstructionPrefix BRANCH()
Creates a prefix instance described by the name of the method.
Definition fcml_common.hpp:7996
IB & effq(const Register &base, const Register &index, fcml_uint8_t scaleFactor)
Adds an an effective address based operator for a base register, index register, scale factor and qua...
Definition fcml_common.hpp:8738
IB & rep()
Sets a prefix described by the name of the method for the instruction being built.
Definition fcml_common.hpp:7900
IB & eff(const Integer &displacement, fcml_usize sizeOperator=FCML_DS_UNDEF)
Adds an an effective address based operator for a displacement and optional size operator.
Definition fcml_common.hpp:8384
IB & set(const OperandHint &hint)
Adds an operand level hint to the instruction being built.
Definition fcml_common.hpp:8883
IB & effb(const Integer &displacement)
Adds an an effective address based operator for a displacement and byte size operator.
Definition fcml_common.hpp:8395
static const InstructionHint INDIRECT_PTR()
Creates a hint instance described by the name of the method.
Definition fcml_common.hpp:7784
IB & offw(const Integer &offset)
Adds an offset based address operand with word size operator.
Definition fcml_common.hpp:8193
IB & nearPtr()
Sets a hint described by the name of the method for the instruction being built.
Definition fcml_common.hpp:7751
static const InstructionHint LONG_FORM_PTR()
Creates a hint instance described by the name of the method.
Definition fcml_common.hpp:7763
Instruction build() const
Builds an instruction instance for the current state of the builder.
Definition fcml_common.hpp:7676
IB & effw(const Register &base, const Register &index)
Adds an an effective address based operator for a base register, index register and word size operato...
Definition fcml_common.hpp:8648
static IB inst(const fcml_cstring &mnemonic)
Factory method that can be used to create instruction builder.
Definition fcml_common.hpp:7708
IB & nobranchHint()
Sets a prefix described by the name of the method for the instruction being built.
Definition fcml_common.hpp:8026
IB & effw(const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement)
Adds an an effective address based operator for a base register, index register, scale factor and wor...
Definition fcml_common.hpp:8781
IB & effq(const Register &base, const Register &index)
Adds an an effective address based operator for a base register, index register and quadro word size ...
Definition fcml_common.hpp:8672
IB & far_ptr(const FarPointer &pointer)
Adds a far pointer operand.
Definition fcml_common.hpp:8144
IB & set(const InstructionPrefix &prefix)
Adds a prefix to the instruction being built.
Definition fcml_common.hpp:8861
IB & operandSIBEncodingHint()
Sets preferred encoding to SIB for the lastly added ModR/M operand.
Definition fcml_common.hpp:8094
IB(fcml_prefixes prefixes, const fcml_cstring &mnemonic, fcml_hints hints)
Creates an instruction builder for given prefixes, mnemonic and hints.
Definition fcml_common.hpp:7654
static const InstructionHint NEAR_PTR()
Creates a hint instance described by the name of the method.
Definition fcml_common.hpp:7742
static const InstructionPrefix NO_BRANCH()
Creates a prefix instance described by the name of the method.
Definition fcml_common.hpp:8017
static const OperandHint OP_RELATIVE_ADDRESSING()
Gets relative address hint for the operand.
Definition fcml_common.hpp:8043
Illegal argument exception.
Definition fcml_common.hpp:264
Illegal state exception.
Definition fcml_common.hpp:253
Component can not be initialized correctly.
Definition fcml_common.hpp:231
Wraps instruction prefix and prepares factory methods for the hints.
Definition fcml_common.hpp:312
static const InstructionPrefix REPZ()
Creates instruction prefix: REPZ.
Definition fcml_common.hpp:364
static const InstructionPrefix REPNE()
Creates instruction prefix: REPNE.
Definition fcml_common.hpp:336
static const InstructionPrefix REPNZ()
Creates instruction prefix: REPNZ.
Definition fcml_common.hpp:343
static const InstructionPrefix NOBRANCH_HINT()
Creates instruction prefix: NOBRANCH_HINT.
Definition fcml_common.hpp:392
static const InstructionPrefix BRANCH_HINT()
Creates instruction prefix: BRANCH_HINT.
Definition fcml_common.hpp:385
static const InstructionPrefix XACQUIRE()
Creates instruction prefix: XACQUIRE.
Definition fcml_common.hpp:371
static const InstructionPrefix REP()
Creates instruction prefix: REP.
Definition fcml_common.hpp:350
static const InstructionPrefix XRELEASE()
Creates instruction prefix: XRELEASE.
Definition fcml_common.hpp:378
static const InstructionPrefix REPE()
Creates instruction prefix: REPE.
Definition fcml_common.hpp:357
static const InstructionPrefix LOCK()
Creates instruction prefix: LOCK.
Definition fcml_common.hpp:329
Describes an instruction.
Definition fcml_common.hpp:7185
void setOperand(const Operand &operand, fcml_int index)
Sets a new oeprand for the instruction at given index.
Definition fcml_common.hpp:7237
fcml_hints getHints() const
Gets instruction level hits associated with the instruction.
Definition fcml_common.hpp:7320
bool isXRelease() const
Returns true if xrelease prefix is set.
Definition fcml_common.hpp:7496
Condition & getCondition()
Gets a pointer to the condition associated with the instruction.
Definition fcml_common.hpp:7298
bool isIndirectPointer() const
Returns true if indirect pointer hint is set.
Definition fcml_common.hpp:7550
Instruction()
Creates an empty instruction.
Definition fcml_common.hpp:7192
const Condition & getCondition() const
Gets a pointer to the constant condition associated with the instruction.
Definition fcml_common.hpp:7288
Instruction & setHints(fcml_hints hints)
Sets new instruction hints.
Definition fcml_common.hpp:7331
bool isConditional() const
Gets true if it's a conditional instruction.
Definition fcml_common.hpp:7342
bool isRepz() const
Returns true if repz prefix is set.
Definition fcml_common.hpp:7478
Instruction(const fcml_cstring &mnemonic)
Creates an empty instruction for given mnemonic.
Definition fcml_common.hpp:7205
const Operand & operator[](fcml_int index) const
Gets reference to the constant operand at given index.
Definition fcml_common.hpp:7251
fcml_prefixes getPrefixes() const
Gets prefixes associated with the instruction.
Definition fcml_common.hpp:7408
void add(const Operand &operand)
Adds a new operand to the instruction.
Definition fcml_common.hpp:7222
void clean()
Cleans the instruction by removing all operands from it.
Definition fcml_common.hpp:7272
Instruction & setCondition(const Condition &condition)
Sets a new condition for the instruction.
Definition fcml_common.hpp:7309
bool isRepnz() const
Returns true if lock repnz is set.
Definition fcml_common.hpp:7451
fcml_int getOperandsCount() const
Gets number of operands associated with the instruction.
Definition fcml_common.hpp:7386
Operand & operator[](fcml_int index)
Gets reference to the operand at given index.
Definition fcml_common.hpp:7263
Instruction & setOperandsCount(fcml_int operandsCount)
Sets number of operands available in the instruction.
Definition fcml_common.hpp:7397
Instruction & setConditional(bool isConditional)
Sets conditional flag for the instruction.
Definition fcml_common.hpp:7353
Instruction & setPrefixes(fcml_prefixes prefixes)
Sets a new set of prefixes for the instruction.
Definition fcml_common.hpp:7419
bool isFarPointer() const
Returns true if far pointer hint is set.
Definition fcml_common.hpp:7523
bool isRep() const
Returns true if rep prefix is set.
Definition fcml_common.hpp:7460
bool isRepe() const
Returns true if repe prefix is set.
Definition fcml_common.hpp:7469
bool isRepne() const
Returns true if repne prefix is set.
Definition fcml_common.hpp:7442
bool isBranchHint() const
Returns true if branch_hint prefix is set.
Definition fcml_common.hpp:7505
bool isDirectPointer() const
Returns true if direct pointer hint is set.
Definition fcml_common.hpp:7559
Instruction & setMnemonic(const fcml_cstring &mnemonic)
Sets a new mnemonic for the instruction.
Definition fcml_common.hpp:7375
bool isNoBranchHint() const
Returns true if no_branch_hint prefix is set.
Definition fcml_common.hpp:7514
bool isXAcquire() const
Returns true if xacquire prefix is set.
Definition fcml_common.hpp:7487
const fcml_cstring & getMnemonic() const
Gets the mnemonic associated with the instruction.
Definition fcml_common.hpp:7364
bool isNearPointer() const
Returns true if near pointer hint is set.
Definition fcml_common.hpp:7532
bool isLongFormPointer() const
Returns true if long form pointer hint is set.
Definition fcml_common.hpp:7541
bool isLock() const
Returns true if lock prefix is set.
Definition fcml_common.hpp:7433
Represents integer value.
Definition fcml_common.hpp:700
bool operator==(const Integer &value) const
Checks if the integer is equal to the passed value.
Definition fcml_common.hpp:915
bool operator!=(const fcml_int16_t value) const
Checks if the integer is not equal to the passed value.
Definition fcml_common.hpp:959
Integer operator-(const Integer &src) const
Subtraction operator.
Definition fcml_common.hpp:1276
Integer & setSize(fcml_usize size)
Definition fcml_common.hpp:815
virtual ~Integer()
Definition fcml_common.hpp:749
fcml_bool isSigned() const
Definition fcml_common.hpp:799
Integer & setSigned(fcml_bool isSigned)
Definition fcml_common.hpp:804
bool operator==(const fcml_int64_t value) const
Checks if the integer is equal to the passed value.
Definition fcml_common.hpp:904
Integer(fcml_int8_t value)
Definition fcml_common.hpp:709
static Integer int32(fcml_int32_t value)
Factory method which creates an insatnce fo the Integer for given parameter.
Definition fcml_common.hpp:1353
fcml_usize getSize() const
Definition fcml_common.hpp:810
Integer & setInt32(fcml_int32_t int32)
Definition fcml_common.hpp:771
static Integer uint64(fcml_uint64_t value)
Factory method which creates an insatnce fo the Integer for given parameter.
Definition fcml_common.hpp:1383
fcml_int32_t getInt32() const
Definition fcml_common.hpp:766
Integer operator+(const Integer &src) const
Addition operator.
Definition fcml_common.hpp:1265
Integer & operator*=(const Integer &arg)
Multiplication assignment.
Definition fcml_common.hpp:1238
bool operator!=(const fcml_int64_t value) const
Checks if the integer is not equal to the passed value.
Definition fcml_common.hpp:1003
Integer(fcml_int16_t value)
Definition fcml_common.hpp:714
bool operator!=(const fcml_uint64_t value) const
Checks if the integer is not equal to the passed value.
Definition fcml_common.hpp:992
Integer operator*(const Integer &src) const
Multiplication operator.
Definition fcml_common.hpp:1287
bool operator!=(const fcml_int8_t value) const
Checks if the integer is not equal to the passed value.
Definition fcml_common.hpp:937
Integer & operator-=(const Integer &arg)
Subtraction assignment.
Definition fcml_common.hpp:1256
bool operator==(const fcml_uint8_t value) const
Checks if the integer is equal to the passed value.
Definition fcml_common.hpp:827
bool operator==(const fcml_int32_t value) const
Checks if the integer is equal to the passed value.
Definition fcml_common.hpp:882
bool operator==(const fcml_int16_t value) const
Checks if the integer is equal to the passed value.
Definition fcml_common.hpp:860
static Integer int64(fcml_int64_t value)
Factory method which creates an insatnce fo the Integer for given parameter.
Definition fcml_common.hpp:1373
Integer & operator+=(const Integer &arg)
Addition assignment.
Definition fcml_common.hpp:1229
bool operator==(const fcml_int8_t value) const
Checks if the integer is equal to the passed value.
Definition fcml_common.hpp:838
fcml_int8_t getInt8() const
Definition fcml_common.hpp:788
static Integer uint16(fcml_uint16_t value)
Factory method which creates an instance fo the Integer for given parameter.
Definition fcml_common.hpp:1343
Integer & setInt16(fcml_int16_t int16)
Definition fcml_common.hpp:760
fcml_int64_t getInt64() const
Definition fcml_common.hpp:777
Integer(fcml_int64_t value)
Definition fcml_common.hpp:724
static Integer uint8(fcml_uint8_t value)
Factory method which creates an instance fo the Integer for given parameter.
Definition fcml_common.hpp:1323
Integer(fcml_int32_t value)
Definition fcml_common.hpp:719
bool operator!=(const fcml_int32_t value) const
Checks if the integer is not equal to the passed value.
Definition fcml_common.hpp:981
fcml_int16_t getInt16() const
Definition fcml_common.hpp:755
Integer()
Definition fcml_common.hpp:704
Integer(fcml_uint64_t value)
Definition fcml_common.hpp:744
static Integer int8(fcml_int8_t value)
Factory method which creates an instance fo the Integer for given parameter.
Definition fcml_common.hpp:1313
static Integer int16(fcml_int16_t value)
Factory method which creates an instance fo the Integer for given parameter.
Definition fcml_common.hpp:1333
bool operator==(const fcml_uint64_t value) const
Checks if the integer is equal to the passed value.
Definition fcml_common.hpp:893
Integer(fcml_uint8_t value)
Definition fcml_common.hpp:729
Integer operator/(const Integer &src) const
Division operator.
Definition fcml_common.hpp:1298
Integer & setInt8(fcml_int8_t int8)
Definition fcml_common.hpp:793
bool operator!=(const fcml_uint32_t value) const
Checks if the integer is not equal to the passed value.
Definition fcml_common.hpp:970
bool operator!=(const fcml_uint16_t value) const
Checks if the integer is not equal to the passed value.
Definition fcml_common.hpp:948
bool operator!=(const fcml_uint8_t value) const
Checks if the integer is not equal to the passed value.
Definition fcml_common.hpp:926
bool operator!=(const Integer &value) const
Checks if the integer is not equal to the passed value.
Definition fcml_common.hpp:1014
bool operator==(const fcml_uint16_t value) const
Checks if the integer is equal to the passed value.
Definition fcml_common.hpp:849
Integer & setInt64(fcml_int64_t int64)
Definition fcml_common.hpp:782
Integer(fcml_uint16_t value)
Definition fcml_common.hpp:734
Integer(fcml_uint32_t value)
Definition fcml_common.hpp:739
static Integer uint32(fcml_uint32_t value)
Factory method which creates an insatnce fo the Integer for given parameter.
Definition fcml_common.hpp:1363
bool operator==(const fcml_uint32_t value) const
Checks if the integer is equal to the passed value.
Definition fcml_common.hpp:871
Integer & operator/=(const Integer &arg)
Division assignment.
Definition fcml_common.hpp:1247
A base iterator interface.
Definition fcml_common.hpp:98
virtual bool hasNext()=0
Gets true if there is an another element in the iterator.
virtual T next()=0
Gets a next element from the iterator.
Object which shouldn't be copied can inherit from this class.
Definition fcml_common.hpp:288
Wrapper for nullable value types.
Definition fcml_common.hpp:120
bool operator!=(const Nullable &nullable) const
Checks if two nullable values are not equal.
Definition fcml_common.hpp:172
bool operator==(const Nullable &nullable) const
Checks if two nullable values are equal.
Definition fcml_common.hpp:160
Operand builder.
Definition fcml_common.hpp:5816
static Operand reg(fcml_uint8_t reg, fcml_usize size, Register::RegisterType type=Register::REG_GPR, fcml_bool x64_exp=FCML_FALSE)
Factory method which creates an register based operator for given parameters.
Definition fcml_common.hpp:6056
static Operand effb(const Register &base, const Register &index, fcml_uint8_t scaleFactor)
Factory method which creates an effective address based operator for a base register,...
Definition fcml_common.hpp:6356
static Operand effq(const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement)
Factory method which creates an effective address based operator for an index register,...
Definition fcml_common.hpp:6275
static Operand addrw(const EffectiveAddress &effectiveAddress)
Factory method which creates address type operand for given effective address and word size operator.
Definition fcml_common.hpp:5957
static Operand effq(const Register &base, const Register &index)
Factory method which creates an effective address based operator for a base register,...
Definition fcml_common.hpp:6331
static Operand effq(const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement)
Factory method which creates an effective address based operator for a base register,...
Definition fcml_common.hpp:6458
static Operand addrb(const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector)
Factory method which creates address type operand for given effective address and byte size operator.
Definition fcml_common.hpp:6000
static Operand effq(const Register &base)
Factory method which creates an effective address based operator for a base register and quadro word ...
Definition fcml_common.hpp:6158
static Operand far_ptr(fcml_uint16_t seg, fcml_int32_t addr)
Factory method which builds a far pointer operand.
Definition fcml_common.hpp:5855
static Operand effb(const Register &base)
Factory method which creates an effective address based operator for a base register and byte size op...
Definition fcml_common.hpp:6128
static Operand effd(const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement)
Factory method which creates an effective address based operator for a base register,...
Definition fcml_common.hpp:6445
static Operand effw(const Register &base, const Register &index)
Factory method which creates an effective address based operator for a base register,...
Definition fcml_common.hpp:6309
static Operand off(const Integer &offset, fcml_usize sizeOperator=FCML_DS_UNDEF)
Factory method which builds an address operand.
Definition fcml_common.hpp:5886
static Operand effd(const Register &base, const Register &index, fcml_uint8_t scaleFactor)
Factory method which creates an effective address based operator for a base register,...
Definition fcml_common.hpp:6380
static Operand effq(const Register &base, const Integer &displacement)
Factory method which creates an effective address based operator for a base register,...
Definition fcml_common.hpp:6214
static Operand effq(const Integer &displacement)
Factory method which creates an effective address based operator for a displacement and quadro byte s...
Definition fcml_common.hpp:6107
static Operand offq(const Integer &offset)
Factory method which builds an offset based address operand with quadro word size operator.
Definition fcml_common.hpp:5926
static Operand addrq(const EffectiveAddress &effectiveAddress)
Factory method which creates address type operand for given effective address and quadro word size op...
Definition fcml_common.hpp:5977
static Operand effw(const Register &base, const Register &index, fcml_uint8_t scaleFactor)
Factory method which creates an effective address based operator for a base register,...
Definition fcml_common.hpp:6368
static Operand effd(const Register &base)
Factory method which creates an effective address based operator for a base register and double word ...
Definition fcml_common.hpp:6148
static Operand effd(const Integer &displacement)
Factory method which creates an effective address based operator for a displacement and double word s...
Definition fcml_common.hpp:6097
static Operand effd(const Register &base, const Register &index)
Factory method which creates an effective address based operator for a base register,...
Definition fcml_common.hpp:6320
static Operand reg(const Register ®)
Factory method which creates an register based operator for given register.
Definition fcml_common.hpp:6043
static Operand eff(const Register &base, const Register &index, fcml_uint8_t scaleFactor, fcml_usize sizeOperator=FCML_DS_UNDEF)
Factory method which creates an effective address based operator for a base register,...
Definition fcml_common.hpp:6344
static Operand effb(const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement)
Factory method which creates an effective address based operator for a base register,...
Definition fcml_common.hpp:6419
static Operand far_ptr(fcml_uint16_t seg, fcml_int16_t addr)
Factory method which builds a far pointer operand.
Definition fcml_common.hpp:5844
static Operand addrb(const EffectiveAddress &effectiveAddress)
Factory method which creates address type operand for given effective address and byte size operator.
Definition fcml_common.hpp:5947
static Operand effd(const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement)
Factory method which creates an effective address based operator for an index register,...
Definition fcml_common.hpp:6263
static Operand addrw(const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector)
Factory method which creates address type operand for given effective address and word size operator.
Definition fcml_common.hpp:6011
static Operand effb(const Register &base, const Register &index)
Factory method which creates an effective address based operator for a base register,...
Definition fcml_common.hpp:6298
static Operand effb(const Register &base, const Integer &displacement)
Factory method which creates an effective address based operator for a base register,...
Definition fcml_common.hpp:6181
static Operand addrq(const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector)
Factory method which creates address type operand for given effective address and quadro word size op...
Definition fcml_common.hpp:6033
static Operand addrd(const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector)
Factory method which creates address type operand for given effective address and double word size op...
Definition fcml_common.hpp:6022
static Operand effw(const Integer &displacement)
Factory method which creates an effective address based operator for a displacement and word size ope...
Definition fcml_common.hpp:6087
static Operand eff(const Register &base, const Register &index, fcml_usize sizeOperator=FCML_DS_UNDEF)
Factory method which creates an effective address based operator for a base register,...
Definition fcml_common.hpp:6287
static Operand eff(const Register &base, const Integer &displacement, fcml_usize sizeOperator=FCML_DS_UNDEF)
Factory method which creates an effective address based operator for a base register,...
Definition fcml_common.hpp:6170
static Operand eff(const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement, fcml_usize sizeOperator=FCML_DS_UNDEF)
Factory method which creates an effective address based operator for an index register,...
Definition fcml_common.hpp:6227
static Operand effb(const Integer &displacement)
Factory method which creates an effective address based operator for a displacement and byte size ope...
Definition fcml_common.hpp:6077
static Operand eff(const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement, fcml_usize sizeOperator=FCML_DS_UNDEF)
Factory method which creates an effective address based operator for a base register,...
Definition fcml_common.hpp:6406
static Operand imm(const Integer &imm)
Factory method which builds an immediate operand.
Definition fcml_common.hpp:5833
static Operand effw(const Register &base, const Integer &displacement)
Factory method which creates an effective address based operator for a base register,...
Definition fcml_common.hpp:6192
static Operand undef()
Factory method which builds an empty operand.
Definition fcml_common.hpp:5824
static Operand eff(const Register &base, fcml_usize sizeOperator=FCML_DS_UNDEF)
Factory method which creates an effective address based operator for a base register and optional siz...
Definition fcml_common.hpp:6118
static Operand offw(const Integer &offset)
Factory method which builds an offset based address operand with word size operator.
Definition fcml_common.hpp:5906
static Operand effw(const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement)
Factory method which creates an effective address based operator for an index register,...
Definition fcml_common.hpp:6251
static Operand effq(const Register &base, const Register &index, fcml_uint8_t scaleFactor)
Factory method which creates an effective address based operator for a base register,...
Definition fcml_common.hpp:6392
static Operand addr(const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector, fcml_usize sizeOperator=FCML_DS_UNDEF)
Factory method which creates address type operand for given segment selector, effective address and o...
Definition fcml_common.hpp:5989
static Operand eff(const Integer &displacement, fcml_usize sizeOperator=FCML_DS_UNDEF)
Factory method which creates an effective address based operator for a displacement and optional size...
Definition fcml_common.hpp:6067
static Operand addr(const Address &address)
Factory method which builds an address operand.
Definition fcml_common.hpp:5875
static Operand effw(const Register &base)
Factory method which creates an effective address based operator for a base register and word size op...
Definition fcml_common.hpp:6138
static Operand offd(const Integer &offset)
Factory method which builds an offset based address operand with double word size operator.
Definition fcml_common.hpp:5916
static Operand effb(const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement)
Factory method which creates an effective address based operator for an index register,...
Definition fcml_common.hpp:6239
static Operand effd(const Register &base, const Integer &displacement)
Factory method which creates an effective address based operator for a base register,...
Definition fcml_common.hpp:6203
static Operand far_ptr(const FarPointer &pointer)
Factory method which builds a far pointer operand.
Definition fcml_common.hpp:5865
static Operand effw(const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement)
Factory method which creates an effective address based operator for a base register,...
Definition fcml_common.hpp:6432
static Operand offb(const Integer &offset)
Factory method which builds an offset based address operand with byte size operator.
Definition fcml_common.hpp:5896
static Operand addrd(const EffectiveAddress &effectiveAddress)
Factory method which creates address type operand for given effective address and double word size op...
Definition fcml_common.hpp:5967
static Operand addr(const EffectiveAddress &effectiveAddress, fcml_usize sizeOperator=FCML_DS_UNDEF)
Factory method which creates address type operand for given effective address and optional size opera...
Definition fcml_common.hpp:5937
Instruction operand.
Definition fcml_common.hpp:5184
Operand & setFarPointer(const FarPointer &farPointer)
Sets a new far pointer for the operand.
Definition fcml_common.hpp:5544
void imm(const Integer &imm)
Sets given immediate value for the operand and makes it to be an immediate operand.
Definition fcml_common.hpp:5330
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.
Definition fcml_common.hpp:5438
void off(const Integer &offset, fcml_usize sizeOperator=FCML_DS_UNDEF)
Prepares address operand for given offset.
Definition fcml_common.hpp:5388
bool isPseudoOpcode() const
Returns true if it's pseudo opcode operand.
Definition fcml_common.hpp:5719
fcml_hints getHints() const
Gets hits associated with the operand.
Definition fcml_common.hpp:5641
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.
Definition fcml_common.hpp:5342
bool operator==(const Operand &op) const
Checks if two operands are equal or not.
Definition fcml_common.hpp:5275
void far_ptr(const FarPointer &pointer)
Prepares far pointer operand for given far pointer.
Definition fcml_common.hpp:5365
bool isDisRelativeAddress() const
Returns true if it's an displacement relative address.
Definition fcml_common.hpp:5708
OperandType getOperandType() const
Gets operand type.
Definition fcml_common.hpp:5587
void addr(const EffectiveAddress &effectiveAddress, fcml_usize sizeOperator=FCML_DS_UNDEF)
Prepares an address operand for given effective address and optional size operator.
Definition fcml_common.hpp:5400
bool isMultimedia() const
Returns information if the operand is multimedia one or not.
Definition fcml_common.hpp:5698
bool isAbsoluteAddressing() const
Returns true if it's an absolute offset being set in the operand.
Definition fcml_common.hpp:5729
bool isAddr() const
Returns true if operand is an address operand.
Definition fcml_common.hpp:5471
Operand & setOperandType(OperandType operandType)
Sets a new operand type.
Definition fcml_common.hpp:5598
Operand & setRegister(const Register ®)
Sets a new register for the operand.
Definition fcml_common.hpp:5630
OperandType
See fcml_en_operand_type structure for more details.
Definition fcml_common.hpp:5190
@ OT_IMMEDIATE
Immediate integer value.
Definition fcml_common.hpp:5194
@ OT_REGISTER
Processor register.
Definition fcml_common.hpp:5200
@ OT_NONE
Operand not used.
Definition fcml_common.hpp:5192
@ OT_VIRTUAL
Virtual operand.
Definition fcml_common.hpp:5202
@ OT_ADDRESS
Memory address.
Definition fcml_common.hpp:5198
@ OT_FAR_POINTER
Direct far pointer.
Definition fcml_common.hpp:5196
Operand(const FarPointer &pointer, fcml_hints hints=FCML_OP_HINT_UNDEFIEND)
Creates a far pointer operand for given far pointer.
Definition fcml_common.hpp:5234
bool isFar() const
Returns true if operand is a far pointer operand.
Definition fcml_common.hpp:5481
const Register & getRegister() const
Returns a reference to the constant register associated with the operand.
Definition fcml_common.hpp:5609
bool isRelativeAddressing() const
Returns true is relative addressing is used.
Definition fcml_common.hpp:5739
Decorators & getDecorators()
Gets decorators associated with the operand.
Definition fcml_common.hpp:5673
void reg(const Register ®)
Prepares operator for the given register.
Definition fcml_common.hpp:5424
const Address & getAddress() const
Gets reference to the constant address associated with the operand.
Definition fcml_common.hpp:5491
bool isReg() const
Returns true if operand is a register operand.
Definition fcml_common.hpp:5461
Operand & setDecorators(const Decorators &decorators)
Sets new operand decorators for the operand.
Definition fcml_common.hpp:5684
void far_ptr(fcml_uint16_t seg, fcml_int32_t addr)
Prepares far pointer operand for given components.
Definition fcml_common.hpp:5354
Register & getRegister()
Returns a reference to the register associated with the operand.
Definition fcml_common.hpp:5619
Operand(const Register ®, fcml_hints hints=FCML_OP_HINT_UNDEFIEND)
Creates a new register operand for given register.
Definition fcml_common.hpp:5260
Operand(const Address &address, fcml_hints hints=FCML_OP_HINT_UNDEFIEND)
Creates an address operand for given address.
Definition fcml_common.hpp:5247
Operand()
Creates an undefined operand.
Definition fcml_common.hpp:5209
const Integer & getImmediate() const
Gets a reference to the constant immediate value associated with the operand.
Definition fcml_common.hpp:5555
void addr(const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector, fcml_usize sizeOperator=FCML_DS_UNDEF)
Prepares address operator for given parameters.
Definition fcml_common.hpp:5413
bool isSIBEncoding() const
Returns true if the SIB byte is used.
Definition fcml_common.hpp:5749
const Decorators & getDecorators() const
Gets constant decorators associated with the operand.
Definition fcml_common.hpp:5663
Address & getAddress()
Gets reference to the address associated with the operand.
Definition fcml_common.hpp:5501
Integer & getImmediate()
Gets a reference to the immediate value associated with the operand.
Definition fcml_common.hpp:5565
Operand & setImmediate(const Integer &immediate)
Sets a new immediate value for the address.
Definition fcml_common.hpp:5576
Operand(const Integer &imm, fcml_hints hints=FCML_OP_HINT_UNDEFIEND)
Creates an immediate value operand for given integer.
Definition fcml_common.hpp:5221
Operand & setHints(fcml_hints hints)
Sets new operand level hits for the operand.
Definition fcml_common.hpp:5652
bool operator!=(const Operand &op) const
Checks if two operands are equal or not.
Definition fcml_common.hpp:5310
FarPointer & getFarPointer()
Gets a reference to the far pointer instance associated with the address.
Definition fcml_common.hpp:5533
void undef()
Converts operand to the undefined one.
Definition fcml_common.hpp:5320
const FarPointer & getFarPointer() const
Gets a reference to the constant far pointer instance associated with the address.
Definition fcml_common.hpp:5523
bool isImm() const
Returns true if operand is an immediate value operand.
Definition fcml_common.hpp:5451
Operand & setAddress(const Address &address)
Sets a new address for the operand.
Definition fcml_common.hpp:5512
void addr(const Address &address)
Prepares address operand for given address.
Definition fcml_common.hpp:5376
Operation is not supported.
Definition fcml_common.hpp:275
x86 - 64 register representation.
Definition fcml_common.hpp:1601
static const Register ZMM13()
Factory method for a register.
Definition fcml_common.hpp:2880
static const Register YMM30()
Factory method for a register.
Definition fcml_common.hpp:3460
void setType(RegisterType type)
Sets the register type.
Definition fcml_common.hpp:1727
static const Register ESP()
Factory method for a register.
Definition fcml_common.hpp:2138
static const Register ZMM24()
Factory method for a register.
Definition fcml_common.hpp:3290
static const Register DH()
Factory method for a register.
Definition fcml_common.hpp:2289
static const Register ZMM19()
Factory method for a register.
Definition fcml_common.hpp:3140
static const Register ZMM10()
Factory method for a register.
Definition fcml_common.hpp:2670
bool operator==(const Register ®) const
Compares registers.
Definition fcml_common.hpp:1757
static const Register RCX()
Factory method for a register.
Definition fcml_common.hpp:1898
static const Register MM1()
Factory method for a register.
Definition fcml_common.hpp:1908
static const Register DR0()
Factory method for a register.
Definition fcml_common.hpp:3700
static const Register FS()
Factory method for a register.
Definition fcml_common.hpp:3550
static const Register ZMM21()
Factory method for a register.
Definition fcml_common.hpp:3200
static const Register ZMM9()
Factory method for a register.
Definition fcml_common.hpp:2600
static const Register R10W()
Factory method for a register.
Definition fcml_common.hpp:2620
static const Register ZMM14()
Factory method for a register.
Definition fcml_common.hpp:2950
static const Register SIL()
Factory method for a register.
Definition fcml_common.hpp:2299
static const Register EAX()
Factory method for a register.
Definition fcml_common.hpp:1808
static const Register YMM17()
Factory method for a register.
Definition fcml_common.hpp:3070
static const Register ST5()
Factory method for a register.
Definition fcml_common.hpp:3620
static const Register YMM22()
Factory method for a register.
Definition fcml_common.hpp:3220
static const Register YMM0()
Factory method for a register.
Definition fcml_common.hpp:1848
static const Register YMM16()
Factory method for a register.
Definition fcml_common.hpp:3040
static const Register XMM9()
Factory method for a register.
Definition fcml_common.hpp:2580
static const Register R14L()
Factory method for a register.
Definition fcml_common.hpp:2890
static const Register XMM6()
Factory method for a register.
Definition fcml_common.hpp:2349
static const Register R10D()
Factory method for a register.
Definition fcml_common.hpp:2630
static const Register ZMM0()
Factory method for a register.
Definition fcml_common.hpp:1858
static const Register XMM1()
Factory method for a register.
Definition fcml_common.hpp:1918
static const Register XMM2()
Factory method for a register.
Definition fcml_common.hpp:1998
static const Register YMM11()
Factory method for a register.
Definition fcml_common.hpp:2730
static const Register ZMM2()
Factory method for a register.
Definition fcml_common.hpp:2018
static const Register K3()
Factory method for a register.
Definition fcml_common.hpp:3840
static const Register AX()
Factory method for a register.
Definition fcml_common.hpp:1798
static const Register YMM9()
Factory method for a register.
Definition fcml_common.hpp:2590
static const Register SS()
Factory method for a register.
Definition fcml_common.hpp:3530
static const Register YMM8()
Factory method for a register.
Definition fcml_common.hpp:2520
static const Register R12W()
Factory method for a register.
Definition fcml_common.hpp:2760
static const Register CX()
Factory method for a register.
Definition fcml_common.hpp:1878
static const Register R13D()
Factory method for a register.
Definition fcml_common.hpp:2840
static const Register R15D()
Factory method for a register.
Definition fcml_common.hpp:2980
static const Register ZMM8()
Factory method for a register.
Definition fcml_common.hpp:2530
static const Register SI()
Factory method for a register.
Definition fcml_common.hpp:2309
static const Register EBX()
Factory method for a register.
Definition fcml_common.hpp:2048
static const Register ZMM20()
Factory method for a register.
Definition fcml_common.hpp:3170
static const Register R8()
Factory method for a register.
Definition fcml_common.hpp:2500
static const Register DR4()
Factory method for a register.
Definition fcml_common.hpp:3740
static const Register UNDEF()
Factory method for an undefined register.
Definition fcml_common.hpp:1778
static const Register XMM30()
Factory method for a register.
Definition fcml_common.hpp:3450
static const Register YMM12()
Factory method for a register.
Definition fcml_common.hpp:2800
virtual ~Register()
Definition fcml_common.hpp:1672
static const Register R12D()
Factory method for a register.
Definition fcml_common.hpp:2770
static const Register XMM18()
Factory method for a register.
Definition fcml_common.hpp:3090
static const Register XMM10()
Factory method for a register.
Definition fcml_common.hpp:2650
static const Register CR3()
Factory method for a register.
Definition fcml_common.hpp:3670
static const Register ZMM22()
Factory method for a register.
Definition fcml_common.hpp:3230
static const Register DR2()
Factory method for a register.
Definition fcml_common.hpp:3720
static const Register RSI()
Factory method for a register.
Definition fcml_common.hpp:2329
static const Register YMM4()
Factory method for a register.
Definition fcml_common.hpp:2178
static const Register IP()
Factory method for a register.
Definition fcml_common.hpp:3780
static const Register CR8()
Factory method for a register.
Definition fcml_common.hpp:3690
static const Register YMM20()
Factory method for a register.
Definition fcml_common.hpp:3160
static const Register YMM7()
Factory method for a register.
Definition fcml_common.hpp:2450
bool getX64Exp() const
Gets true if it's a 8-bit general purpose register for REX aware instruction.
Definition fcml_common.hpp:1736
static const Register XMM28()
Factory method for a register.
Definition fcml_common.hpp:3390
static const Register SPL()
Factory method for a register.
Definition fcml_common.hpp:2118
static const Register GS()
Factory method for a register.
Definition fcml_common.hpp:3560
static const Register XMM26()
Factory method for a register.
Definition fcml_common.hpp:3330
static const Register CS()
Factory method for a register.
Definition fcml_common.hpp:3520
static const Register BL()
Factory method for a register.
Definition fcml_common.hpp:2028
static const Register K4()
Factory method for a register.
Definition fcml_common.hpp:3850
static const Register K5()
Factory method for a register.
Definition fcml_common.hpp:3860
static const Register YMM28()
Factory method for a register.
Definition fcml_common.hpp:3400
static const Register R11D()
Factory method for a register.
Definition fcml_common.hpp:2700
static const Register K1()
Factory method for a register.
Definition fcml_common.hpp:3820
static const Register ZMM23()
Factory method for a register.
Definition fcml_common.hpp:3260
static const Register YMM25()
Factory method for a register.
Definition fcml_common.hpp:3310
static const Register RBX()
Factory method for a register.
Definition fcml_common.hpp:2058
static const Register BH()
Factory method for a register.
Definition fcml_common.hpp:2380
static const Register AL()
Factory method for a register.
Definition fcml_common.hpp:1788
static const Register XMM19()
Factory method for a register.
Definition fcml_common.hpp:3120
static const Register XMM11()
Factory method for a register.
Definition fcml_common.hpp:2720
static const Register XMM24()
Factory method for a register.
Definition fcml_common.hpp:3270
static const Register R10L()
Factory method for a register.
Definition fcml_common.hpp:2610
static const Register ZMM30()
Factory method for a register.
Definition fcml_common.hpp:3470
static const Register ZMM11()
Factory method for a register.
Definition fcml_common.hpp:2740
static const Register ES()
Factory method for a register.
Definition fcml_common.hpp:3510
static const Register DR6()
Factory method for a register.
Definition fcml_common.hpp:3760
static const Register MM6()
Factory method for a register.
Definition fcml_common.hpp:2339
static const Register RSP()
Factory method for a register.
Definition fcml_common.hpp:2148
static const Register ZMM3()
Factory method for a register.
Definition fcml_common.hpp:2098
RegisterType getType() const
Gets the register type.
Definition fcml_common.hpp:1718
static const Register YMM19()
Factory method for a register.
Definition fcml_common.hpp:3130
static const Register ST4()
Factory method for a register.
Definition fcml_common.hpp:3610
static const Register YMM1()
Factory method for a register.
Definition fcml_common.hpp:1928
static const Register XMM14()
Factory method for a register.
Definition fcml_common.hpp:2930
static const Register ZMM7()
Factory method for a register.
Definition fcml_common.hpp:2460
static const Register ZMM16()
Factory method for a register.
Definition fcml_common.hpp:3050
static const Register R15W()
Factory method for a register.
Definition fcml_common.hpp:2970
static const Register ZMM29()
Factory method for a register.
Definition fcml_common.hpp:3440
static const Register XMM22()
Factory method for a register.
Definition fcml_common.hpp:3210
static const Register YMM26()
Factory method for a register.
Definition fcml_common.hpp:3340
bool operator!=(const Register ®) const
Compares registers.
Definition fcml_common.hpp:1767
static const Register ST1()
Factory method for a register.
Definition fcml_common.hpp:3580
static const Register RDI()
Factory method for a register.
Definition fcml_common.hpp:2420
static const Register DR1()
Factory method for a register.
Definition fcml_common.hpp:3710
static const Register XMM4()
Factory method for a register.
Definition fcml_common.hpp:2168
static const Register R9W()
Factory method for a register.
Definition fcml_common.hpp:2550
fcml_uint8_t getReg() const
Gets the register number.
Definition fcml_common.hpp:1682
static const Register XMM7()
Factory method for a register.
Definition fcml_common.hpp:2440
static const Register YMM27()
Factory method for a register.
Definition fcml_common.hpp:3370
static const Register ZMM18()
Factory method for a register.
Definition fcml_common.hpp:3110
static const Register XMM17()
Factory method for a register.
Definition fcml_common.hpp:3060
static const Register R8D()
Factory method for a register.
Definition fcml_common.hpp:2490
static const Register EIP()
Factory method for a register.
Definition fcml_common.hpp:3790
static const Register XMM31()
Factory method for a register.
Definition fcml_common.hpp:3480
static const Register K6()
Factory method for a register.
Definition fcml_common.hpp:3870
static const Register DL()
Factory method for a register.
Definition fcml_common.hpp:1948
static const Register EDX()
Factory method for a register.
Definition fcml_common.hpp:1968
static const Register MM4()
Factory method for a register.
Definition fcml_common.hpp:2158
Register(const fcml_st_register ®)
Creates a register instance for given register structure.
Definition fcml_common.hpp:1647
static const Register ZMM17()
Factory method for a register.
Definition fcml_common.hpp:3080
static const Register YMM14()
Factory method for a register.
Definition fcml_common.hpp:2940
static const Register YMM5()
Factory method for a register.
Definition fcml_common.hpp:2269
static const Register ZMM12()
Factory method for a register.
Definition fcml_common.hpp:2810
static const Register R14D()
Factory method for a register.
Definition fcml_common.hpp:2910
static const Register MM7()
Factory method for a register.
Definition fcml_common.hpp:2430
static const Register EDI()
Factory method for a register.
Definition fcml_common.hpp:2410
static const Register YMM21()
Factory method for a register.
Definition fcml_common.hpp:3190
Register()
Creates an empty register instance.
Definition fcml_common.hpp:1635
static const Register DI()
Factory method for a register.
Definition fcml_common.hpp:2400
static const Register ST0()
Factory method for a register.
Definition fcml_common.hpp:3570
void setReg(fcml_uint8_t reg)
Sets the register number.
Definition fcml_common.hpp:1691
static const Register YMM15()
Factory method for a register.
Definition fcml_common.hpp:3010
Register(fcml_uint8_t reg, fcml_usize size, RegisterType type=REG_GPR, fcml_bool x64_exp=FCML_FALSE)
Creates a register instance for given parameters.
Definition fcml_common.hpp:1662
static const Register XMM29()
Factory method for a register.
Definition fcml_common.hpp:3420
static const Register YMM31()
Factory method for a register.
Definition fcml_common.hpp:3490
static const Register YMM6()
Factory method for a register.
Definition fcml_common.hpp:2359
static const Register XMM27()
Factory method for a register.
Definition fcml_common.hpp:3360
static const Register MM3()
Factory method for a register.
Definition fcml_common.hpp:2068
static const Register ECX()
Factory method for a register.
Definition fcml_common.hpp:1888
static const Register ZMM27()
Factory method for a register.
Definition fcml_common.hpp:3380
static const Register R15()
Factory method for a register.
Definition fcml_common.hpp:2990
static const Register RAX()
Factory method for a register.
Definition fcml_common.hpp:1818
static const Register CH()
Factory method for a register.
Definition fcml_common.hpp:2199
static const Register R13()
Factory method for a register.
Definition fcml_common.hpp:2850
static const Register CR2()
Factory method for a register.
Definition fcml_common.hpp:3660
static const Register YMM10()
Factory method for a register.
Definition fcml_common.hpp:2660
static const Register XMM21()
Factory method for a register.
Definition fcml_common.hpp:3180
static const Register ZMM6()
Factory method for a register.
Definition fcml_common.hpp:2369
static const Register XMM0()
Factory method for a register.
Definition fcml_common.hpp:1838
static const Register EBP()
Factory method for a register.
Definition fcml_common.hpp:2229
static const Register K7()
Factory method for a register.
Definition fcml_common.hpp:3880
static const Register R9L()
Factory method for a register.
Definition fcml_common.hpp:2540
static const Register R12L()
Factory method for a register.
Definition fcml_common.hpp:2750
static const Register BX()
Factory method for a register.
Definition fcml_common.hpp:2038
static const Register ZMM5()
Factory method for a register.
Definition fcml_common.hpp:2279
static const Register XMM16()
Factory method for a register.
Definition fcml_common.hpp:3030
static const Register RIP()
Factory method for a register.
Definition fcml_common.hpp:3800
static const Register XMM13()
Factory method for a register.
Definition fcml_common.hpp:2860
static const Register R13W()
Factory method for a register.
Definition fcml_common.hpp:2830
static const Register AH()
Factory method for a register.
Definition fcml_common.hpp:2108
static const Register YMM18()
Factory method for a register.
Definition fcml_common.hpp:3100
RegisterType
Register types.
Definition fcml_common.hpp:1608
@ REG_GPR
General purpose register.
Definition fcml_common.hpp:1612
@ REG_CR
Control register.
Definition fcml_common.hpp:1620
@ REG_OPMASK
Opmask register.
Definition fcml_common.hpp:1628
@ REG_UNDEFINED
Undefined register type.
Definition fcml_common.hpp:1610
@ REG_SEG
Segment register.
Definition fcml_common.hpp:1618
@ REG_SIMD
SIMD (SSE, MMX) register.
Definition fcml_common.hpp:1614
@ REG_FPU
FPU register.
Definition fcml_common.hpp:1616
@ REG_DR
Debug register.
Definition fcml_common.hpp:1622
@ REG_IP
Instruction pointer register.
Definition fcml_common.hpp:1624
static const Register CR4()
Factory method for a register.
Definition fcml_common.hpp:3680
static const Register R9D()
Factory method for a register.
Definition fcml_common.hpp:2560
static const Register XMM15()
Factory method for a register.
Definition fcml_common.hpp:3000
static const Register YMM29()
Factory method for a register.
Definition fcml_common.hpp:3430
static const Register BP()
Factory method for a register.
Definition fcml_common.hpp:2219
static const Register ST6()
Factory method for a register.
Definition fcml_common.hpp:3630
static const Register BPL()
Factory method for a register.
Definition fcml_common.hpp:2209
static const Register XMM8()
Factory method for a register.
Definition fcml_common.hpp:2510
static const Register CL()
Factory method for a register.
Definition fcml_common.hpp:1868
static const Register ZMM1()
Factory method for a register.
Definition fcml_common.hpp:1938
void setX64Exp(bool x64Exp)
Sets x64exp flag, see manual.
Definition fcml_common.hpp:1745
static const Register R11W()
Factory method for a register.
Definition fcml_common.hpp:2690
static const Register MM2()
Factory method for a register.
Definition fcml_common.hpp:1988
static const Register ST2()
Factory method for a register.
Definition fcml_common.hpp:3590
static const Register YMM24()
Factory method for a register.
Definition fcml_common.hpp:3280
static const Register CR0()
Factory method for a register.
Definition fcml_common.hpp:3650
static const Register R11()
Factory method for a register.
Definition fcml_common.hpp:2710
static const Register MM0()
Factory method for a register.
Definition fcml_common.hpp:1828
static const Register DR5()
Factory method for a register.
Definition fcml_common.hpp:3750
static const Register DX()
Factory method for a register.
Definition fcml_common.hpp:1958
static const Register R8W()
Factory method for a register.
Definition fcml_common.hpp:2480
static const Register XMM5()
Factory method for a register.
Definition fcml_common.hpp:2259
static const Register YMM2()
Factory method for a register.
Definition fcml_common.hpp:2008
static const Register ZMM26()
Factory method for a register.
Definition fcml_common.hpp:3350
static const Register DR3()
Factory method for a register.
Definition fcml_common.hpp:3730
static const Register ST3()
Factory method for a register.
Definition fcml_common.hpp:3600
void setSize(fcml_usize size)
Sets the register size.
Definition fcml_common.hpp:1709
fcml_usize getSize() const
Gets the register size.
Definition fcml_common.hpp:1700
static const Register R15L()
Factory method for a register.
Definition fcml_common.hpp:2960
static const Register R14W()
Factory method for a register.
Definition fcml_common.hpp:2900
static const Register ESI()
Factory method for a register.
Definition fcml_common.hpp:2319
static const Register XMM23()
Factory method for a register.
Definition fcml_common.hpp:3240
static const Register R10()
Factory method for a register.
Definition fcml_common.hpp:2640
static const Register YMM3()
Factory method for a register.
Definition fcml_common.hpp:2088
static const Register R11L()
Factory method for a register.
Definition fcml_common.hpp:2680
static const Register RBP()
Factory method for a register.
Definition fcml_common.hpp:2239
static const Register DS()
Factory method for a register.
Definition fcml_common.hpp:3540
static const Register XMM3()
Factory method for a register.
Definition fcml_common.hpp:2078
static const Register ZMM15()
Factory method for a register.
Definition fcml_common.hpp:3020
static const Register ZMM25()
Factory method for a register.
Definition fcml_common.hpp:3320
static const Register XMM25()
Factory method for a register.
Definition fcml_common.hpp:3300
static const Register R14()
Factory method for a register.
Definition fcml_common.hpp:2920
static const Register K2()
Factory method for a register.
Definition fcml_common.hpp:3830
static const Register R9()
Factory method for a register.
Definition fcml_common.hpp:2570
static const Register ZMM28()
Factory method for a register.
Definition fcml_common.hpp:3410
static const Register K0()
Factory method for a register.
Definition fcml_common.hpp:3810
static const Register XMM20()
Factory method for a register.
Definition fcml_common.hpp:3150
static const Register MM5()
Factory method for a register.
Definition fcml_common.hpp:2249
static const Register R13L()
Factory method for a register.
Definition fcml_common.hpp:2820
static const Register DR7()
Factory method for a register.
Definition fcml_common.hpp:3770
static const Register DIL()
Factory method for a register.
Definition fcml_common.hpp:2390
static const Register R8L()
Factory method for a register.
Definition fcml_common.hpp:2470
static const Register SP()
Factory method for a register.
Definition fcml_common.hpp:2128
static const Register YMM23()
Factory method for a register.
Definition fcml_common.hpp:3250
static const Register XMM12()
Factory method for a register.
Definition fcml_common.hpp:2790
static const Register ZMM4()
Factory method for a register.
Definition fcml_common.hpp:2188
static const Register RDX()
Factory method for a register.
Definition fcml_common.hpp:1978
static const Register ST7()
Factory method for a register.
Definition fcml_common.hpp:3640
static const Register YMM13()
Factory method for a register.
Definition fcml_common.hpp:2870
static const Register R12()
Factory method for a register.
Definition fcml_common.hpp:2780
static const Register ZMM31()
Factory method for a register.
Definition fcml_common.hpp:3500
Describes segment register.
Definition fcml_common.hpp:4109
SegmentSelector()
Creates an empty segment selector instance.
Definition fcml_common.hpp:4116
SegmentSelector & operator=(const SegmentSelector ®)
Copies one segment selector to another.
Definition fcml_common.hpp:4173
const Register & getSegmentSelector() const
Gets constant segment register associated with the selector.
Definition fcml_common.hpp:4224
void setDefaultReg(bool isDefaultReg)
Sets "default" flag for the segment selector.
Definition fcml_common.hpp:4214
bool isDefaultReg() const
Returns true if a register stored in the segment selector is the default one in the context the segme...
Definition fcml_common.hpp:4204
Register & getSegmentSelector()
Gets segment register associated with the selector.
Definition fcml_common.hpp:4234
bool operator==(const SegmentSelector &segmentSelector) const
Checks if two segment selector are equal.
Definition fcml_common.hpp:4143
SegmentSelector(const Register &segmentSelector, bool isDefaultReg=FCML_TRUE)
Creates a segment selector instance for given parameters.
Definition fcml_common.hpp:4127
static SegmentSelector seg(const Register &segmentSelector, bool isDefaultReg)
Creates segment selector for the given register.
Definition fcml_common.hpp:4191
bool operator!=(const SegmentSelector &segmentSelector) const
Checks if two segment selector are not equal.
Definition fcml_common.hpp:4154
void setSegmentSelector(const Register &segmentSelector)
Sets segment register for the selector.
Definition fcml_common.hpp:4244
Two way conversion for common types.
Definition fcml_common.hpp:8933
Definitions of common structures used by FCML components.
fcml_int64_t fcml_ip
General instruction pointer holder.
Definition fcml_common.h:96
fcml_en_condition_type
Condition type.
Definition fcml_common.h:473
@ FCML_CONDITION_LE
7 Less than or equal to
Definition fcml_common.h:489
@ FCML_CONDITION_L
6 Less than
Definition fcml_common.h:487
@ FCML_CONDITION_BE
3 Below or equal
Definition fcml_common.h:481
@ FCML_CONDITION_O
0 Overflow
Definition fcml_common.h:475
@ FCML_CONDITION_P
5 Parity
Definition fcml_common.h:485
@ FCML_CONDITION_E
2 Equal
Definition fcml_common.h:479
@ FCML_CONDITION_B
1 Below
Definition fcml_common.h:477
@ FCML_CONDITION_S
4 Sign
Definition fcml_common.h:483
fcml_en_register
Register type.
Definition fcml_common.h:426
@ FCML_REG_FPU
FPU register.
Definition fcml_common.h:434
@ FCML_REG_CR
Control register.
Definition fcml_common.h:438
@ FCML_REG_SIMD
SIMD (SSE, MMX) register.
Definition fcml_common.h:432
@ FCML_REG_OPMASK
Operand mask register.
Definition fcml_common.h:444
@ FCML_REG_DR
Debug register.
Definition fcml_common.h:440
@ FCML_REG_GPR
General purpose register.
Definition fcml_common.h:430
@ FCML_REG_UNDEFINED
Undefined register type.
Definition fcml_common.h:428
@ FCML_REG_SEG
Segment register.
Definition fcml_common.h:436
@ FCML_REG_IP
Instruction pointer register.
Definition fcml_common.h:442
enum fcml_en_address_form fcml_en_effective_address_form
Memory addressing using ModR/M field
fcml_uint16_t fcml_prefixes
Type for explicit instruction prefixes bit mask.
Definition fcml_common.h:91
@ FCML_AF_UNDEFINED
Default value set if memory addressing hasn't been configured.
Definition fcml_common.h:578
@ FCML_AF_COMBINED
Effective address combined from address components like base register, index registers,...
Definition fcml_common.h:583
@ FCML_AF_OFFSET
Absolute offset (address).
Definition fcml_common.h:580
fcml_uint16_t fcml_hints
Type used for storing instruction and operand hint masks.
Definition fcml_common.h:86
fcml_en_operand_type
Supported operand types.
Definition fcml_common.h:673
@ FCML_OT_REGISTER
Processor register.
Definition fcml_common.h:683
@ FCML_OT_NONE
Operand not used.
Definition fcml_common.h:675
@ FCML_OT_IMMEDIATE
Immediate integer value.
Definition fcml_common.h:677
@ FCML_OT_FAR_POINTER
Direct far pointer.
Definition fcml_common.h:679
@ FCML_OT_ADDRESS
Memory address.
Definition fcml_common.h:681
@ FCML_OT_VIRTUAL
Not an operand in a strict sense, only a container for attributes.
Definition fcml_common.h:688
fcml_en_operating_mode
Supported processor operating modes.
Definition fcml_common.h:73
@ FCML_OM_16_BIT
Real-addressing mode, virtual 8086 mode.
Definition fcml_common.h:75
@ FCML_OM_32_BIT
Protected/Compatibility mode when 'D' segment descriptor flag is set to 1.
Definition fcml_common.h:78
@ FCML_OM_64_BIT
64-bit mode.
Definition fcml_common.h:80
fcml_en_instruction_hints
Instruction level hints.
Definition fcml_common.h:760
@ FCML_HINT_NO_HINTS
No hints defined.
Definition fcml_common.h:762
@ FCML_HINT_FAR_POINTER
Hints an instruction to use a FAR pointer to address the memory.
Definition fcml_common.h:764
@ FCML_HINT_DIRECT_POINTER
Hints an instruction to use a DIRECT memory addressing.
Definition fcml_common.h:773
@ FCML_HINT_NEAR_POINTER
Hints an instruction to use a NEAR pointer to address the memory.
Definition fcml_common.h:766
@ FCML_HINT_LONG_FORM_POINTER
This hint is used only by the assembler in order to force it to generate three byte VEX/XOP prefix ev...
Definition fcml_common.h:769
@ FCML_HINT_INDIRECT_POINTER
Hints an instruction to use an INDIRECT pointer to address the memory.
Definition fcml_common.h:771
#define FCML_OPERANDS_COUNT
Maximal number of the instruction operands.
Definition fcml_common.h:35
fcml_en_operand_hints
Operand hints.
Definition fcml_common.h:695
@ FCML_OP_HINT_MULTIMEDIA_INSTRUCTION
SIMD operand.
Definition fcml_common.h:705
@ FCML_OP_HINT_SIB_ENCODING
Encode ModR/M with optional SIB byte if possible.
Definition fcml_common.h:729
@ FCML_OP_HINT_DISPLACEMENT_RELATIVE_ADDRESS
Relative address.
Definition fcml_common.h:710
@ FCML_OP_HINT_PSEUDO_OPCODE
Pseudo opcode.
Definition fcml_common.h:717
@ FCML_OP_HINT_ABSOLUTE_ADDRESSING
Offset should be encoded as absolute address.
Definition fcml_common.h:721
@ FCML_OP_HINT_RELATIVE_ADDRESSING
Offset should be encoded as relative address.
Definition fcml_common.h:725
@ FCML_OP_HINT_UNDEFIEND
Undefined.
Definition fcml_common.h:699
std::basic_ostringstream< fcml_char > fcml_costream
String output stream.
Definition fcml_common.hpp:59
std::basic_string< fcml_char > fcml_cstring
By using this type definition here, it will be definitely much easier to support UNICODE in future re...
Definition fcml_common.hpp:53
Common general purpose utility functions.
Global error handling related declarations.
fcml_uint16_t fcml_ceh_error
All error codes should be held in variables of this type.
Definition fcml_errors.h:156
#define FCML_TEXT(x)
Used to code literal strings.
Definition fcml_types.h:61
@ FCML_CEH_GEC_NO_ERROR
Operation succeed.
Definition fcml_errors.h:42
#define FCML_PREFIX_XACQUIRE
XACQUIRE prefix (0xF2)
Definition fcml_common.h:60
#define FCML_PREFIX_REPE
REPE prefix (0xF3)
Definition fcml_common.h:56
#define FCML_PREFIX_BRANCH_HINT
branch hint (0x2E) (SSE2 extension)
Definition fcml_common.h:64
#define FCML_PREFIX_REPNE
REPNE prefix (0xF2)
Definition fcml_common.h:50
#define FCML_PREFIX_LOCK
LOCK prefix (0xF0)
Definition fcml_common.h:48
#define FCML_PREFIX_XRELEASE
XRELEASE prefix (0xF3)
Definition fcml_common.h:62
#define FCML_PREFIX_NOBRANCH_HINT
nobranch hint (0x3E) (SSE2 extension)
Definition fcml_common.h:66
#define FCML_PREFIX_REP
REP prefix (0xF3)
Definition fcml_common.h:54
#define FCML_PREFIX_REPNZ
REPNZ prefix (0xF2)
Definition fcml_common.h:52
#define FCML_PREFIX_REPZ
REPZ prefix (0xF3)
Definition fcml_common.h:58
Wraps instruction hint and exposes factory methods for instruction hints.
Definition fcml_common.hpp:402
static const InstructionHint DIRECT_POINTER()
Creates instruction hint: DIRECT_POINTER.
Definition fcml_common.hpp:451
static const InstructionHint FAR_POINTER()
Creates instruction hint: FAR_POINTER.
Definition fcml_common.hpp:430
static const InstructionHint INDIRECT_POINTER()
Creates instruction hint: INDIRECT_POINTER.
Definition fcml_common.hpp:444
static const InstructionHint NO_HINTS()
Creates instruction hint: NO_HINTS.
Definition fcml_common.hpp:416
static const InstructionHint LONG_FORM_POINTER()
Creates instruction hint: LONG_FORM_POINTER.
Definition fcml_common.hpp:437
static const InstructionHint NEAR_POINTER()
Creates instruction hint: NEAR_POINTER.
Definition fcml_common.hpp:423
Wraps operand hint and exposes factory methods for instruction hints.
Definition fcml_common.hpp:461
static const OperandHint MULTIMEDIA()
Creates operand level hint: MULTIMEDIA_INSTRUCTION.
Definition fcml_common.hpp:478
static const OperandHint PSEUDO_OPCODE()
Creates operand level hint: PSEUDO_OPCODE.
Definition fcml_common.hpp:492
static const OperandHint RELATIVE_ADDRESSING()
Creates operand level hint: RELATIVE_ADDRESSING.
Definition fcml_common.hpp:506
static const OperandHint ABSOLUTE_ADDRESSING()
Creates operand level hint: ABSOLUTE_ADDRESSING.
Definition fcml_common.hpp:499
static const OperandHint UNDEFIEND()
Creates operand level hint: UNDEFIEND.
Definition fcml_common.hpp:471
static const OperandHint SIB_ENCODING()
Creates operand level hint: SIB_ENCODING.
Definition fcml_common.hpp:513
static const OperandHint DISPLACEMENT_RELATIVE_ADDRESS()
Creates operand level hint: DISPLACEMENT_RELATIVE_ADDRESS.
Definition fcml_common.hpp:485
Generic memory addressing operator.
Definition fcml_common.h:631
fcml_st_offset offset
Memory address for FCML_AF_OFFSET form.
Definition fcml_common.h:643
fcml_st_segment_selector segment_selector
Segment register.
Definition fcml_common.h:639
fcml_en_effective_address_form address_form
Memory addressing format: absolute offset/effective address.
Definition fcml_common.h:637
fcml_usize size_operator
Size of data accessed in memory.
Definition fcml_common.h:633
fcml_st_effective_address effective_address
Memory address for FCML_AF_COMBINED form.
Definition fcml_common.h:641
Defines instruction's condition.
Definition fcml_common.h:495
Effective address.
Definition fcml_common.h:605
fcml_st_register index
GPR index register.
Definition fcml_common.h:609
fcml_st_integer displacement
Displacement value.
Definition fcml_common.h:613
fcml_st_register base
GPR base register.
Definition fcml_common.h:607
fcml_uint8_t scale_factor
Scale factor 1,2,4 or 8.
Definition fcml_common.h:611
Describes the execution context for the instruction being assembled.
Definition fcml_common.h:838
fcml_usize operand_size_attribute
The default operand size attribute (See 'D' flag of segment descriptor.)
Definition fcml_common.h:844
fcml_ip ip
The instruction pointer EIP/RIP.
Definition fcml_common.h:847
fcml_usize address_size_attribute
The default address size attribute (See 'D' flag of segment descriptor.)
Definition fcml_common.h:842
fcml_en_operating_mode op_mode
The processor operating mode 16/32/64-bit.
Definition fcml_common.h:840
Representation of far pointer operand.
Definition fcml_common.h:556
fcml_uint16_t segment
16-bit Code segment.
Definition fcml_common.h:558
fcml_int16_t offset16
16-bit offset.
Definition fcml_common.h:562
fcml_usize offset_size
Size of the offset.
Definition fcml_common.h:560
fcml_int32_t offset32
32-bit offset.
Definition fcml_common.h:564
Represents an instruction as a generic model.
Definition fcml_common.h:781
fcml_st_operand operands[FCML_OPERANDS_COUNT]
Fixed size array of instruction operands.
Definition fcml_common.h:796
fcml_st_condition condition
Describes condition used by assembled/disassembled conditional instruction.
Definition fcml_common.h:794
fcml_prefixes prefixes
Describes explicit instruction prefixes.
Definition fcml_common.h:784
fcml_hints hints
Holds instruction level hints.
Definition fcml_common.h:786
fcml_int operands_count
Number of operands defined for instruction.
Definition fcml_common.h:798
fcml_char * mnemonic
Dialect-dependent instruction mnemonic.
Definition fcml_common.h:789
fcml_bool is_conditional
True for conditional instructions.
Definition fcml_common.h:791
Definition fcml_types.h:257
Absolute offset.
Definition fcml_common.h:589
fcml_int16_t off16
Place for 16-bit absolute offset.
Definition fcml_common.h:595
fcml_int32_t off32
Place for 32-bit absolute offset.
Definition fcml_common.h:597
fcml_int64_t off64
Place for 64-bit absolute offset.
Definition fcml_common.h:599
fcml_bool is_signed
True if offset should be treated as signed value.
Definition fcml_common.h:593
fcml_usize size
Offset size 16,32 or 64 bits.
Definition fcml_common.h:591
Container for operand decorators.
Definition fcml_common.h:657
fcml_bool sae
Indicates support for SAE (Suppress All Exceptions).
Definition fcml_common.h:667
fcml_st_register operand_mask_reg
The 64-bit k registers are: k0 through k7.
Definition fcml_common.h:663
fcml_bool z
Zeroing masking.
Definition fcml_common.h:661
fcml_nuint8_t er
Embedded rounding control.
Definition fcml_common.h:665
fcml_nuint8_t bcast
Broadcasting: 2, 4, 8, 16, 32, 64.
Definition fcml_common.h:659
Instruction operand.
Definition fcml_common.h:735
fcml_st_integer immediate
Immediate value operand.
Definition fcml_common.h:741
fcml_st_address address
Effective address or absolute offset.
Definition fcml_common.h:745
fcml_st_operand_decorators decorators
Operand decorators.
Definition fcml_common.h:749
fcml_st_register reg
Register operand.
Definition fcml_common.h:747
fcml_en_operand_type type
Operand type.
Definition fcml_common.h:737
fcml_hints hints
Optional operand level hints.
Definition fcml_common.h:739
fcml_st_far_pointer far_pointer
Far pointer operand.
Definition fcml_common.h:743
Structure describes x86_64 register.
Definition fcml_common.h:450
fcml_uint8_t reg
Register itself as a positive integer.
Definition fcml_common.h:456
fcml_usize size
Register size in bits.
Definition fcml_common.h:454
fcml_bool x64_exp
In case of SPL,BPL,SIL,DIL GPR registers has to be set to true.
Definition fcml_common.h:458
fcml_en_register type
Register type.
Definition fcml_common.h:452
Describes segment register.
Definition fcml_common.h:619
fcml_bool is_default_reg
Set to true if given segment register is a default one in given context.
Definition fcml_common.h:625
fcml_st_register segment_selector
Used segment register.
Definition fcml_common.h:621