fcml  1.1.3
Public Types | Public Member Functions | Static Public Member Functions | List of all members
fcml::Address Class Reference

Address operand. More...

#include <fcml_common.hpp>

Public Types

enum  AddressForm {
  AF_UNDEFINED = FCML_AF_UNDEFINED,
  AF_OFFSET = FCML_AF_OFFSET,
  AF_COMBINED = FCML_AF_COMBINED
}
 Addressing type, see fcml_en_address_form enumerator. More...
 

Public Member Functions

 Address ()
 Creates an empty address. More...
 
 Address (const Integer &offset, fcml_usize sizeOperator=FCML_DS_UNDEF)
 Creates an address instance with an offset and optional size operator set. More...
 
 Address (const EffectiveAddress &effectiveAddress, fcml_usize sizeOperator=FCML_DS_UNDEF)
 Creates an address instance with an effective address and optional size operator set. More...
 
 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 set. More...
 
virtual ~Address ()
 
bool operator== (const Address &address) const
 Checks if two addresses are equal or not. More...
 
bool operator!= (const Address &address) const
 Checks if two addresses are equal or not. More...
 
bool isEffectiveAddress () const
 Returns true if address holds effective address. More...
 
bool isOffset () const
 Returns true if address holds an offset only. More...
 
AddressForm getAddressForm () const
 Gets an address form. More...
 
AddresssetAddressForm (AddressForm addressForm)
 Sets a new address form for the effective address. More...
 
const EffectiveAddressgetEffectiveAddress () const
 Gets reference to the constant effective address associated with the address. More...
 
EffectiveAddressgetEffectiveAddress ()
 Gets reference to the effective address associated with the address. More...
 
AddresssetEffectiveAddress (const EffectiveAddress &effectiveAddress)
 Sets a new effective address for the address. More...
 
const IntegergetOffset () const
 Gets the constant offset associated with the address. More...
 
IntegergetOffset ()
 Gets the offset associated with the address. More...
 
AddresssetOffset (const Integer &offset)
 Sets a new offset for the address. More...
 
const SegmentSelectorgetSegmentSelector () const
 Gets the constant segment selector associated with the address. More...
 
SegmentSelectorgetSegmentSelector ()
 Gets the segment selector associated with the address. More...
 
AddresssetSegmentSelector (const SegmentSelector &segmentSelector)
 Sets a new segment selector for the address. More...
 
fcml_usize getSizeOperator () const
 Gets the size operator associated with the address. More...
 
AddresssetSizeOperator (fcml_usize sizeOperator)
 Sets a new size operator for the address. More...
 

Static Public Member Functions

static Address effective (const Integer &displacement, fcml_usize sizeOperator=FCML_DS_UNDEF)
 Factory method which creates an effective address instance with the displacement only. More...
 
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. More...
 
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. More...
 
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, scale factor and displacement. More...
 
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. More...
 
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, index register and scale factor. More...
 
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, index register, scale factor and displacement. More...
 
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 optional size operator. More...
 
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 set. More...
 
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. More...
 

Detailed Description

Address operand.

It's a counterpart to the fcml_st_address structure.

Since
1.1.0

Member Enumeration Documentation

Addressing type, see fcml_en_address_form enumerator.

Since
1.1.0
Enumerator
AF_UNDEFINED 

Default value set if memory addressing hasn't been configured.

AF_OFFSET 

Absolute offset (address).

AF_COMBINED 

Effective address combined from address components like base register, index registers, factor, displacement etc...

Constructor & Destructor Documentation

fcml::Address::Address ( )
inline

Creates an empty address.

Since
1.1.0
fcml::Address::Address ( const Integer offset,
fcml_usize  sizeOperator = FCML_DS_UNDEF 
)
inline

Creates an address instance with an offset and optional size operator set.

Parameters
offsetOffset to be set for the address.
sizeOperatorThe optional size operator, set to FCML_DS_UNDEF by default.
Since
1.1.0
fcml::Address::Address ( const EffectiveAddress effectiveAddress,
fcml_usize  sizeOperator = FCML_DS_UNDEF 
)
inline

