t_modop

Describes operand in the command search pattern t_asmmod.

typedef struct t_modop {               // Operand in assembler model
  uchar          features;             // Operand features, set of AMP_xxx
  uchar          reg;                  // (Pseudo)register operand
  uchar          scale[NPSEUDO];       // Scales of (pseudo)registers in address
  ulong          opconst;              // Constant or const part of address
} t_modop;


Members:

features
List of operand features, combination of the following flags:
AMP_REGISTER
operand is a register (integer, integer byte, selector, floating-point, MMS, SSE etc.). Only field reg is valid
AMP_MEMORY - operand is a memory location. Only fields scale and opconst are valid. If combined with AMP_IMPRECISE, opconst is imprecise. If combined with AMP_ANYMEM and AMP_IMPRECISE, any memory operand is acceptable
AMP_CONSToperand is a constant. Only field opconst is valid. If combined with AMP_IMPRECISE, opconst is imprecise
AMP_IMPRECISE - opconst is imprecise (i.e. operand must include constant part but its value is unimportant)
AMP_ANYMEM - any memory operand is acceptable
AMP_ANYOP
combined with AMF_IMPRECISE, matches any operand. However, corresponding AMP_REGISTER / AMP_MEMORY / AMP_CONST bits must be set. Note that in this case all other fields are undefined and should not include semi-defined registers
reg
Register or pseudoregister expected as operand. For integer registers, this is one of REG_xxx, including REG_ANY, REG_RA and REG_RB. For segment registers, this is SEG_xxx, including SEG_ANY. Use index or REG_ANY for any other kind of registers. Note that REG_ANY and SEG_ANY are interchangeable
scale
IScales of registers in memory address. For example, [EAX+8*EDI] translates to { 1, 0, 0, 0, 0, 0, 0, 8 }, and [EAX+4*EAX] - to { 5, 0, 0, 0, 0, 0, 0, 0 }
opconst
Immediate constant or constant part of address, ignored if AMF_IMPRECISE bit is set


See also:
t_asmmod