Go to the documentation of this file.
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 ) {
78 #if defined(FCML_MSCC)
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;
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));
9090 dest.
er.is_not_null = src.
getEr().isNotNull();
9091 dest.
er.value =
static_cast<fcml_uint8_t
>(src.
getEr().getValue());
9099 dest.
setNegation( src.is_negation ?
true :
false );
9114 convert( src.
operands[i], dest[i] );
9127 convert( src[i], dest.
operands[i] );
9134 Env::strFree( instruction.
mnemonic );
9142 #endif //FCML_COMMON_HPP_
static const Register XMM16()
Factory method for a register.
Definition: fcml_common.hpp:3030
static const Condition AE()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6628
static const Register YMM10()
Factory method for a register.
Definition: fcml_common.hpp:2660
void setReg(fcml_uint8_t reg)
Sets the register number.
Definition: fcml_common.hpp:1691
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
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
void setSegment(fcml_uint16_t segment)
Sets segment selector.
Definition: fcml_common.hpp:4088
static const InstructionHint NEAR_PTR()
Creates a hint instance described by the name of the method.
Definition: fcml_common.hpp:7742
const Register & getBase() const
Gets the constant base register associated with the effective address.
Definition: fcml_common.hpp:4473
static const InstructionPrefix REPE()
Creates instruction prefix: REPE.
Definition: fcml_common.hpp:357
bool isC() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6638
static const Condition NL()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6989
EffectiveAddress & setScaleFactor(fcml_uint8_t scaleFactor)
Sets a new scale factor for the effective address.
Definition: fcml_common.hpp:4580
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
@ OT_VIRTUAL
Virtual operand.
Definition: fcml_common.hpp:5202
static const Register AL()
Factory method for a register.
Definition: fcml_common.hpp:1788
@ CONDITION_LE
7 Less than or equal to
Definition: fcml_common.hpp:6493
static const Register R15()
Factory method for a register.
Definition: fcml_common.hpp:2990
const Register & getOpmaskReg() const
Gets constant AVX-512 opmask register for {k} decorator.
Definition: fcml_common.hpp:5105
static const Register XMM3()
Factory method for a register.
Definition: fcml_common.hpp:2078
void setOpMode(OperatingMode opMode)
Sets a new processor operating mode for the entry point.
Definition: fcml_common.hpp:671
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
static const Register BX()
Factory method for a register.
Definition: fcml_common.hpp:2038
fcml_bool x64_exp
In case of SPL,BPL,SIL,DIL GPR registers has to be set to true.
Definition: fcml_common.h:458
static const Register DR6()
Factory method for a register.
Definition: fcml_common.hpp:3760
static const Register ZMM18()
Factory method for a register.
Definition: fcml_common.hpp:3110
Wraps operand hint and exposes factory methods for instruction hints.
Definition: fcml_common.hpp:461
static const Register YMM24()
Factory method for a register.
Definition: fcml_common.hpp:3280
EntryPoint()
Creates an empty entry point instance.
Definition: fcml_common.hpp:541
static Operand imm(const Integer &imm)
Factory method which builds an immediate operand.
Definition: fcml_common.hpp:5833
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
static const InstructionHint INDIRECT_PTR()
Creates a hint instance described by the name of the method.
Definition: fcml_common.hpp:7784
fcml_usize getSize() const
Gets the register size.
Definition: fcml_common.hpp:1700
Integer & getOffset()
Gets the offset associated with the address.
Definition: fcml_common.hpp:4914
Decorators & setOpmaskReg(const Register &opmaskReg)
Sets AVX-512 opmask register for {k} decorator.
Definition: fcml_common.hpp:5052
const Decorators & getDecorators() const
Gets constant decorators associated with the operand.
Definition: fcml_common.hpp:5663
Holds instruction pointer, processor operating mode and memory segment flags.
Definition: fcml_common.hpp:524
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
fcml_en_instruction_hints
Instruction level hints.
Definition: fcml_common.h:758
IB & xrelease()
Sets a prefix described by the name of the method for the instruction being built.
Definition: fcml_common.hpp:7984
static const Register ZMM14()
Factory method for a register.
Definition: fcml_common.hpp:2950
fcml_en_operand_type type
Operand type.
Definition: fcml_common.h:733
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 const Register XMM5()
Factory method for a register.
Definition: fcml_common.hpp:2259
#define FCML_PREFIX_BRANCH_HINT
branch hint (0x2E) (SSE2 extension)
Definition: fcml_common.h:64
bool operator==(const EntryPoint &ep) const
Checks if two entry points are equal.
Definition: fcml_common.hpp:575
bool isDirectPointer() const
Returns true if direct pointer hint is set.
Definition: fcml_common.hpp:7559
fcml_usize getAddressSizeAttribute() const
Gets address size attribute held by the entry point.
Definition: fcml_common.hpp:601
@ FCML_OT_FAR_POINTER
Direct far pointer.
Definition: fcml_common.h:675
static const Register R9D()
Factory method for a register.
Definition: fcml_common.hpp:2560
bool isLock() const
Returns true if lock prefix is set.
Definition: fcml_common.hpp:7433
Describes an instruction.
Definition: fcml_common.hpp:7185
Instruction & setOperandsCount(fcml_int operandsCount)
Sets number of operands available in the instruction.
Definition: fcml_common.hpp:7397
bool isNC() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6657
IB & branchHint()
Sets a prefix described by the name of the method for the instruction being built.
Definition: fcml_common.hpp:8005
Container for operand decorators.
Definition: fcml_common.h:653
static const Register YMM2()
Factory method for a register.
Definition: fcml_common.hpp:2008
void clean()
Cleans the instruction by removing all operands from it.
Definition: fcml_common.hpp:7272
void incrementIP(fcml_ip ip)
Increments the instruction pointer by given number of bytes.
Definition: fcml_common.hpp:681
static const OperandHint SIB_ENCODING()
Creates operand level hint: SIB_ENCODING.
Definition: fcml_common.hpp:513
@ FCML_HINT_NEAR_POINTER
Hints instruction to use NEAR pointer to address the memory.
Definition: fcml_common.h:766
fcml_ip getIP() const
Gets instruction pointer held by the entry point.
Definition: fcml_common.hpp:641
bool isB() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6562
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
static const Register ST4()
Factory method for a register.
Definition: fcml_common.hpp:3610
static const Condition Z()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6704
static const OperandHint UNDEFIEND()
Creates operand level hint: UNDEFIEND.
Definition: fcml_common.hpp:471
fcml_st_register reg
Register operand.
Definition: fcml_common.h:743
static const Condition NS()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6856
static const Register R10W()
Factory method for a register.
Definition: fcml_common.hpp:2620
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 Integer uint16(fcml_uint16_t value)
Factory method which creates an instance fo the Integer for given parameter.
Definition: fcml_common.hpp:1343
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
@ FCML_REG_GPR
General purpose register.
Definition: fcml_common.h:430
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
Integer()
Definition: fcml_common.hpp:704
bool isPO() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6923
@ FCML_REG_CR
Control register.
Definition: fcml_common.h:438
static const Register ECX()
Factory method for a register.
Definition: fcml_common.hpp:1888
@ REG_IP
Instruction pointer register.
Definition: fcml_common.hpp:1624
static const Register RDI()
Factory method for a register.
Definition: fcml_common.hpp:2420
IB & nearPtr()
Sets a hint described by the name of the method for the instruction being built.
Definition: fcml_common.hpp:7751
void off(const Integer &offset, fcml_usize sizeOperator=FCML_DS_UNDEF)
Prepares address operand for given offset.
Definition: fcml_common.hpp:5388
bool isBranchHint() const
Returns true if branch_hint prefix is set.
Definition: fcml_common.hpp:7505
static const Register K5()
Factory method for a register.
Definition: fcml_common.hpp:3860
static const Register YMM20()
Factory method for a register.
Definition: fcml_common.hpp:3160
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
virtual bool hasNext()=0
Gets true if there is an another element in the iterator.
fcml_usize getOffsetSize() const
Gets offset size.
Definition: fcml_common.hpp:4018
static const InstructionPrefix REPNE()
Creates instruction prefix: REPNE.
Definition: fcml_common.hpp:336
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
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
@ REG_UNDEFINED
Undefined register type.
Definition: fcml_common.hpp:1610
static const Register R11()
Factory method for a register.
Definition: fcml_common.hpp:2710
Address & getAddress()
Gets reference to the address associated with the operand.
Definition: fcml_common.hpp:5501
bool isRepnz() const
Returns true if lock repnz is set.
Definition: fcml_common.hpp:7451
void setAddressSizeAttribute(fcml_usize addressSizeAttribute)
Sets a new address size attribute for the entry point.
Definition: fcml_common.hpp:611
@ FCML_REG_IP
Instruction pointer register.
Definition: fcml_common.h:442
Condition & getCondition()
Gets a pointer to the condition associated with the instruction.
Definition: fcml_common.hpp:7298
static const Register XMM4()
Factory method for a register.
Definition: fcml_common.hpp:2168
@ OT_ADDRESS
Memory address.
Definition: fcml_common.hpp:5198
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
bool isDisRelativeAddress() const
Returns true if it's an displacement relative address.
Definition: fcml_common.hpp:5708
Represents integer value.
Definition: fcml_common.hpp:700
bool operator!=(const fcml_uint64_t value) const
Checks if the integer is not equal to the passed value.
Definition: fcml_common.hpp:992
static const Register SIL()
Factory method for a register.
Definition: fcml_common.hpp:2299
fcml_usize size
Register size in bits.
Definition: fcml_common.h:454
static const Condition NAE()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6609
void setSize(fcml_usize size)
Sets the register size.
Definition: fcml_common.hpp:1709
IB & longFormPtr()
Sets a hint described by the name of the method for the instruction being built.
Definition: fcml_common.hpp:7772
bool operator==(const fcml_uint64_t value) const
Checks if the integer is equal to the passed value.
Definition: fcml_common.hpp:893
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
#define FCML_PREFIX_REPNZ
REPNZ prefix (0xF2)
Definition: fcml_common.h:52
EffectiveAddress & setDisplacement(const Integer &displacement)
Sets a new displacement value for the effective address.
Definition: fcml_common.hpp:4526
bool isRepe() const
Returns true if repe prefix is set.
Definition: fcml_common.hpp:7469
static const Register ST7()
Factory method for a register.
Definition: fcml_common.hpp:3640
Address & setOffset(const Integer &offset)
Sets a new offset for the address.
Definition: fcml_common.hpp:4925
Decorators & setZ(fcml_bool z)
Sets a new AVX-512 {z} decorator.
Definition: fcml_common.hpp:5029
static const InstructionHint INDIRECT_POINTER()
Creates instruction hint: INDIRECT_POINTER.
Definition: fcml_common.hpp:444
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
@ FCML_OT_NONE
Operand not used.
Definition: fcml_common.h:671
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
fcml_usize getOperandSizeAttribute() const
Gets operand size attribute held by the entry point.
Definition: fcml_common.hpp:621
@ FCML_REG_FPU
FPU register.
Definition: fcml_common.h:434
IB & offb(const Integer &offset)
Adds an offset based address operand with byte size operator.
Definition: fcml_common.hpp:8181
static const Register ZMM23()
Factory method for a register.
Definition: fcml_common.hpp:3260
@ FCML_OP_HINT_DISPLACEMENT_RELATIVE_ADDRESS
Relative address.
Definition: fcml_common.h:706
static fcml_string strDup(const fcml_string str)
Definition: fcml_common.hpp:74
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
IB & directPtr()
Sets a hint described by the name of the method for the instruction being built.
Definition: fcml_common.hpp:7814
@ AF_COMBINED
Effective address combined from address components like base register, index registers,...
Definition: fcml_common.hpp:4614
AddressForm getAddressForm() const
Gets an address form.
Definition: fcml_common.hpp:4849
static Integer uint32(fcml_uint32_t value)
Factory method which creates an insatnce fo the Integer for given parameter.
Definition: fcml_common.hpp:1363
static const InstructionPrefix LOCK()
Creates instruction prefix: LOCK.
Definition: fcml_common.hpp:329
fcml_usize operand_size_attribute
Default operand size attribute (See 'D' flag of segment descriptor.)
Definition: fcml_common.h:828
virtual T next()=0
Gets a next element from the iterator.
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
bool isReg() const
Returns true if operand is a register operand.
Definition: fcml_common.hpp:5461
static Integer int64(fcml_int64_t value)
Factory method which creates an insatnce fo the Integer for given parameter.
Definition: fcml_common.hpp:1373
Instruction(const fcml_cstring &mnemonic)
Creates an empty instruction for given mnemonic.
Definition: fcml_common.hpp:7205
static const Condition PE()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6894
static const Register FS()
Factory method for a register.
Definition: fcml_common.hpp:3550
@ FCML_OP_HINT_SIB_ENCODING
Encode ModR/M with optional SIB byte if possible.
Definition: fcml_common.h:725
Operand & setRegister(const Register ®)
Sets a new register for the operand.
Definition: fcml_common.hpp:5630
IB & imm(const Integer &imm)
Adds an immediate operand.
Definition: fcml_common.hpp:8106
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
static const Condition NBE()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6799
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
ConditionType
See fcml_st_condition for more details.
Definition: fcml_common.hpp:6477
Register & getOpmaskReg()
Gets AVX-512 opmask register for {k} decorator.
Definition: fcml_common.hpp:5115
static const Register YMM0()
Factory method for a register.
Definition: fcml_common.hpp:1848
static const Register ZMM3()
Factory method for a register.
Definition: fcml_common.hpp:2098
Definition: fcml_types.h:257
static const Register R11D()
Factory method for a register.
Definition: fcml_common.hpp:2700
static const Register ZMM5()
Factory method for a register.
Definition: fcml_common.hpp:2279
static const Register ZMM6()
Factory method for a register.
Definition: fcml_common.hpp:2369
static const Register XMM25()
Factory method for a register.
Definition: fcml_common.hpp:3300
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
EffectiveAddress & setBase(const Register &base)
Sets a new base register for the effective address.
Definition: fcml_common.hpp:4494
Integer operator-(const Integer &src) const
Subtraction operator.
Definition: fcml_common.hpp:1276
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
fcml_int64_t fcml_ip
General instruction pointer holder.
Definition: fcml_common.h:96
static const InstructionPrefix XACQUIRE()
Creates a prefix instance described by the name of the method.
Definition: fcml_common.hpp:7954
static const Register R8L()
Factory method for a register.
Definition: fcml_common.hpp:2470
void setOffset16(fcml_int16_t offset16)
Sets 16-bit offset.
Definition: fcml_common.hpp:4048
fcml_bool z
Zeroing masking.
Definition: fcml_common.h:657
EffectiveAddress(const Integer &displacement)
Creates an effective address instance with the displacement only.
Definition: fcml_common.hpp:4277
static const Register R8()
Factory method for a register.
Definition: fcml_common.hpp:2500
void setOffset32(fcml_int32_t offset32)
Sets 32-bit offset.
Definition: fcml_common.hpp:4068
Generic instruction model.
Definition: fcml_common.h:779
@ REG_SIMD
SIMD (SSE, MMX) register.
Definition: fcml_common.hpp:1614
fcml_en_condition_type
Condition type.
Definition: fcml_common.h:473
static const Register CR0()
Factory method for a register.
Definition: fcml_common.hpp:3650
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
bool operator!=(const fcml_int64_t value) const
Checks if the integer is not equal to the passed value.
Definition: fcml_common.hpp:1003
static const Register YMM26()
Factory method for a register.
Definition: fcml_common.hpp:3340
bool operator!=(const Nullable &nullable) const
Checks if two nullable values are not equal.
Definition: fcml_common.hpp:172
static const Condition O()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6533
bool operator==(const FarPointer &fp) const
Compares two far pointers.
Definition: fcml_common.hpp:3953
static const Register MM7()
Factory method for a register.
Definition: fcml_common.hpp:2430
static const Register BH()
Factory method for a register.
Definition: fcml_common.hpp:2380
static const Register ZMM20()
Factory method for a register.
Definition: fcml_common.hpp:3170
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
static const Register YMM23()
Factory method for a register.
Definition: fcml_common.hpp:3250
bool isNearPointer() const
Returns true if near pointer hint is set.
Definition: fcml_common.hpp:7532
fcml_hints hints
Holds instruction level hints.
Definition: fcml_common.h:784
@ REG_DR
Debug register.
Definition: fcml_common.hpp:1622
SegmentSelector & getSegmentSelector()
Gets the segment selector associated with the address.
Definition: fcml_common.hpp:4946
Integer & operator-=(const Integer &arg)
Subtraction assignment.
Definition: fcml_common.hpp:1256
static const InstructionPrefix XRELEASE()
Creates instruction prefix: XRELEASE.
Definition: fcml_common.hpp:378
static const Register XMM13()
Factory method for a register.
Definition: fcml_common.hpp:2860
static Operand reg(const Register ®)
Factory method which creates an register based operator for given register.
Definition: fcml_common.hpp:6043
static const Register CR2()
Factory method for a register.
Definition: fcml_common.hpp:3660
Decorators & setBcast(const Nullable< fcml_uint8_t > &bcast)
Sets a new AVX-512 {bcast} decorator.
Definition: fcml_common.hpp:5041
IB & operandSIBEncodingHint()
Sets preferred encoding to SIB for the lastly added ModR/M operand.
Definition: fcml_common.hpp:8094
static const Register YMM25()
Factory method for a register.
Definition: fcml_common.hpp:3310
static const Condition G()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:7084
Absolute offset.
Definition: fcml_common.h:585
static const Register K6()
Factory method for a register.
Definition: fcml_common.hpp:3870
IB & offd(const Integer &offset)
Adds an offset based address operand with double word size operator.
Definition: fcml_common.hpp:8205
static const Register YMM17()
Factory method for a register.
Definition: fcml_common.hpp:3070
fcml_prefixes prefixes
Describes explicit instruction prefixes.
Definition: fcml_common.h:782
static const Register YMM16()
Factory method for a register.
Definition: fcml_common.hpp:3040
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
EffectiveAddress & getEffectiveAddress()
Gets reference to the effective address associated with the address.
Definition: fcml_common.hpp:4882
fcml_hints getHints() const
Gets hits associated with the operand.
Definition: fcml_common.hpp:5641
@ FCML_CONDITION_LE
7 Less than or equal to
Definition: fcml_common.h:489
fcml_int operands_count
Number of operands defined for instruction.
Definition: fcml_common.h:796
static const Register UNDEF()
Factory method for an undefined register.
Definition: fcml_common.hpp:1778
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 const Register XMM22()
Factory method for a register.
Definition: fcml_common.hpp:3210
static const Register XMM19()
Factory method for a register.
Definition: fcml_common.hpp:3120
fcml_bool is_default_reg
Set to true if given segment register is a default one in given context.
Definition: fcml_common.h:621
static const Register CS()
Factory method for a register.
Definition: fcml_common.hpp:3520
FarPointer & getFarPointer()
Gets a reference to the far pointer instance associated with the address.
Definition: fcml_common.hpp:5533
Integer & getImmediate()
Gets a reference to the immediate value associated with the operand.
Definition: fcml_common.hpp:5565
fcml_uint16_t fcml_prefixes
Type for explicit instruction prefixes bit mask.
Definition: fcml_common.h:91
Address & setSegmentSelector(const SegmentSelector &segmentSelector)
Sets a new segment selector for the address.
Definition: fcml_common.hpp:4957
fcml_int16_t getInt16() const
Definition: fcml_common.hpp:755
static const Register YMM28()
Factory method for a register.
Definition: fcml_common.hpp:3400
static const Register ZMM4()
Factory method for a register.
Definition: fcml_common.hpp:2188
bool isGE() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6999
@ FCML_OT_VIRTUAL
Not an operand in a strict sense, only a container for attributes.
Definition: fcml_common.h:684
static const Register R10L()
Factory method for a register.
Definition: fcml_common.hpp:2610
const Register & getSegmentSelector() const
Gets constant segment register associated with the selector.
Definition: fcml_common.hpp:4224
fcml_int16_t getOffset16() const
Gets the 16-bit offset.
Definition: fcml_common.hpp:4038
Operand(const Integer &imm, fcml_hints hints=FCML_OP_HINT_UNDEFIEND)
Creates an immediate value operand for given integer.
Definition: fcml_common.hpp:5221
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
bool isE() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6676
static const InstructionHint DIRECT_PTR()
Creates a hint instance described by the name of the method.
Definition: fcml_common.hpp:7805
SegmentSelector & operator=(const SegmentSelector ®)
Copies one segment selector to another.
Definition: fcml_common.hpp:4173
static const Register BPL()
Factory method for a register.
Definition: fcml_common.hpp:2209
static const Register ZMM1()
Factory method for a register.
Definition: fcml_common.hpp:1938
static const Register SPL()
Factory method for a register.
Definition: fcml_common.hpp:2118
Integer & setSize(fcml_usize size)
Definition: fcml_common.hpp:815
bool operator==(const Integer &value) const
Checks if the integer is equal to the passed value.
Definition: fcml_common.hpp:915
fcml_usize getSizeOperator() const
Gets the size operator associated with the address.
Definition: fcml_common.hpp:4968
Register(const fcml_st_register ®)
Creates a register instance for given register structure.
Definition: fcml_common.hpp:1647
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 &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 & far_ptr(const FarPointer &pointer)
Adds a far pointer operand.
Definition: fcml_common.hpp:8144
static const Register R13()
Factory method for a register.
Definition: fcml_common.hpp:2850
IB(const fcml_cstring &mnemonic)
Creates builder for the given mnemonic.
Definition: fcml_common.hpp:7611
const FarPointer & getFarPointer() const
Gets a reference to the constant far pointer instance associated with the address.
Definition: fcml_common.hpp:5523
Instruction & setPrefixes(fcml_prefixes prefixes)
Sets a new set of prefixes for the instruction.
Definition: fcml_common.hpp:7419
IB & repne()
Sets a prefix described by the name of the method for the instruction being built.
Definition: fcml_common.hpp:7858
static const Register K0()
Factory method for a register.
Definition: fcml_common.hpp:3810
@ FCML_OP_HINT_ABSOLUTE_ADDRESSING
Offset should be encoded as absolute address.
Definition: fcml_common.h:717
static const InstructionPrefix BRANCH_HINT()
Creates instruction prefix: BRANCH_HINT.
Definition: fcml_common.hpp:385
fcml_st_condition condition
Describes condition used by assembled/disassembled conditional instruction.
Definition: fcml_common.h:792
Wraps instruction prefix and prepares factory methods for the hints.
Definition: fcml_common.hpp:312
const SegmentSelector & getSegmentSelector() const
Gets the constant segment selector associated with the address.
Definition: fcml_common.hpp:4936
IB & repz()
Sets a prefix described by the name of the method for the instruction being built.
Definition: fcml_common.hpp:7942
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
Two way conversion for common types.
Definition: fcml_common.hpp:8933
static const Register R13W()
Factory method for a register.
Definition: fcml_common.hpp:2830
bool operator!=(const fcml_uint8_t value) const
Checks if the integer is not equal to the passed value.
Definition: fcml_common.hpp:926
fcml_char * mnemonic
Dialect-dependent instruction mnemonic.
Definition: fcml_common.h:787
bool isRep() const
Returns true if rep prefix is set.
Definition: fcml_common.hpp:7460
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 Register RAX()
Factory method for a register.
Definition: fcml_common.hpp:1818
@ OT_REGISTER
Processor register.
Definition: fcml_common.hpp:5200
static const OperandHint OP_SIB_ENCODING()
Gets SIB encoding hint for the operand.
Definition: fcml_common.hpp:8059
void addr(const Address &address)
Prepares address operand for given address.
Definition: fcml_common.hpp:5376
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
bool isNegation() const
Returns true if condition is negated.
Definition: fcml_common.hpp:7142
static const Register R12D()
Factory method for a register.
Definition: fcml_common.hpp:2770
@ FCML_CONDITION_P
5 Parity
Definition: fcml_common.h:485
Instruction & setHints(fcml_hints hints)
Sets new instruction hints.
Definition: fcml_common.hpp:7331
bool isNLE() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:7056
OperandType
See fcml_en_operand_type structure for more details.
Definition: fcml_common.hpp:5190
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
static const OperandHint OP_RELATIVE_ADDRESSING()
Gets relative address hint for the operand.
Definition: fcml_common.hpp:8043
bool operator==(const fcml_int16_t value) const
Checks if the integer is equal to the passed value.
Definition: fcml_common.hpp:860
static const Register ZMM21()
Factory method for a register.
Definition: fcml_common.hpp:3200
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
bool isNA() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6771
IB & far_ptr(fcml_uint16_t seg, fcml_int16_t addr)
Adds a far pointer operand.
Definition: fcml_common.hpp:8119
static const Register CL()
Factory method for a register.
Definition: fcml_common.hpp:1868
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
Describes far pointer.
Definition: fcml_common.hpp:3902
fcml_uint16_t fcml_ceh_error
All error codes should be held in variables of this type.
Definition: fcml_errors.h:156
bool operator!=(const fcml_uint16_t value) const
Checks if the integer is not equal to the passed value.
Definition: fcml_common.hpp:948
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
bool operator!=(const Operand &op) const
Checks if two operands are equal or not.
Definition: fcml_common.hpp:5310
Structure describes x86_64 register.
Definition: fcml_common.h:450
bool isNG() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:7037
Describes segment register.
Definition: fcml_common.hpp:4109
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
Integer(fcml_int64_t value)
Definition: fcml_common.hpp:724
@ CONDITION_E
2 Equal
Definition: fcml_common.hpp:6483
const Operand & operator[](fcml_int index) const
Gets reference to the constant operand at given index.
Definition: fcml_common.hpp:7251
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
@ FCML_OP_HINT_RELATIVE_ADDRESSING
Offset should be encoded as relative address.
Definition: fcml_common.h:721
fcml_usize size_operator
Size of data accessed in memory.
Definition: fcml_common.h:629
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
#define FCML_PREFIX_NOBRANCH_HINT
nobranch hint (0x3E) (SSE2 extension)
Definition: fcml_common.h:66
bool isLE() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:7018
Integer & operator+=(const Integer &arg)
Addition assignment.
Definition: fcml_common.hpp:1229
fcml_st_operand_decorators decorators
Operand decorators.
Definition: fcml_common.h:745
static const Register RSP()
Factory method for a register.
Definition: fcml_common.hpp:2148
static const Register R11W()
Factory method for a register.
Definition: fcml_common.hpp:2690
@ REG_CR
Control register.
Definition: fcml_common.hpp:1620
static const Register EAX()
Factory method for a register.
Definition: fcml_common.hpp:1808
bool operator==(const Nullable &nullable) const
Checks if two nullable values are equal.
Definition: fcml_common.hpp:160
@ FCML_CONDITION_O
0 Overflow
Definition: fcml_common.h:475
IB & offq(const Integer &offset)
Adds an offset based address operand with quadro word size operator.
Definition: fcml_common.hpp:8217
Operand()
Creates an undefined operand.
Definition: fcml_common.hpp:5209
void undef()
Converts operand to the undefined one.
Definition: fcml_common.hpp:5320
EmbeededRoundingControl
Rounding mode.
Definition: fcml_common.hpp:5007
bool isS() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6828
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
bool operator!=(const SegmentSelector &segmentSelector) const
Checks if two segment selector are not equal.
Definition: fcml_common.hpp:4154
static const Register MM3()
Factory method for a register.
Definition: fcml_common.hpp:2068
static const Register SP()
Factory method for a register.
Definition: fcml_common.hpp:2128
static const Register ZMM0()
Factory method for a register.
Definition: fcml_common.hpp:1858
IB(fcml_prefixes prefixes, const fcml_cstring &mnemonic)
Creates builder for the given mnemonic and prefixes.
Definition: fcml_common.hpp:7625
Operand & setDecorators(const Decorators &decorators)
Sets new operand decorators for the operand.
Definition: fcml_common.hpp:5684
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
bool operator!=(const FarPointer &fp) const
Compares two far pointers.
Definition: fcml_common.hpp:3981
static const InstructionPrefix NOBRANCH_HINT()
Creates instruction prefix: NOBRANCH_HINT.
Definition: fcml_common.hpp:392
static const Register RIP()
Factory method for a register.
Definition: fcml_common.hpp:3800
bool operator==(const Condition &cond) const
Checks if two condition are equal.
Definition: fcml_common.hpp:7098
bool isNAE() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6600
static const Register ST1()
Factory method for a register.
Definition: fcml_common.hpp:3580
static const Register XMM14()
Factory method for a register.
Definition: fcml_common.hpp:2930
@ FCML_AF_COMBINED
Effective address combined from address components like base register, index registers,...
Definition: fcml_common.h:579
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
@ FCML_HINT_INDIRECT_POINTER
Hints instruction to use INDIRECT pointer to address the memory.
Definition: fcml_common.h:771
bool operator==(const fcml_int32_t value) const
Checks if the integer is equal to the passed value.
Definition: fcml_common.hpp:882
Component can not be initialized correctly.
Definition: fcml_common.hpp:231
static const Register R15L()
Factory method for a register.
Definition: fcml_common.hpp:2960
static const Register YMM14()
Factory method for a register.
Definition: fcml_common.hpp:2940
static const Register R8D()
Factory method for a register.
Definition: fcml_common.hpp:2490
OperatingMode getOpMode() const
Gets processor operating mode.
Definition: fcml_common.hpp:661
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
fcml_usize getSize() const
Definition: fcml_common.hpp:810
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
static const Register XMM20()
Factory method for a register.
Definition: fcml_common.hpp:3150
const Register & getRegister() const
Returns a reference to the constant register associated with the operand.
Definition: fcml_common.hpp:5609
static const Register K7()
Factory method for a register.
Definition: fcml_common.hpp:3880
bool operator!=(const fcml_uint32_t value) const
Checks if the integer is not equal to the passed value.
Definition: fcml_common.hpp:970
Register & getBase()
Gets the base register associated with the effective address.
Definition: fcml_common.hpp:4483
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
static const Register ZMM31()
Factory method for a register.
Definition: fcml_common.hpp:3500
Integer & setSigned(fcml_bool isSigned)
Definition: fcml_common.hpp:804
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
fcml_bool isSigned() const
Definition: fcml_common.hpp:799
static const Register DX()
Factory method for a register.
Definition: fcml_common.hpp:1958
static const Register R9()
Factory method for a register.
Definition: fcml_common.hpp:2570
static const Condition NG()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:7046
IB & addrd(const EffectiveAddress &effectiveAddress)
Adds an address type operand for given effective address and double word size operator.
Definition: fcml_common.hpp:8266
static const InstructionPrefix REPZ()
Creates instruction prefix: REPZ.
Definition: fcml_common.hpp:364
IB & reg(const Register ®)
Adds an an register based operator for given register.
Definition: fcml_common.hpp:8356
static const Register ZMM13()
Factory method for a register.
Definition: fcml_common.hpp:2880
static const Register ZMM30()
Factory method for a register.
Definition: fcml_common.hpp:3470
static const Register XMM11()
Factory method for a register.
Definition: fcml_common.hpp:2720
fcml_usize size
Offset size 16,32 or 64 bits.
Definition: fcml_common.h:587
RegisterType
Register types.
Definition: fcml_common.hpp:1608
static const Register XMM21()
Factory method for a register.
Definition: fcml_common.hpp:3180
static const InstructionPrefix NO_BRANCH()
Creates a prefix instance described by the name of the method.
Definition: fcml_common.hpp:8017
static Integer uint64(fcml_uint64_t value)
Factory method which creates an insatnce fo the Integer for given parameter.
Definition: fcml_common.hpp:1383
static const Register RCX()
Factory method for a register.
Definition: fcml_common.hpp:1898
Exposes API responsible for environment specific operations, even if standard CPP library is used to ...
Definition: fcml_common.hpp:68
fcml_int32_t offset32
32-bit offset.
Definition: fcml_common.h:560
bool operator!=(const EffectiveAddress &address) const
Checks whether two effective addresses are equal or not.
Definition: fcml_common.hpp:4387
@ FCML_OT_ADDRESS
Memory address.
Definition: fcml_common.h:677
IB & nobranchHint()
Sets a prefix described by the name of the method for the instruction being built.
Definition: fcml_common.hpp:8026
static const Register R10D()
Factory method for a register.
Definition: fcml_common.hpp:2630
fcml_int32_t getOffset32() const
Gets 32-bit offset.
Definition: fcml_common.hpp:4058
static const Register EDX()
Factory method for a register.
Definition: fcml_common.hpp:1968
Integer(fcml_uint64_t value)
Definition: fcml_common.hpp:744
static const Register CR8()
Factory method for a register.
Definition: fcml_common.hpp:3690
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 const Register R12L()
Factory method for a register.
Definition: fcml_common.hpp:2750
static const Condition B()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6571
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 const Register R9L()
Factory method for a register.
Definition: fcml_common.hpp:2540
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
@ FCML_REG_SEG
Segment register.
Definition: fcml_common.h:436
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 Register ®) const
Compares registers.
Definition: fcml_common.hpp:1757
fcml_en_register type
Register type.
Definition: fcml_common.h:452
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
EffectiveAddress & setIndex(const Register &index)
Sets a new index register for the effective address.
Definition: fcml_common.hpp:4558
bool isNoBranchHint() const
Returns true if no_branch_hint prefix is set.
Definition: fcml_common.hpp:7514
fcml_st_integer displacement
Displacement value.
Definition: fcml_common.h:609
static const Register ESI()
Factory method for a register.
Definition: fcml_common.hpp:2319
static const Condition A()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6818
Register & getIndex()
Gets the index register associated with the effective address.
Definition: fcml_common.hpp:4547
fcml_st_register operand_mask_reg
The 64-bit k registers are: k0 through k7.
Definition: fcml_common.h:659
Generic memory addressing operator.
Definition: fcml_common.h:627
Operation is not supported.
Definition: fcml_common.hpp:275
static Operand undef()
Factory method which builds an empty operand.
Definition: fcml_common.hpp:5824
IB & operator<<(const Operand &operand)
Adds an operand to the instruction being built.
Definition: fcml_common.hpp:8820
Operand & setOperandType(OperandType operandType)
Sets a new operand type.
Definition: fcml_common.hpp:5598
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 const Register R15W()
Factory method for a register.
Definition: fcml_common.hpp:2970
IB(const fcml_cstring &mnemonic, fcml_hints hints)
Creates an instruction builder for given mnemonic and hints.
Definition: fcml_common.hpp:7639
Condition & setNegation(bool isNegation)
Sets negation flag for the condition.
Definition: fcml_common.hpp:7152
static const Register EBX()
Factory method for a register.
Definition: fcml_common.hpp:2048
Integer(fcml_int8_t value)
Definition: fcml_common.hpp:709
static const InstructionPrefix XACQUIRE()
Creates instruction prefix: XACQUIRE.
Definition: fcml_common.hpp:371
static Integer int32(fcml_int32_t value)
Factory method which creates an insatnce fo the Integer for given parameter.
Definition: fcml_common.hpp:1353
static const OperandHint DISPLACEMENT_RELATIVE_ADDRESS()
Creates operand level hint: DISPLACEMENT_RELATIVE_ADDRESS.
Definition: fcml_common.hpp:485
static const Register R8W()
Factory method for a register.
Definition: fcml_common.hpp:2480
static const Register ZMM10()
Factory method for a register.
Definition: fcml_common.hpp:2670
Illegal state exception.
Definition: fcml_common.hpp:253
bool isA() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6809
IB & operandMultimediaHint()
Marks the lastly added operand as a multimedia one.
Definition: fcml_common.hpp:8067
void far_ptr(const FarPointer &pointer)
Prepares far pointer operand for given far pointer.
Definition: fcml_common.hpp:5365
static const Register YMM12()
Factory method for a register.
Definition: fcml_common.hpp:2800
@ REG_SEG
Segment register.
Definition: fcml_common.hpp:1618
@ REG_FPU
FPU register.
Definition: fcml_common.hpp:1616
fcml_uint8_t getReg() const
Gets the register number.
Definition: fcml_common.hpp:1682
Integer(fcml_uint16_t value)
Definition: fcml_common.hpp:734
Defines instruction's condition.
Definition: fcml_common.h:495
bool isZ() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6695
static const Register CR3()
Factory method for a register.
Definition: fcml_common.hpp:3670
IB & addrb(const EffectiveAddress &effectiveAddress)
Adds an address type operand for given effective address and byte size operator.
Definition: fcml_common.hpp:8242
bool operator==(const Decorators &decorators) const
Checks if two decorators containers are equal or not.
Definition: fcml_common.hpp:5147
IB & set(const InstructionHint &hint)
Adds an instruction level hint to the instruction being built.
Definition: fcml_common.hpp:8872
static const Register YMM7()
Factory method for a register.
Definition: fcml_common.hpp:2450
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
Register & getSegmentSelector()
Gets segment register associated with the selector.
Definition: fcml_common.hpp:4234
Operand & setImmediate(const Integer &immediate)
Sets a new immediate value for the address.
Definition: fcml_common.hpp:5576
ConditionType getConditionType() const
Gets a type of the condition.
Definition: fcml_common.hpp:7121
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
void setOperand(const Operand &operand, fcml_int index)
Sets a new oeprand for the instruction at given index.
Definition: fcml_common.hpp:7237
bool operator!=(const Address &address) const
Checks if two addresses are equal or not.
Definition: fcml_common.hpp:4778
static const Register ZMM2()
Factory method for a register.
Definition: fcml_common.hpp:2018
bool operator==(const EffectiveAddress &address) const
Checks whether two effective addresses are equal or not.
Definition: fcml_common.hpp:4371
Wraps instruction hint and exposes factory methods for instruction hints.
Definition: fcml_common.hpp:402
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 const Register YMM22()
Factory method for a register.
Definition: fcml_common.hpp:3220
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
static const Register ZMM8()
Factory method for a register.
Definition: fcml_common.hpp:2530
static const Register ZMM15()
Factory method for a register.
Definition: fcml_common.hpp:3020
static const Register ZMM27()
Factory method for a register.
Definition: fcml_common.hpp:3380
IB & set(const OperandHint &hint)
Adds an operand level hint to the instruction being built.
Definition: fcml_common.hpp:8883
fcml_en_operating_mode
Supported processor operating modes.
Definition: fcml_common.h:73
static const Register R14()
Factory method for a register.
Definition: fcml_common.hpp:2920
static const Register DL()
Factory method for a register.
Definition: fcml_common.hpp:1948
static const Register RBP()
Factory method for a register.
Definition: fcml_common.hpp:2239
static const Register YMM3()
Factory method for a register.
Definition: fcml_common.hpp:2088
fcml_nuint8_t er
Embedded rounding control.
Definition: fcml_common.h:661
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
@ FCML_OM_16_BIT
Real-addressing mode, virtual 8086 mode.
Definition: fcml_common.h:75
static const InstructionHint LONG_FORM_PTR()
Creates a hint instance described by the name of the method.
Definition: fcml_common.hpp:7763
Integer(fcml_int32_t value)
Definition: fcml_common.hpp:719
fcml_uint16_t getSegment() const
Gets segment selector.
Definition: fcml_common.hpp:4078
@ FCML_CONDITION_L
6 Less than
Definition: fcml_common.h:487
bool isPE() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6885
static const Register R9W()
Factory method for a register.
Definition: fcml_common.hpp:2550
const Register & getIndex() const
Gets the constant index register associated with the effective address.
Definition: fcml_common.hpp:4537
const Integer & getOffset() const
Gets the constant offset associated with the address.
Definition: fcml_common.hpp:4904
Operand(const Address &address, fcml_hints hints=FCML_OP_HINT_UNDEFIEND)
Creates an address operand for given address.
Definition: fcml_common.hpp:5247
Decorators & setSae(const fcml_bool sae)
Sets AVX-512 {sae} decorator.
Definition: fcml_common.hpp:5074
static const Register MM5()
Factory method for a register.
Definition: fcml_common.hpp:2249
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
Instruction build() const
Builds an instruction instance for the current state of the builder.
Definition: fcml_common.hpp:7676
virtual ~EffectiveAddress()
Definition: fcml_common.hpp:4360
static const Register RSI()
Factory method for a register.
Definition: fcml_common.hpp:2329
static const Condition NB()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6590
Integer & operator*=(const Integer &arg)
Multiplication assignment.
Definition: fcml_common.hpp:1238
static const Register ZMM16()
Factory method for a register.
Definition: fcml_common.hpp:3050
@ FCML_OP_HINT_MULTIMEDIA_INSTRUCTION
SIMD operand.
Definition: fcml_common.h:701
IB & set(const InstructionPrefix &prefix)
Adds a prefix to the instruction being built.
Definition: fcml_common.hpp:8861
An instruction builder.
Definition: fcml_common.hpp:7602
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
@ FCML_CONDITION_S
4 Sign
Definition: fcml_common.h:483
Wrapper for nullable value types.
Definition: fcml_common.hpp:120
static const Register R14L()
Factory method for a register.
Definition: fcml_common.hpp:2890
bool isNS() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6847
static const Register YMM30()
Factory method for a register.
Definition: fcml_common.hpp:3460
static const Register ZMM12()
Factory method for a register.
Definition: fcml_common.hpp:2810
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
bool isNL() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6980
static const Register XMM12()
Factory method for a register.
Definition: fcml_common.hpp:2790
static const Register ST2()
Factory method for a register.
Definition: fcml_common.hpp:3590
fcml_int16_t off16
Place for 16-bit absolute offset.
Definition: fcml_common.h:591
FarPointer(fcml_uint16_t segment, fcml_int32_t offset32)
Creates an far pointer instance.
Definition: fcml_common.hpp:3935
fcml_st_address address
Effective address or absolute offset.
Definition: fcml_common.h:741
static const Register XMM30()
Factory method for a register.
Definition: fcml_common.hpp:3450
bool isFarPointer() const
Returns true if far pointer hint is set.
Definition: fcml_common.hpp:7523
fcml_prefixes getPrefixes() const
Gets prefixes associated with the instruction.
Definition: fcml_common.hpp:7408
bool operator!=(const Decorators &decorators) const
Checks if two decorators are equal or not.
Definition: fcml_common.hpp:5164
static const Register XMM18()
Factory method for a register.
Definition: fcml_common.hpp:3090
bool isAE() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6619
fcml_st_register base
GPR base register.
Definition: fcml_common.h:603
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
Integer & operator/=(const Integer &arg)
Division assignment.
Definition: fcml_common.hpp:1247
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(fcml_int16_t value)
Definition: fcml_common.hpp:714
static const InstructionPrefix REP()
Creates a prefix instance described by the name of the method.
Definition: fcml_common.hpp:7891
bool isNB() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6581
OperandType getOperandType() const
Gets operand type.
Definition: fcml_common.hpp:5587
static Operand addr(const Address &address)
Factory method which builds an address operand.
Definition: fcml_common.hpp:5875
fcml_uint8_t getScaleFactor() const
Gets a scale factor value associated with the effective address.
Definition: fcml_common.hpp:4569
static const Register XMM29()
Factory method for a register.
Definition: fcml_common.hpp:3420
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
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
bool isSIBEncoding() const
Returns true if the SIB byte is used.
Definition: fcml_common.hpp:5749
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
fcml_int32_t getInt32() const
Definition: fcml_common.hpp:766
@ REG_GPR
General purpose register.
Definition: fcml_common.hpp:1612
static const Register DR3()
Factory method for a register.
Definition: fcml_common.hpp:3730
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 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_bool is_conditional
True for conditional instructions.
Definition: fcml_common.h:789
Instruction condition.
Definition: fcml_common.hpp:6470
bool operator!=(const Register ®) const
Compares registers.
Definition: fcml_common.hpp:1767
void setOffsetSize(fcml_usize offsetSize)
Sets offset size.
Definition: fcml_common.hpp:4028
fcml_usize address_size_attribute
Default address size attribute (See 'D' flag of segment descriptor.)
Definition: fcml_common.h:826
static const InstructionPrefix LOCK()
Creates a prefix instance described by the name of the method.
Definition: fcml_common.hpp:7828
static const Register DR4()
Factory method for a register.
Definition: fcml_common.hpp:3740
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 & 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
static const Register R10()
Factory method for a register.
Definition: fcml_common.hpp:2640
fcml_uint16_t fcml_hints
Type used for storing instruction and operand hint masks.
Definition: fcml_common.h:86
static const Register K4()
Factory method for a register.
Definition: fcml_common.hpp:3850
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
#define FCML_PREFIX_REPE
REPE prefix (0xF3)
Definition: fcml_common.h:56
OperatingMode
Supported operating modes.
Definition: fcml_common.hpp:531
RegisterType getType() const
Gets the register type.
Definition: fcml_common.hpp:1718
static const Register XMM8()
Factory method for a register.
Definition: fcml_common.hpp:2510
@ AF_UNDEFINED
Default value set if memory addressing hasn't been configured.
Definition: fcml_common.hpp:4610
static const Register YMM5()
Factory method for a register.
Definition: fcml_common.hpp:2269
Bad arguments.
Definition: fcml_common.hpp:242
bool isNBE() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6790
static const Condition E()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6685
static const Register DR1()
Factory method for a register.
Definition: fcml_common.hpp:3710
void setDefaultReg(bool isDefaultReg)
Sets "default" flag for the segment selector.
Definition: fcml_common.hpp:4214
static const Register YMM19()
Factory method for a register.
Definition: fcml_common.hpp:3130
bool isO() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6524
Condition(ConditionType type, bool negation=false)
Creates a condition for given parameters.
Definition: fcml_common.hpp:6512
static const Register ESP()
Factory method for a register.
Definition: fcml_common.hpp:2138
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
std::basic_ostringstream< fcml_char > fcml_costream
String output stream.
Definition: fcml_common.hpp:59
static const Register ZMM9()
Factory method for a register.
Definition: fcml_common.hpp:2600
static const Register YMM1()
Factory method for a register.
Definition: fcml_common.hpp:1928
static const Condition NC()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6666
static const Register R12()
Factory method for a register.
Definition: fcml_common.hpp:2780
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
bool operator==(const SegmentSelector &segmentSelector) const
Checks if two segment selector are equal.
Definition: fcml_common.hpp:4143
static const Register XMM26()
Factory method for a register.
Definition: fcml_common.hpp:3330
EffectiveAddress(const Register &base, const Register &index)
Creates an effective address instance with the base register and index register.
Definition: fcml_common.hpp:4323
Instruction & setCondition(const Condition &condition)
Sets a new condition for the instruction.
Definition: fcml_common.hpp:7309
void setX64Exp(bool x64Exp)
Sets x64exp flag, see manual.
Definition: fcml_common.hpp:1745
static const Register YMM6()
Factory method for a register.
Definition: fcml_common.hpp:2359
Register()
Creates an empty register instance.
Definition: fcml_common.hpp:1635
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
bool isG() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:7075
EffectiveAddress(const Register &base, const Integer &displacement)
Creates an effective address instance with the base register and displacement only.
Definition: fcml_common.hpp:4298
Operand & setAddress(const Address &address)
Sets a new address for the operand.
Definition: fcml_common.hpp:5512
fcml_en_operand_hints
Operand hints.
Definition: fcml_common.h:691
Representation of far pointer operand.
Definition: fcml_common.h:552
const Condition & getCondition() const
Gets a pointer to the constant condition associated with the instruction.
Definition: fcml_common.hpp:7288
fcml_en_operating_mode op_mode
Processor operating mode 16/32/64-bit.
Definition: fcml_common.h:824
bool isImm() const
Returns true if operand is an immediate value operand.
Definition: fcml_common.hpp:5451
fcml_int getOperandsCount() const
Gets number of operands associated with the instruction.
Definition: fcml_common.hpp:7386
static EffectiveAddress addr(const Register &base)
Factory method which creates an effective address instance with the base register only.
Definition: fcml_common.hpp:4407
static const Register ZMM24()
Factory method for a register.
Definition: fcml_common.hpp:3290
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
static const Register YMM11()
Factory method for a register.
Definition: fcml_common.hpp:2730
IB & addrq(const EffectiveAddress &effectiveAddress)
Adds an address type operand for given effective address and quadro word size operator.
Definition: fcml_common.hpp:8278
#define FCML_PREFIX_REP
REP prefix (0xF3)
Definition: fcml_common.h:54
static const Register SS()
Factory method for a register.
Definition: fcml_common.hpp:3530
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 offw(const Integer &offset)
Factory method which builds an offset based address operand with word size operator.
Definition: fcml_common.hpp:5906
static const Register YMM13()
Factory method for a register.
Definition: fcml_common.hpp:2870
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
const Integer & getDisplacement() const
Gets the constant displacement associated with the effective address.
Definition: fcml_common.hpp:4505
static const InstructionPrefix REPE()
Creates a prefix instance described by the name of the method.
Definition: fcml_common.hpp:7912
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 const Register XMM2()
Factory method for a register.
Definition: fcml_common.hpp:1998
const Integer & getImmediate() const
Gets a reference to the constant immediate value associated with the operand.
Definition: fcml_common.hpp:5555
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 Register MM6()
Factory method for a register.
Definition: fcml_common.hpp:2339
bool operator==(const fcml_int64_t value) const
Checks if the integer is equal to the passed value.
Definition: fcml_common.hpp:904
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
static const Register EDI()
Factory method for a register.
Definition: fcml_common.hpp:2410
static const InstructionHint FAR_POINTER()
Creates instruction hint: FAR_POINTER.
Definition: fcml_common.hpp:430
static const Condition NA()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6780
@ CONDITION_P
5 Parity
Definition: fcml_common.hpp:6489
Address & setAddressForm(AddressForm addressForm)
Sets a new address form for the effective address.
Definition: fcml_common.hpp:4861
static const Register ZMM19()
Factory method for a register.
Definition: fcml_common.hpp:3140
void setSegmentSelector(const Register &segmentSelector)
Sets segment register for the selector.
Definition: fcml_common.hpp:4244
bool operator==(const fcml_uint8_t value) const
Checks if the integer is equal to the passed value.
Definition: fcml_common.hpp:827
Decorators & setEr(const Nullable< EmbeededRoundingControl > &er)
Sets AVX-512 {er} decorator.
Definition: fcml_common.hpp:5063
SegmentSelector(const Register &segmentSelector, bool isDefaultReg=FCML_TRUE)
Creates a segment selector instance for given parameters.
Definition: fcml_common.hpp:4127
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
Object which shouldn't be copied can inherit from this class.
Definition: fcml_common.hpp:288
@ FCML_REG_UNDEFINED
Undefined register type.
Definition: fcml_common.h:428
bool isNZ() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6733
static const Register XMM23()
Factory method for a register.
Definition: fcml_common.hpp:3240
static const Register DIL()
Factory method for a register.
Definition: fcml_common.hpp:2390
IB & lock()
Sets a prefix described by the name of the method for the instruction being built.
Definition: fcml_common.hpp:7837
SegmentSelector()
Creates an empty segment selector instance.
Definition: fcml_common.hpp:4116
static const Register SI()
Factory method for a register.
Definition: fcml_common.hpp:2309
static const Register YMM8()
Factory method for a register.
Definition: fcml_common.hpp:2520
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
static const Register YMM27()
Factory method for a register.
Definition: fcml_common.hpp:3370
fcml_uint8_t scale_factor
Scale factor 1,2,4 or 8.
Definition: fcml_common.h:607
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 & 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
static const Register ZMM17()
Factory method for a register.
Definition: fcml_common.hpp:3080
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
Integer & setInt16(fcml_int16_t int16)
Definition: fcml_common.hpp:760
bool isBE() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6752
Base exception for all exceptions exposed by FCML library.
Definition: fcml_common.hpp:187
static const Register AH()
Factory method for a register.
Definition: fcml_common.hpp:2108
@ FCML_OM_32_BIT
Protected/Compatibility mode when 'D' segment descriptor flag is set to 1.
Definition: fcml_common.h:78
bool isPseudoOpcode() const
Returns true if it's pseudo opcode operand.
Definition: fcml_common.hpp:5719
Operand(const Register ®, fcml_hints hints=FCML_OP_HINT_UNDEFIEND)
Creates a new register operand for given register.
Definition: fcml_common.hpp:5260
static const InstructionPrefix XRELEASE()
Creates a prefix instance described by the name of the method.
Definition: fcml_common.hpp:7975
static const Register CH()
Factory method for a register.
Definition: fcml_common.hpp:2199
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 Register DH()
Factory method for a register.
Definition: fcml_common.hpp:2289
Integer & getDisplacement()
Gets the displacement associated with the effective address.
Definition: fcml_common.hpp:4515
bool operator==(const fcml_uint32_t value) const
Checks if the integer is equal to the passed value.
Definition: fcml_common.hpp:871
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
A base iterator interface.
Definition: fcml_common.hpp:98
IB & effw(const Integer &displacement)
Adds an an effective address based operator for a displacement and word size operator.
Definition: fcml_common.hpp:8406
IB & indirectPtr()
Sets a hint described by the name of the method for the instruction being built.
Definition: fcml_common.hpp:7793
@ FCML_AF_OFFSET
Absolute offset (address).
Definition: fcml_common.h:576
static const Register XMM10()
Factory method for a register.
Definition: fcml_common.hpp:2650
static const Condition BE()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6761
bool operator!=(const Condition &cond) const
Checks if two condition are equal.
Definition: fcml_common.hpp:7109
fcml_bool isZ() const
Gets AVX-512 {z} operator.
Definition: fcml_common.hpp:5085
const EffectiveAddress & getEffectiveAddress() const
Gets reference to the constant effective address associated with the address.
Definition: fcml_common.hpp:4872
IB & xacquire()
Sets a prefix described by the name of the method for the instruction being built.
Definition: fcml_common.hpp:7963
@ FCML_OT_IMMEDIATE
Immediate integer value.
Definition: fcml_common.h:673
static const Condition S()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6837
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
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
Decorators()
Creates an empty operand decorators container.
Definition: fcml_common.hpp:5018
bool isEffectiveAddress() const
Returns true if address holds effective address.
Definition: fcml_common.hpp:4829
void far_ptr(fcml_uint16_t seg, fcml_int32_t addr)
Prepares far pointer operand for given components.
Definition: fcml_common.hpp:5354
static const Register ST6()
Factory method for a register.
Definition: fcml_common.hpp:3630
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 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
EffectiveAddress(const Register &base)
Creates an effective address instance with the base register only.
Definition: fcml_common.hpp:4287
fcml_hints getHints() const
Gets instruction level hits associated with the instruction.
Definition: fcml_common.hpp:7320
bool isXAcquire() const
Returns true if xacquire prefix is set.
Definition: fcml_common.hpp:7487
fcml_st_segment_selector segment_selector
Segment register.
Definition: fcml_common.h:635
static const Register ZMM22()
Factory method for a register.
Definition: fcml_common.hpp:3230
static const Register ST0()
Factory method for a register.
Definition: fcml_common.hpp:3570
IB & farPtr()
Sets a hint described by the name of the method for the instruction being built.
Definition: fcml_common.hpp:7730
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
static const OperandHint RELATIVE_ADDRESSING()
Creates operand level hint: RELATIVE_ADDRESSING.
Definition: fcml_common.hpp:506
static const Register ES()
Factory method for a register.
Definition: fcml_common.hpp:3510
bool isRepne() const
Returns true if repne prefix is set.
Definition: fcml_common.hpp:7442
IB & operandRelativeHint()
Marks the lastly added address operand as a relative one.
Definition: fcml_common.hpp:8076
static const Register XMM28()
Factory method for a register.
Definition: fcml_common.hpp:3390
fcml_int64_t getInt64() const
Definition: fcml_common.hpp:777
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 Register MM1()
Factory method for a register.
Definition: fcml_common.hpp:1908
@ CONDITION_BE
3 Below or equal
Definition: fcml_common.hpp:6485
@ AF_OFFSET
Absolute offset (address).
Definition: fcml_common.hpp:4612
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
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 const InstructionHint NO_HINTS()
Creates instruction hint: NO_HINTS.
Definition: fcml_common.hpp:416
void reg(const Register ®)
Prepares operator for the given register.
Definition: fcml_common.hpp:5424
static const Condition L()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6951
Instruction & setMnemonic(const fcml_cstring &mnemonic)
Sets a new mnemonic for the instruction.
Definition: fcml_common.hpp:7375
#define FCML_OPERANDS_COUNT
Maximal number of the instruction operands.
Definition: fcml_common.h:35
fcml_st_operand operands[FCML_OPERANDS_COUNT]
Fixed size array of instruction operands.
Definition: fcml_common.h:794
bool operator!=(const EntryPoint &ep) const
Checks if two entry points are not equal.
Definition: fcml_common.hpp:589
static const Register ZMM29()
Factory method for a register.
Definition: fcml_common.hpp:3440
@ FCML_OM_64_BIT
64-bit mode.
Definition: fcml_common.h:80
static Operand far_ptr(const FarPointer &pointer)
Factory method which builds a far pointer operand.
Definition: fcml_common.hpp:5865
static const Register DR2()
Factory method for a register.
Definition: fcml_common.hpp:3720
#define FCML_PREFIX_REPNE
REPNE prefix (0xF2)
Definition: fcml_common.h:50
bool isRelativeAddressing() const
Returns true is relative addressing is used.
Definition: fcml_common.hpp:5739
bool isNP() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6904
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
static const Register XMM1()
Factory method for a register.
Definition: fcml_common.hpp:1918
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 const Condition PO()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6932
@ FCML_HINT_NO_HINTS
No hints defined.
Definition: fcml_common.h:762
@ CONDITION_B
1 Below
Definition: fcml_common.hpp:6481
static const Register YMM29()
Factory method for a register.
Definition: fcml_common.hpp:3430
Integer operator*(const Integer &src) const
Multiplication operator.
Definition: fcml_common.hpp:1287
static const Register DR7()
Factory method for a register.
Definition: fcml_common.hpp:3770
fcml_st_offset offset
Memory address for FCML_AF_OFFSET form.
Definition: fcml_common.h:639
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
Operand & setFarPointer(const FarPointer &farPointer)
Sets a new far pointer for the operand.
Definition: fcml_common.hpp:5544
@ FCML_REG_SIMD
SIMD (SSE, MMX) register.
Definition: fcml_common.h:432
IB & operandAbsoluteHint()
Marks the lastly added address operand as a absolute one.
Definition: fcml_common.hpp:8085
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
x86 - 64 register representation.
Definition: fcml_common.hpp:1601
fcml_int8_t getInt8() const
Definition: fcml_common.hpp:788
static const Register DR0()
Factory method for a register.
Definition: fcml_common.hpp:3700
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
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 const Condition P()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6875
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
static const Register RDX()
Factory method for a register.
Definition: fcml_common.hpp:1978
@ FCML_CEH_GEC_NO_ERROR
Operation succeed.
Definition: fcml_errors.h:42
#define FCML_PREFIX_LOCK
LOCK prefix (0xF0)
Definition: fcml_common.h:48
static const Register YMM4()
Factory method for a register.
Definition: fcml_common.hpp:2178
static const InstructionHint LONG_FORM_POINTER()
Creates instruction hint: LONG_FORM_POINTER.
Definition: fcml_common.hpp:437
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 const Register ZMM25()
Factory method for a register.
Definition: fcml_common.hpp:3320
static const Register XMM6()
Factory method for a register.
Definition: fcml_common.hpp:2349
virtual ~Register()
Definition: fcml_common.hpp:1672
fcml_nuint8_t bcast
Broadcasting: 2, 4, 8, 16, 32, 64.
Definition: fcml_common.h:655
IB & far_ptr(fcml_uint16_t seg, fcml_int32_t addr)
Adds a far pointer operand.
Definition: fcml_common.hpp:8132
FarPointer()
Creates an far pointer instance.
Definition: fcml_common.hpp:3910
const fcml_cstring & getMnemonic() const
Gets the mnemonic associated with the instruction.
Definition: fcml_common.hpp:7364
fcml_int32_t off32
Place for 32-bit absolute offset.
Definition: fcml_common.h:593
FarPointer(fcml_uint16_t segment, fcml_int16_t offset16)
Creates an far pointer instance.
Definition: fcml_common.hpp:3923
Effective address.
Definition: fcml_common.h:601
Describes effective address.
Definition: fcml_common.hpp:4261
const Nullable< fcml_uint8_t > & getBcast() const
Gets AVX-512 {bcast} decorator.
Definition: fcml_common.hpp:5095
static const Register CX()
Factory method for a register.
Definition: fcml_common.hpp:1878
Condition()
Creates an empty condition.
Definition: fcml_common.hpp:6500
static const Register YMM21()
Factory method for a register.
Definition: fcml_common.hpp:3190
@ FCML_AF_UNDEFINED
Default value set if memory addressing hasn't been configured.
Definition: fcml_common.h:574
static Operand offb(const Integer &offset)
Factory method which builds an offset based address operand with byte size operator.
Definition: fcml_common.hpp:5896
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
Condition & setConditionType(ConditionType conditionType)
Sets condition type.
Definition: fcml_common.hpp:7131
fcml_en_effective_address_form address_form
Memory addressing format: absolute offset/effective address.
Definition: fcml_common.h:633
bool isAbsoluteAddressing() const
Returns true if it's an absolute offset being set in the operand.
Definition: fcml_common.hpp:5729
fcml_st_register segment_selector
Used segment register.
Definition: fcml_common.h:617
bool isIndirectPointer() const
Returns true if indirect pointer hint is set.
Definition: fcml_common.hpp:7550
bool operator==(const fcml_int8_t value) const
Checks if the integer is equal to the passed value.
Definition: fcml_common.hpp:838
fcml_st_integer immediate
Immediate value operand.
Definition: fcml_common.h:737
fcml_st_effective_address effective_address
Memory address for FCML_AF_COMBINED form.
Definition: fcml_common.h:637
static const InstructionPrefix REPNZ()
Creates instruction prefix: REPNZ.
Definition: fcml_common.hpp:343
static const InstructionPrefix REPNZ()
Creates a prefix instance described by the name of the method.
Definition: fcml_common.hpp:7870
EffectiveAddress()
Creates an empry effective address.
Definition: fcml_common.hpp:4268
static const Register XMM31()
Factory method for a register.
Definition: fcml_common.hpp:3480
static const Register R13D()
Factory method for a register.
Definition: fcml_common.hpp:2840
static const Register ZMM7()
Factory method for a register.
Definition: fcml_common.hpp:2460
@ FCML_OT_REGISTER
Processor register.
Definition: fcml_common.h:679
static const Register DR5()
Factory method for a register.
Definition: fcml_common.hpp:3750
#define FCML_TEXT(x)
Used to code literal strings.
Definition: fcml_types.h:61
@ FCML_CONDITION_E
2 Equal
Definition: fcml_common.h:479
Illegal argument exception.
Definition: fcml_common.hpp:264
static const Condition NZ()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6742
static const Register IP()
Factory method for a register.
Definition: fcml_common.hpp:3780
IB & off(const Integer &offset, fcml_usize sizeOperator=FCML_DS_UNDEF)
Adds an offset operand.
Definition: fcml_common.hpp:8169
static const Register ZMM28()
Factory method for a register.
Definition: fcml_common.hpp:3410
@ OT_FAR_POINTER
Direct far pointer.
Definition: fcml_common.hpp:5196
static const Register AX()
Factory method for a register.
Definition: fcml_common.hpp:1798
Register & getRegister()
Returns a reference to the register associated with the operand.
Definition: fcml_common.hpp:5619
static const Register ST3()
Factory method for a register.
Definition: fcml_common.hpp:3600
static EffectiveAddress addr(const Integer &displacement)
Factory method which creates an effective address instance with the displacement only.
Definition: fcml_common.hpp:4398
Integer operator/(const Integer &src) const
Division operator.
Definition: fcml_common.hpp:1298
static const InstructionHint DIRECT_POINTER()
Creates instruction hint: DIRECT_POINTER.
Definition: fcml_common.hpp:451
static const Register YMM31()
Factory method for a register.
Definition: fcml_common.hpp:3490
const Address & getAddress() const
Gets reference to the constant address associated with the operand.
Definition: fcml_common.hpp:5491
Operand builder.
Definition: fcml_common.hpp:5816
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
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
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
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
@ FCML_REG_OPMASK
Operand mask register.
Definition: fcml_common.h:444
IB & rep()
Sets a prefix described by the name of the method for the instruction being built.
Definition: fcml_common.hpp:7900
fcml_bool sae
Indicates support for SAE (Suppress All Exceptions).
Definition: fcml_common.h:663
Integer & setInt64(fcml_int64_t int64)
Definition: fcml_common.hpp:782
static const Register YMM18()
Factory method for a register.
Definition: fcml_common.hpp:3100
bool isNGE() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6961
bool isConditional() const
Gets true if it's a conditional instruction.
Definition: fcml_common.hpp:7342
static const Register DS()
Factory method for a register.
Definition: fcml_common.hpp:3540
static const InstructionPrefix REPNE()
Creates a prefix instance described by the name of the method.
Definition: fcml_common.hpp:7849
static const Register DI()
Factory method for a register.
Definition: fcml_common.hpp:2400
void setIP(fcml_ip ip)
Sets a new instruction pointer for the entry point.
Definition: fcml_common.hpp:651
static const Register MM4()
Factory method for a register.
Definition: fcml_common.hpp:2158
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 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
@ FCML_REG_DR
Debug register.
Definition: fcml_common.h:440
fcml_en_register
Register type.
Definition: fcml_common.h:426
static const InstructionHint NEAR_POINTER()
Creates instruction hint: NEAR_POINTER.
Definition: fcml_common.hpp:423
static const OperandHint ABSOLUTE_ADDRESSING()
Creates operand level hint: ABSOLUTE_ADDRESSING.
Definition: fcml_common.hpp:499
fcml_st_far_pointer far_pointer
Far pointer operand.
Definition: fcml_common.h:739
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
@ REG_OPMASK
Opmask register.
Definition: fcml_common.hpp:1628
fcml_bool is_signed
True if offset should be treated as signed value.
Definition: fcml_common.h:589
static const Register CR4()
Factory method for a register.
Definition: fcml_common.hpp:3680
static const Register ZMM26()
Factory method for a register.
Definition: fcml_common.hpp:3350
static const Register R12W()
Factory method for a register.
Definition: fcml_common.hpp:2760
Address & setSizeOperator(fcml_usize sizeOperator)
Sets a new size operator for the address.
Definition: fcml_common.hpp:4978
#define FCML_PREFIX_REPZ
REPZ prefix (0xF3)
Definition: fcml_common.h:58
static const Condition NE()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6723
bool isMultimedia() const
Returns information if the operand is multimedia one or not.
Definition: fcml_common.hpp:5698
fcml_ip ip
Instruction pointer EIP/RIP.
Definition: fcml_common.h:831
Integer(fcml_uint32_t value)
Definition: fcml_common.hpp:739
fcml_hints hints
Optional operand level hints.
Definition: fcml_common.h:735
@ FCML_HINT_LONG_FORM_POINTER
This hint is used only by assembler in order to force it to generate three byte VEX/XOP prefix even i...
Definition: fcml_common.h:769
static const Condition GE()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:7008
bool isNE() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6714
static const Register K2()
Factory method for a register.
Definition: fcml_common.hpp:3830
Holds operand decorators.
Definition: fcml_common.hpp:5001
static const OperandHint MULTIMEDIA()
Creates operand level hint: MULTIMEDIA_INSTRUCTION.
Definition: fcml_common.hpp:478
AddressForm
Addressing type, see fcml_en_address_form enumerator.
Definition: fcml_common.hpp:4608
Integer & setInt32(fcml_int32_t int32)
Definition: fcml_common.hpp:771
Describes segment register.
Definition: fcml_common.h:615
static const Register K1()
Factory method for a register.
Definition: fcml_common.hpp:3820
Instruction()
Creates an empty instruction.
Definition: fcml_common.hpp:7192
@ CONDITION_L
6 Less than
Definition: fcml_common.hpp:6491
static const Register R14D()
Factory method for a register.
Definition: fcml_common.hpp:2910
static const Condition C()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6647
static const Register XMM24()
Factory method for a register.
Definition: fcml_common.hpp:3270
bool isP() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6866
Operand & operator[](fcml_int index)
Gets reference to the operand at given index.
Definition: fcml_common.hpp:7263
virtual ~Integer()
Definition: fcml_common.hpp:749
bool isNO() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6543
fcml_st_register index
GPR index register.
Definition: fcml_common.h:605
bool isXRelease() const
Returns true if xrelease prefix is set.
Definition: fcml_common.hpp:7496
void setOperandSizeAttribute(fcml_usize operandSizeAttribute)
Sets a new operand size attribute for the entry point.
Definition: fcml_common.hpp:631
static const OperandHint OP_ABSOLUTE_ADDRESSING()
Gets absolute hint for the operand.
Definition: fcml_common.hpp:8051
static const Register XMM9()
Factory method for a register.
Definition: fcml_common.hpp:2580
fcml_usize offset_size
Size of the offset.
Definition: fcml_common.h:556
static const OperandHint PSEUDO_OPCODE()
Creates operand level hint: PSEUDO_OPCODE.
Definition: fcml_common.hpp:492
bool getX64Exp() const
Gets true if it's a 8-bit general purpose register for REX aware instruction.
Definition: fcml_common.hpp:1736
static Integer uint8(fcml_uint8_t value)
Factory method which creates an instance fo the Integer for given parameter.
Definition: fcml_common.hpp:1323
bool operator!=(const fcml_int8_t value) const
Checks if the integer is not equal to the passed value.
Definition: fcml_common.hpp:937
@ OT_NONE
Operand not used.
Definition: fcml_common.hpp:5192
@ FCML_HINT_FAR_POINTER
Hints instruction to use FAR pointer to address the memory.
Definition: fcml_common.h:764
@ FCML_CONDITION_B
1 Below
Definition: fcml_common.h:477
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
@ OT_IMMEDIATE
Immediate integer value.
Definition: fcml_common.hpp:5194
static const Register YMM9()
Factory method for a register.
Definition: fcml_common.hpp:2590
@ FCML_OP_HINT_PSEUDO_OPCODE
Pseudo opcode.
Definition: fcml_common.h:713
Integer operator+(const Integer &src) const
Addition operator.
Definition: fcml_common.hpp:1265
Instruction operand.
Definition: fcml_common.h:731
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 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
Integer(fcml_uint8_t value)
Definition: fcml_common.hpp:729
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
Address()
Creates an empty address.
Definition: fcml_common.hpp:4621
Address operand.
Definition: fcml_common.hpp:4601
void add(const Operand &operand)
Adds a new operand to the instruction.
Definition: fcml_common.hpp:7222
bool isFar() const
Returns true if operand is a far pointer operand.
Definition: fcml_common.hpp:5481
static const Register BP()
Factory method for a register.
Definition: fcml_common.hpp:2219
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
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
#define FCML_PREFIX_XRELEASE
XRELEASE prefix (0xF3)
Definition: fcml_common.h:62
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
Operand & setHints(fcml_hints hints)
Sets new operand level hits for the operand.
Definition: fcml_common.hpp:5652
static const Register XMM17()
Factory method for a register.
Definition: fcml_common.hpp:3060
bool operator==(const Address &address) const
Checks if two addresses are equal or not.
Definition: fcml_common.hpp:4761
virtual ~Address()
Definition: fcml_common.hpp:4668
IB & repnz()
Sets a prefix described by the name of the method for the instruction being built.
Definition: fcml_common.hpp:7879
static const Register XMM15()
Factory method for a register.
Definition: fcml_common.hpp:3000
static const Register ZMM11()
Factory method for a register.
Definition: fcml_common.hpp:2740
static const Register ST5()
Factory method for a register.
Definition: fcml_common.hpp:3620
@ FCML_OP_HINT_UNDEFIEND
Undefined.
Definition: fcml_common.h:695
bool isOffset() const
Returns true if address holds an offset only.
Definition: fcml_common.hpp:4839
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
bool operator==(const fcml_uint16_t value) const
Checks if the integer is equal to the passed value.
Definition: fcml_common.hpp:849
bool operator!=(const fcml_int32_t value) const
Checks if the integer is not equal to the passed value.
Definition: fcml_common.hpp:981
static Integer int16(fcml_int16_t value)
Factory method which creates an instance fo the Integer for given parameter.
Definition: fcml_common.hpp:1333
fcml_en_operand_type
Supported operand types.
Definition: fcml_common.h:669
Decorators & getDecorators()
Gets decorators associated with the operand.
Definition: fcml_common.hpp:5673
static const Register EIP()
Factory method for a register.
Definition: fcml_common.hpp:3790
bool isRepz() const
Returns true if repz prefix is set.
Definition: fcml_common.hpp:7478
fcml_uint8_t reg
Register itself as a positive integer.
Definition: fcml_common.h:456
Address & setEffectiveAddress(const EffectiveAddress &effectiveAddress)
Sets a new effective address for the address.
Definition: fcml_common.hpp:4893
fcml_bool isSae() const
Gets AVX-512 {sae} decorator.
Definition: fcml_common.hpp:5135
@ FCML_HINT_DIRECT_POINTER
Hints instruction to use DIRECT memory addressing.
Definition: fcml_common.h:773
void setType(RegisterType type)
Sets the register type.
Definition: fcml_common.hpp:1727
static SegmentSelector seg(const Register &segmentSelector, bool isDefaultReg)
Creates segment selector for the given register.
Definition: fcml_common.hpp:4191
fcml_int64_t off64
Place for 64-bit absolute offset.
Definition: fcml_common.h:595
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
bool operator==(const Operand &op) const
Checks if two operands are equal or not.
Definition: fcml_common.hpp:5275
Describes address of an instruction code.
Definition: fcml_common.h:820
bool isLongFormPointer() const
Returns true if long form pointer hint is set.
Definition: fcml_common.hpp:7541
static const Register R14W()
Factory method for a register.
Definition: fcml_common.hpp:2900
@ CONDITION_S
4 Sign
Definition: fcml_common.hpp:6487
static const Condition NO()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6552
@ FCML_CONDITION_BE
3 Below or equal
Definition: fcml_common.h:481
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
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 const InstructionPrefix BRANCH()
Creates a prefix instance described by the name of the method.
Definition: fcml_common.hpp:7996
static const Register BL()
Factory method for a register.
Definition: fcml_common.hpp:2028
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
Integer & setInt8(fcml_int8_t int8)
Definition: fcml_common.hpp:793
bool operator!=(const Integer &value) const
Checks if the integer is not equal to the passed value.
Definition: fcml_common.hpp:1014
fcml_int16_t offset16
16-bit offset.
Definition: fcml_common.h:558
static const Register XMM27()
Factory method for a register.
Definition: fcml_common.hpp:3360
static IB inst(const fcml_cstring &mnemonic)
Factory method that can be used to create instruction builder.
Definition: fcml_common.hpp:7708
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 const InstructionHint FAR_PTR()
Creates a hint instance described by the name of the method.
Definition: fcml_common.hpp:7721
fcml_uint16_t segment
16-bit Code segment.
Definition: fcml_common.h:554
Instruction operand.
Definition: fcml_common.hpp:5184
static const Register YMM15()
Factory method for a register.
Definition: fcml_common.hpp:3010
enum fcml_en_address_form fcml_en_effective_address_form
Memory addressing using ModR/M field
static const Register R11L()
Factory method for a register.
Definition: fcml_common.hpp:2680
IB & addr(const Address &address)
Adds an address operand.
Definition: fcml_common.hpp:8156
static const Condition NLE()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:7065
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 const Register R13L()
Factory method for a register.
Definition: fcml_common.hpp:2820
static const InstructionPrefix REPZ()
Creates a prefix instance described by the name of the method.
Definition: fcml_common.hpp:7933
static const Register MM2()
Factory method for a register.
Definition: fcml_common.hpp:1988
static const OperandHint OP_MULTIMEDIA_HINT()
Gets multimedia hint for the operand.
Definition: fcml_common.hpp:8035
static const Register GS()
Factory method for a register.
Definition: fcml_common.hpp:3560
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
static const Condition NGE()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6970
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 const Register K3()
Factory method for a register.
Definition: fcml_common.hpp:3840
@ CONDITION_O
0 Overflow
Definition: fcml_common.hpp:6479
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 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 const Register MM0()
Factory method for a register.
Definition: fcml_common.hpp:1828
static const Register R15D()
Factory method for a register.
Definition: fcml_common.hpp:2980
static const InstructionPrefix REP()
Creates instruction prefix: REP.
Definition: fcml_common.hpp:350
static const Condition NP()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:6913
#define FCML_PREFIX_XACQUIRE
XACQUIRE prefix (0xF2)
Definition: fcml_common.h:60
IB & repe()
Sets a prefix described by the name of the method for the instruction being built.
Definition: fcml_common.hpp:7921
static const Condition LE()
Factory method which creates a condition of a given type.
Definition: fcml_common.hpp:7027
IB & offw(const Integer &offset)
Adds an offset based address operand with word size operator.
Definition: fcml_common.hpp:8193
bool isL() const
Gets true the condition is of a given type.
Definition: fcml_common.hpp:6942
static const Register XMM7()
Factory method for a register.
Definition: fcml_common.hpp:2440
bool isAddr() const
Returns true if operand is an address operand.
Definition: fcml_common.hpp:5471
Instruction & setConditional(bool isConditional)
Sets conditional flag for the instruction.
Definition: fcml_common.hpp:7353
static const Register RBX()
Factory method for a register.
Definition: fcml_common.hpp:2058
const Nullable< EmbeededRoundingControl > & getEr() const
Gets AVX-512 {er} decorator.
Definition: fcml_common.hpp:5125