Creates an address instance with an effective address and optional size operator set.

Parameters
effectiveAddressThe effective address to be set for the address.
sizeOperatorThe optional size operator, set to FCML_DS_UNDEF by default.
Since
1.1.0
fcml::Address::Address ( const EffectiveAddress effectiveAddress,
const SegmentSelector segmentSelector,
fcml_usize  sizeOperator = FCML_DS_UNDEF 
)
inline

Creates an address instance with an effective address, segment selector and optional size operator set.

Parameters
effectiveAddressThe effective address to be set for the address.
segmentSelectorThe segment selector.
sizeOperatorThe optional size operator, set to FCML_DS_UNDEF by default.
Since
1.1.0
virtual fcml::Address::~Address ( )
inlinevirtual
Since
1.1.0

Member Function Documentation

static Address fcml::Address::effective ( const Integer displacement,
fcml_usize  sizeOperator = FCML_DS_UNDEF 
)
inlinestatic

Factory method which creates an effective address instance with the displacement only.

Parameters
displacementThe displacement value.
sizeOperatorSize operator.
Since
1.1.0
static Address fcml::Address::effective ( const Register base,
fcml_usize  sizeOperator = FCML_DS_UNDEF 
)
inlinestatic

Factory method which creates an effective address instance with the base register only.

Parameters
baseThe base register.
sizeOperatorSize operator.
Since
1.1.0
static Address fcml::Address::effective ( const Register base,
const Integer displacement,
fcml_usize  sizeOperator = FCML_DS_UNDEF 
)
inlinestatic

Factory method which creates an effective address instance with the base register and displacement.

Parameters
baseThe base register.
displacementThe displacement value.
sizeOperatorSize operator.
Since
1.1.0
static Address fcml::Address::effective ( const Register index,
fcml_uint8_t  scaleFactor,
const Integer displacement,
fcml_usize  sizeOperator = FCML_DS_UNDEF 
)
inlinestatic

Factory method which creates an effective address instance with the index register, scale factor and displacement.

Parameters
indexThe index register.
scaleFactorThe scale factor.
displacementThe displacement value.
sizeOperatorSize operator.
Since
1.1.0
static Address fcml::Address::effective ( const Register base,
const Register index,
fcml_usize  sizeOperator = FCML_DS_UNDEF 
)
inlinestatic

Factory method which creates an effective address instance with the base register and index register.

Parameters
baseThe base register.
indexThe index register.
sizeOperatorSize operator.
Since
1.1.0
static Address fcml::Address::effective ( const Register base,
const Register index,
fcml_uint8_t  scaleFactor,
fcml_usize  sizeOperator = FCML_DS_UNDEF 
)
inlinestatic

Factory method which creates an effective address instance with the base register, index register and scale factor.

Parameters
baseThe base register.
indexThe index register.
scaleFactorThe scale factor.
sizeOperatorSize operator.
Since
1.1.0
static Address fcml::Address::effective ( const Register base,
const Register index,
fcml_uint8_t  scaleFactor,
const Integer displacement,
fcml_usize  sizeOperator = FCML_DS_UNDEF 
)
inlinestatic

Factory method which creates an effective address instance with the base register, index register, scale factor and displacement.

Parameters
baseThe base register.
indexThe index register.
scaleFactorThe scale factor.
displacementThe displacement value.
sizeOperatorSize operator.
Since
1.1.0
static Address fcml::Address::effective ( const EffectiveAddress effectiveAddress,
const SegmentSelector segmentSelector,
fcml_usize  sizeOperator = FCML_DS_UNDEF 
)
inlinestatic

Factor method which creates an instance of the address for an effective address, segment selector and optional size operator.

Parameters
effectiveAddressThe effective address to be set for the address.
segmentSelectorThe segment selector.
sizeOperatorThe optional size operator, set to FCML_DS_UNDEF by default.
Returns
The created address instance.
Since
1.1.0
static Address fcml::Address::effective ( const EffectiveAddress effectiveAddress,
fcml_usize  sizeOperator = FCML_DS_UNDEF 
)
inlinestatic

Factor method which creates an address instance with an effective address and optional size operator set.

Parameters
effectiveAddressThe effective address to be set for the address.
sizeOperatorThe optional size operator, set to FCML_DS_UNDEF by default.
Returns
The created address instance.
Since
1.1.0
AddressForm fcml::Address::getAddressForm ( ) const
inline

Gets an address form.

See fcml_en_address_form for more details.

Returns
The address form.
Since
1.1.0
const EffectiveAddress& fcml::Address::getEffectiveAddress ( ) const
inline

Gets reference to the constant effective address associated with the address.

Returns
The constant effective address.
Since
1.1.0
EffectiveAddress& fcml::Address::getEffectiveAddress ( )
inline

Gets reference to the effective address associated with the address.

Returns
The effective address.
Since
1.1.0
const Integer& fcml::Address::getOffset ( ) const
inline

Gets the constant offset associated with the address.

Returns
The offset associated with the address.
Since
1.1.0
Integer& fcml::Address::getOffset ( )
inline

Gets the offset associated with the address.

Returns
The offset associated with the address.
Since
1.1.0
const SegmentSelector& fcml::Address::getSegmentSelector ( ) const
inline

Gets the constant segment selector associated with the address.

Returns
The segment selector associated with the address.
Since
1.1.0
SegmentSelector& fcml::Address::getSegmentSelector ( )
inline

Gets the segment selector associated with the address.

Returns
The segment selector associated with the address.
Since
1.1.0
fcml_usize fcml::Address::getSizeOperator ( ) const
inline

Gets the size operator associated with the address.

Returns
The size operator.
Since
1.1.0
bool fcml::Address::isEffectiveAddress ( ) const
inline

Returns true if address holds effective address.

Returns
Returns true if address holds effective address.
Since
1.1.0
bool fcml::Address::isOffset ( ) const
inline

Returns true if address holds an offset only.

Returns
Returns true if address holds an offset only.
Since
1.1.0
static Address fcml::Address::offset ( const Integer offset,
fcml_usize  sizeOperator = FCML_DS_UNDEF 
)
inlinestatic

Factor method which creates an address instance with an offset and optional size operator set.

Parameters
offsetThe offset to be set for the address.
sizeOperatorThe optional size operator, set to FCML_DS_UNDEF by default.
Returns
The created address instance.
Since
1.1.0
bool fcml::Address::operator!= ( const Address address) const
inline

Checks if two addresses are equal or not.

Parameters
addressThe address to be compared with the current one.
Returns
True if they are NOT equal.
Since
1.1.0
bool fcml::Address::operator== ( const Address address) const
inline

Checks if two addresses are equal or not.

Parameters
addressThe address to be compared with the current one.
Returns
True if they are equal.
Since
1.1.0
Address& fcml::Address::setAddressForm ( AddressForm  addressForm)
inline

Sets a new address form for the effective address.

Parameters
addressFormThe address form to be set for the effective address.
Returns
Address itself.
Since
1.1.0
Address& fcml::Address::setEffectiveAddress ( const EffectiveAddress effectiveAddress)
inline

Sets a new effective address for the address.

Parameters
effectiveAddressThe new address to be set for the effective address.
Returns
The address itself.
Since
1.1.0
Address& fcml::Address::setOffset ( const Integer offset)
inline

Sets a new offset for the address.

Parameters
offsetThe enw offset to be set for the address.
Returns
The address itself.
Since
1.1.0
Address& fcml::Address::setSegmentSelector ( const SegmentSelector segmentSelector)
inline

Sets a new segment selector for the address.

Parameters
segmentSelectorThe new segment selector for the address.
Returns
The address itself.
Since
1.1.0
Address& fcml::Address::setSizeOperator ( fcml_usize  sizeOperator)
inline

Sets a new size operator for the address.

Parameters
sizeOperatorThe size operator.
Since
1.1.0

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