IDAPython 9.0
Loading...
Searching...
No Matches
mop_t Class Reference
Inheritance diagram for mop_t:
mcallarg_t mop_addr_t

Public Member Functions

None set_impptr_done (self)
 
None set_udt (self)
 
None set_undef_val (self)
 
None set_lowaddr (self)
 
bool is_impptr_done (self)
 
bool is_udt (self)
 
bool probably_floating (self)
 
bool is_undef_val (self)
 
bool is_lowaddr (self)
 
bool is_ccflags (self)
 
bool is_pcval (self)
 
bool is_glbaddr_from_fixup (self)
 
 __init__ (self, *args)
 
'mop_t &' assign (self, 'mop_t' rop)
 
None zero (self)
 
None swap (self, 'mop_t' rop)
 
None erase (self)
 
None erase_but_keep_size (self)
 
str dstr (self)
 
bool create_from_mlist (self, 'mba_t' mba, 'mlist_t' lst, int fullsize)
 
bool create_from_ivlset (self, 'mba_t' mba, 'ivlset_t' ivs, int fullsize)
 
None create_from_vdloc (self, 'mba_t' mba, 'vdloc_t' loc, int _size)
 
None create_from_scattered_vdloc (self, 'mba_t' mba, str name, 'tinfo_t' type, 'vdloc_t' loc)
 
None create_from_insn (self, 'minsn_t' m)
 
None make_number (self, *args)
 
bool make_fpnum (self, 'void const *' bytes)
 
None make_reg (self, *args)
 
None make_gvar (self, ida_idaapi.ea_t ea)
 
None make_stkvar (self, 'mba_t' mba, int off)
 
None make_reg_pair (self, int loreg, int hireg, int halfsize)
 
None make_insn (self, 'minsn_t' ins)
 
None make_blkref (self, int blknum)
 
None make_helper (self, str name)
 
bool empty (self)
 
bool is_reg (self, *args)
 
bool is_arglist (self)
 
bool is_cc (self)
 
bool is_bit_reg (self, *args)
 
bool is_kreg (self)
 
bool is_mob (self, int serial)
 
bool is_scattered (self)
 
bool is_glbaddr (self, *args)
 
bool is_stkaddr (self)
 
bool is_insn (self, *args)
 
bool has_side_effects (self, bool include_ldx_and_divs=False)
 
bool may_use_aliased_memory (self)
 
bool is01 (self)
 
bool is_sign_extended_from (self, int nbytes)
 
bool is_zero_extended_from (self, int nbytes)
 
bool is_extended_from (self, int nbytes, bool is_signed)
 
bool equal_mops (self, 'mop_t' rop, int eqflags)
 
bool __eq__ (self, 'mop_t' rop)
 
bool __ne__ (self, 'mop_t' rop)
 
bool __lt__ (self, 'mop_t' rop)
 
int lexcompare (self, 'mop_t' rop)
 
int for_all_ops (self, 'mop_visitor_t' mv, 'tinfo_t' type=None, bool is_target=False)
 
int for_all_scattered_submops (self, 'scif_visitor_t' sv)
 
'uint64' value (self, bool is_signed)
 
'int64' signed_value (self)
 
'uint64' unsigned_value (self)
 
None update_numop_value (self, 'uint64' val)
 
bool is_constant (self, bool is_signed=True)
 
bool is_equal_to (self, 'uint64' n, bool is_signed=True)
 
bool is_zero (self)
 
bool is_one (self)
 
bool is_positive_constant (self)
 
bool is_negative_constant (self)
 
'ssize_t' get_stkvar (self, 'udm_t' udm=None, 'uval_t *' p_idaoff=None)
 
bool get_stkoff (self, 'sval_t *' p_vdoff)
 
'minsn_t *' get_insn (self, 'mcode_t' code)
 
bool make_low_half (self, int width)
 
bool make_high_half (self, int width)
 
bool make_first_half (self, int width)
 
bool make_second_half (self, int width)
 
bool shift_mop (self, int offset)
 
bool change_size (self, int nsize, 'side_effect_t' sideff=WITH_SIDEFF)
 
bool double_size (self, 'side_effect_t' sideff=WITH_SIDEFF)
 
bool preserve_side_effects (self, 'mblock_t' blk, 'minsn_t' top, 'bool *' moved_calls=None)
 
None apply_ld_mcode (self, 'mcode_t' mcode, ida_idaapi.ea_t ea, int newsize)
 
None apply_xdu (self, ida_idaapi.ea_t ea, int newsize)
 
None apply_xds (self, ida_idaapi.ea_t ea, int newsize)
 
 replace_by (self, o)
 

Static Public Attributes

str t = property(_ida_hexrays.mop_t_t_get, _ida_hexrays.mop_t_t_set)
 
str oprops
 
str valnum
 
str size
 

Protected Member Functions

None _print (self, *args)
 
None _make_reg (self, *args)
 
None _make_lvar (self, 'mba_t' mba, int idx, int off=0)
 
None _make_gvar (self, ida_idaapi.ea_t ea)
 
None _make_stkvar (self, 'mba_t' mba, int off)
 
None _make_insn (self, 'minsn_t' ins)
 
None _make_blkref (self, int blknum)
 
None _make_strlit (self, str str)
 
None _make_callinfo (self, 'mcallinfo_t' fi)
 
None _make_cases (self, 'mcases_t' _cases)
 
None _make_pair (self, 'mop_pair_t' _pair)
 
None _register (self)
 
None _deregister (self)
 
'mopt_t' _get_t (self)
 
None _set_t (self, 'mopt_t' v)
 
 _ensure_no_t (self)
 
'PyObject *' _obj_id (self)
 
 _ensure_cond (self, ok, cond_str)
 
 _ensure_no_obj (self, o, attr, attr_is_acquired)
 
 _ensure_ownership_transferrable (self, v)
 
 _acquire_ownership (self, v, acquire)
 
 _maybe_disown_and_deregister (self)
 
 _own_and_register (self)
 
 _meminfo (self)
 
'mnumber_t *' _get_nnn (self)
 
None _set_nnn (self, 'mnumber_t' _v)
 
'minsn_t *' _get_d (self)
 
None _set_d (self, 'minsn_t' _v)
 
'stkvar_ref_t *' _get_s (self)
 
None _set_s (self, 'stkvar_ref_t' _v)
 
'mcallinfo_t *' _get_f (self)
 
None _set_f (self, 'mcallinfo_t' _v)
 
'lvar_ref_t *' _get_l (self)
 
None _set_l (self, 'lvar_ref_t' _v)
 
'mop_addr_t *' _get_a (self)
 
None _set_a (self, 'mop_addr_t' _v)
 
'mcases_t *' _get_c (self)
 
None _set_c (self, 'mcases_t' _v)
 
'fnumber_t *' _get_fpc (self)
 
None _set_fpc (self, 'fnumber_t' _v)
 
'mop_pair_t *' _get_pair (self)
 
None _set_pair (self, 'mop_pair_t' _v)
 
'scif_t *' _get_scif (self)
 
None _set_scif (self, 'scif_t' _v)
 
'mreg_t' _get_r (self)
 
None _set_r (self, 'mreg_t' _v)
 
ida_idaapi.ea_t _get_g (self)
 
None _set_g (self, ida_idaapi.ea_t _v)
 
int _get_b (self)
 
None _set_b (self, int _v)
 
str _get_cstr (self)
 
None _set_cstr (self, str _v)
 
str _get_helper (self)
 
None _set_helper (self, str _v)
 

Properties

bool thisown
 
 obj_id = property(_obj_id)
 
 meminfo = property(_meminfo)
 
 nnn
 
 d
 
 s
 
 f
 
 l
 
 a
 
 c
 
 fpc
 
 pair
 
 scif
 
 r
 
 g
 
 b
 
 cstr
 
 helper
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
* args )

Reimplemented in mcallarg_t, and mop_addr_t.

Member Function Documentation

◆ __eq__()

bool __eq__ ( self,
'mop_t' rop )

◆ __lt__()

bool __lt__ ( self,
'mop_t' rop )

◆ __ne__()

bool __ne__ ( self,
'mop_t' rop )

◆ _acquire_ownership()

_acquire_ownership ( self,
v,
acquire )
protected

◆ _deregister()

None _deregister ( self)
protected

◆ _ensure_cond()

_ensure_cond ( self,
ok,
cond_str )
protected

◆ _ensure_no_obj()

_ensure_no_obj ( self,
o,
attr,
attr_is_acquired )
protected

◆ _ensure_no_t()

_ensure_no_t ( self)
protected

◆ _ensure_ownership_transferrable()

_ensure_ownership_transferrable ( self,
v )
protected

◆ _get_a()

'mop_addr_t *' _get_a ( self)
protected

◆ _get_b()

int _get_b ( self)
protected

◆ _get_c()

'mcases_t *' _get_c ( self)
protected

◆ _get_cstr()

str _get_cstr ( self)
protected

◆ _get_d()

'minsn_t *' _get_d ( self)
protected

◆ _get_f()

'mcallinfo_t *' _get_f ( self)
protected

◆ _get_fpc()

'fnumber_t *' _get_fpc ( self)
protected

◆ _get_g()

ida_idaapi.ea_t _get_g ( self)
protected

◆ _get_helper()

str _get_helper ( self)
protected

◆ _get_l()

'lvar_ref_t *' _get_l ( self)
protected

◆ _get_nnn()

'mnumber_t *' _get_nnn ( self)
protected

◆ _get_pair()

'mop_pair_t *' _get_pair ( self)
protected

◆ _get_r()

'mreg_t' _get_r ( self)
protected

◆ _get_s()

'stkvar_ref_t *' _get_s ( self)
protected

◆ _get_scif()

'scif_t *' _get_scif ( self)
protected

◆ _get_t()

'mopt_t' _get_t ( self)
protected

◆ _make_blkref()

None _make_blkref ( self,
int blknum )
protected
Create a block reference operand without erasing previous data. 

@param blknum: block number Note: this function does not erase the previous contents of the operand; call erase() if necessary

◆ _make_callinfo()

None _make_callinfo ( self,
'mcallinfo_t' fi )
protected
Create a call info operand without erasing previous data. 

@param fi: callinfo Note: this function does not erase the previous contents of the operand; call erase() if necessary

◆ _make_cases()

None _make_cases ( self,
'mcases_t' _cases )
protected
Create a 'switch cases' operand without erasing previous data. Note: this function does not erase the previous contents of the operand; call erase() if necessary 

◆ _make_gvar()

None _make_gvar ( self,
ida_idaapi.ea_t ea )
protected
Create a global variable operand without erasing previous data. 

@param ea: address of the variable Note: this function does not erase the previous contents of the operand; call erase() if necessary

◆ _make_insn()

None _make_insn ( self,
'minsn_t' ins )
protected
Create a nested instruction without erasing previous data. 

@param ins: pointer to the instruction to encapsulate into the operand Note: this function does not erase the previous contents of the operand; call erase() if necessary See also create_from_insn, which is higher level

◆ _make_lvar()

None _make_lvar ( self,
'mba_t' mba,
int idx,
int off = 0 )
protected
Create a local variable operand. 

@param mba: pointer to microcode
@param idx: index into mba->vars
@param off: offset from the beginning of the variable Note: this function does not erase the previous contents of the operand; call erase() if necessary

◆ _make_pair()

None _make_pair ( self,
'mop_pair_t' _pair )
protected
Create a pair operand without erasing previous data. Note: this function does not erase the previous contents of the operand; call erase() if necessary 

◆ _make_reg()

None _make_reg ( self,
* args )
protected
This function has the following signatures:

0. _make_reg(reg: mreg_t) -> None
1. _make_reg(reg: mreg_t, _size: int) -> None

# 0: _make_reg(reg: mreg_t) -> None

Create a register operand without erasing previous data. 


# 1: _make_reg(reg: mreg_t, _size: int) -> None

◆ _make_stkvar()

None _make_stkvar ( self,
'mba_t' mba,
int off )
protected
Create a stack variable operand. 

@param mba: pointer to microcode
@param off: decompiler stkoff Note: this function does not erase the previous contents of the operand; call erase() if necessary

◆ _make_strlit()

None _make_strlit ( self,
str str )
protected
Create a constant string operand.

◆ _maybe_disown_and_deregister()

_maybe_disown_and_deregister ( self)
protected

◆ _meminfo()

_meminfo ( self)
protected

◆ _obj_id()

'PyObject *' _obj_id ( self)
protected

◆ _own_and_register()

_own_and_register ( self)
protected

◆ _print()

None _print ( self,
* args )
protected

Reimplemented in mcallarg_t.

◆ _register()

None _register ( self)
protected

◆ _set_a()

None _set_a ( self,
'mop_addr_t' _v )
protected

◆ _set_b()

None _set_b ( self,
int _v )
protected

◆ _set_c()

None _set_c ( self,
'mcases_t' _v )
protected

◆ _set_cstr()

None _set_cstr ( self,
str _v )
protected

◆ _set_d()

None _set_d ( self,
'minsn_t' _v )
protected

◆ _set_f()

None _set_f ( self,
'mcallinfo_t' _v )
protected

◆ _set_fpc()

None _set_fpc ( self,
'fnumber_t' _v )
protected

◆ _set_g()

None _set_g ( self,
ida_idaapi.ea_t _v )
protected

◆ _set_helper()

None _set_helper ( self,
str _v )
protected

◆ _set_l()

None _set_l ( self,
'lvar_ref_t' _v )
protected

◆ _set_nnn()

None _set_nnn ( self,
'mnumber_t' _v )
protected

◆ _set_pair()

None _set_pair ( self,
'mop_pair_t' _v )
protected

◆ _set_r()

None _set_r ( self,
'mreg_t' _v )
protected

◆ _set_s()

None _set_s ( self,
'stkvar_ref_t' _v )
protected

◆ _set_scif()

None _set_scif ( self,
'scif_t' _v )
protected

◆ _set_t()

None _set_t ( self,
'mopt_t' v )
protected

◆ apply_ld_mcode()

None apply_ld_mcode ( self,
'mcode_t' mcode,
ida_idaapi.ea_t ea,
int newsize )
Apply a unary opcode to the operand. 

@param mcode: opcode to apply. it must accept 'l' and 'd' operands but not 'r'. examples: m_low/m_high/m_xds/m_xdu
@param ea: value of minsn_t::ea for the newly created insruction
@param newsize: new operand size Example: apply_ld_mcode(m_low) will convert op => low(op)

◆ apply_xds()

None apply_xds ( self,
ida_idaapi.ea_t ea,
int newsize )

◆ apply_xdu()

None apply_xdu ( self,
ida_idaapi.ea_t ea,
int newsize )

◆ assign()

'mop_t &' assign ( self,
'mop_t' rop )

◆ change_size()

bool change_size ( self,
int nsize,
'side_effect_t' sideff = WITH_SIDEFF )
Change the operand size. Examples: change_size(AL.1, 2) -> AX.2 change_size(qword_00000008.8, 4) -> dword_00000008.4 change_size(xdu.8(op.4), 4) -> op.4 change_size(#0x12345678.4, 1) -> #0x78.1 

@param nsize: new operand size
@param sideff: may modify the database because of the size change?
@returns success

◆ create_from_insn()

None create_from_insn ( self,
'minsn_t' m )
Create operand from an instruction. This function creates a nested instruction that can be used as an operand. Example: if m="add x,y,z", our operand will be (t=mop_d,d=m). The destination operand of 'add' (z) is lost. 

@param m: instruction to embed into operand. may not be nullptr.

◆ create_from_ivlset()

bool create_from_ivlset ( self,
'mba_t' mba,
'ivlset_t' ivs,
int fullsize )
Create operand from ivlset_t. Example: if IVS contains [glbvar..glbvar+4), our operand will be (t=mop_v, g=&glbvar, size=4) 

@param mba: pointer to microcode
@param ivs: set of memory intervals
@param fullsize: mba->fullsize
@returns success

◆ create_from_mlist()

bool create_from_mlist ( self,
'mba_t' mba,
'mlist_t' lst,
int fullsize )
Create operand from mlist_t. Example: if LST contains 4 bits for R0.4, our operand will be (t=mop_r, r=R0, size=4) 

@param mba: pointer to microcode
@param lst: list of locations
@param fullsize: mba->fullsize
@returns success

◆ create_from_scattered_vdloc()

None create_from_scattered_vdloc ( self,
'mba_t' mba,
str name,
'tinfo_t' type,
'vdloc_t' loc )
Create operand from scattered vdloc_t. Example: if LOC is (ALOC_DIST, {EAX.4, EDX.4}) and TYPE is _LARGE_INTEGER, our operand will be (t=mop_sc, scif={EAX.4, EDX.4}) 

@param mba: pointer to microcode
@param name: name of the operand, if available
@param type: type of the operand, must be present
@param loc: a scattered location
@returns success

◆ create_from_vdloc()

None create_from_vdloc ( self,
'mba_t' mba,
'vdloc_t' loc,
int _size )
Create operand from vdloc_t. Example: if LOC contains (type=ALOC_REG1, r=R0), our operand will be (t=mop_r, r=R0, size=_SIZE) 

@param mba: pointer to microcode
@param loc: location
@param _size: operand size Note: this function cannot handle scattered locations.
@returns success

◆ double_size()

bool double_size ( self,
'side_effect_t' sideff = WITH_SIDEFF )

◆ dstr()

str dstr ( self)

Reimplemented in mcallarg_t.

◆ empty()

bool empty ( self)

◆ equal_mops()

bool equal_mops ( self,
'mop_t' rop,
int eqflags )
Compare operands. This is the main comparison function for operands. 

@param rop: operand to compare with
@param eqflags: combination of comparison bits bits

◆ erase()

None erase ( self)

◆ erase_but_keep_size()

None erase_but_keep_size ( self)

◆ for_all_ops()

int for_all_ops ( self,
'mop_visitor_t' mv,
'tinfo_t' type = None,
bool is_target = False )
Visit the operand and all its sub-operands. This function visits the current operand as well. 

@param mv: visitor object
@param type: operand type
@param is_target: is a destination operand?

◆ for_all_scattered_submops()

int for_all_scattered_submops ( self,
'scif_visitor_t' sv )
Visit all sub-operands of a scattered operand. This function does not visit the current operand, only its sub-operands. All sub-operands are synthetic and are destroyed after the visitor. This function works only with scattered operands. 

@param sv: visitor object

◆ get_insn()

'minsn_t *' get_insn ( self,
'mcode_t' code )
Get subinstruction of the operand. If the operand has a subinstruction with the specified opcode, return it. 

@param code: desired opcode
@returns pointer to the instruction or nullptr

◆ get_stkoff()

bool get_stkoff ( self,
'sval_t *' p_vdoff )
Get the referenced stack offset. This function can also handle mop_sc if it is entirely mapped into a continuous stack region. 

@param p_vdoff: the output buffer
@returns success

◆ get_stkvar()

'ssize_t' get_stkvar ( self,
'udm_t' udm = None,
'uval_t *' p_idaoff = None )
Retrieve the referenced stack variable. 

@param udm: stkvar, may be nullptr
@param p_idaoff: if specified, will hold IDA stkoff after the call.
@returns index of stkvar in the frame or -1

◆ has_side_effects()

bool has_side_effects ( self,
bool include_ldx_and_divs = False )
Has any side effects? 

@param include_ldx_and_divs: consider ldx/div/mod as having side effects?

◆ is01()

bool is01 ( self)
Are the possible values of the operand only 0 and 1? This function returns true for 0/1 constants, bit registers, the result of 'set' insns, etc. 

◆ is_arglist()

bool is_arglist ( self)
Is a list of arguments?

◆ is_bit_reg()

bool is_bit_reg ( self,
* args )
This function has the following signatures:

0. is_bit_reg() -> bool
1. is_bit_reg(reg: mreg_t) -> bool

# 0: is_bit_reg() -> bool


# 1: is_bit_reg(reg: mreg_t) -> bool

Is a bit register? This includes condition codes and eventually other bit registers 

◆ is_cc()

bool is_cc ( self)
Is a condition code?

◆ is_ccflags()

bool is_ccflags ( self)

◆ is_constant()

bool is_constant ( self,
bool is_signed = True )
Retrieve value of a constant integer operand. 

@param is_signed: should treat the value as signed
@returns true if the operand is mop_n

◆ is_equal_to()

bool is_equal_to ( self,
'uint64' n,
bool is_signed = True )

◆ is_extended_from()

bool is_extended_from ( self,
int nbytes,
bool is_signed )
Does the high part of the operand consist of zero or sign bytes?

◆ is_glbaddr()

bool is_glbaddr ( self,
* args )
This function has the following signatures:

0. is_glbaddr() -> bool
1. is_glbaddr(ea: ida_idaapi.ea_t) -> bool

# 0: is_glbaddr() -> bool

Is address of a global memory cell?


# 1: is_glbaddr(ea: ida_idaapi.ea_t) -> bool

Is address of the specified global memory cell?

◆ is_glbaddr_from_fixup()

bool is_glbaddr_from_fixup ( self)

◆ is_impptr_done()

bool is_impptr_done ( self)

◆ is_insn()

bool is_insn ( self,
* args )
This function has the following signatures:

0. is_insn() -> bool
1. is_insn(code: mcode_t) -> bool

# 0: is_insn() -> bool

Is a sub-instruction?


# 1: is_insn(code: mcode_t) -> bool

Is a sub-instruction with the specified opcode?

◆ is_kreg()

bool is_kreg ( self)
Is a kernel register?

◆ is_lowaddr()

bool is_lowaddr ( self)

◆ is_mob()

bool is_mob ( self,
int serial )
Is a block reference to the specified block?

◆ is_negative_constant()

bool is_negative_constant ( self)

◆ is_one()

bool is_one ( self)

◆ is_pcval()

bool is_pcval ( self)

◆ is_positive_constant()

bool is_positive_constant ( self)

◆ is_reg()

bool is_reg ( self,
* args )
This function has the following signatures:

0. is_reg() -> bool
1. is_reg(_r: mreg_t) -> bool
2. is_reg(_r: mreg_t, _size: int) -> bool

# 0: is_reg() -> bool

Is a register operand? See also get_mreg_name() 


# 1: is_reg(_r: mreg_t) -> bool

Is the specified register?


# 2: is_reg(_r: mreg_t, _size: int) -> bool

Is the specified register of the specified size?

◆ is_scattered()

bool is_scattered ( self)
Is a scattered operand?

◆ is_sign_extended_from()

bool is_sign_extended_from ( self,
int nbytes )
Does the high part of the operand consist of the sign bytes? 

@param nbytes: number of bytes that were sign extended. the remaining size-nbytes high bytes must be sign bytes Example: is_sign_extended_from(xds.4(op.1), 1) -> true because the high 3 bytes are certainly sign bits

◆ is_stkaddr()

bool is_stkaddr ( self)
Is address of a stack variable?

◆ is_udt()

bool is_udt ( self)

◆ is_undef_val()

bool is_undef_val ( self)

◆ is_zero()

bool is_zero ( self)

◆ is_zero_extended_from()

bool is_zero_extended_from ( self,
int nbytes )
Does the high part of the operand consist of zero bytes? 

@param nbytes: number of bytes that were zero extended. the remaining size-nbytes high bytes must be zero Example: is_zero_extended_from(xdu.8(op.1), 2) -> true because the high 6 bytes are certainly zero

◆ lexcompare()

int lexcompare ( self,
'mop_t' rop )

Reimplemented in mop_addr_t.

◆ make_blkref()

None make_blkref ( self,
int blknum )
Create a global variable operand.

◆ make_first_half()

bool make_first_half ( self,
int width )
Make the first part of the operand. This function does not care about the memory endianness 

@param width: the desired size of the operand part in bytes
@returns success

◆ make_fpnum()

bool make_fpnum ( self,
'void const *' bytes )
Create a floating point constant operand. 

@param bytes: pointer to the floating point value as used by the current processor (e.g. for x86 it must be in IEEE 754)
@returns success

◆ make_gvar()

None make_gvar ( self,
ida_idaapi.ea_t ea )
Create a global variable operand.

◆ make_helper()

None make_helper ( self,
str name )
Create a helper operand. A helper operand usually keeps a built-in function name like "va_start" It is essentially just an arbitrary identifier without any additional info. 

◆ make_high_half()

bool make_high_half ( self,
int width )
Make the high part of the operand. This function takes into account the memory endianness (byte sex) 

@param width: the desired size of the operand part in bytes
@returns success

◆ make_insn()

None make_insn ( self,
'minsn_t' ins )
Create a nested instruction.

◆ make_low_half()

bool make_low_half ( self,
int width )
Make the low part of the operand. This function takes into account the memory endianness (byte sex) 

@param width: the desired size of the operand part in bytes
@returns success

◆ make_number()

None make_number ( self,
* args )
Create an integer constant operand. 

@param _value: value to store in the operand
@param _size: size of the value in bytes (1,2,4,8)
@param _ea: address of the processor instruction that made the value
@param opnum: operand number of the processor instruction

◆ make_reg()

None make_reg ( self,
* args )
This function has the following signatures:

0. make_reg(reg: mreg_t) -> None
1. make_reg(reg: mreg_t, _size: int) -> None

# 0: make_reg(reg: mreg_t) -> None

Create a register operand.


# 1: make_reg(reg: mreg_t, _size: int) -> None

◆ make_reg_pair()

None make_reg_pair ( self,
int loreg,
int hireg,
int halfsize )
Create pair of registers. 

@param loreg: register holding the low part of the value
@param hireg: register holding the high part of the value
@param halfsize: the size of each of loreg/hireg

◆ make_second_half()

bool make_second_half ( self,
int width )
Make the second part of the operand. This function does not care about the memory endianness 

@param width: the desired size of the operand part in bytes
@returns success

◆ make_stkvar()

None make_stkvar ( self,
'mba_t' mba,
int off )

◆ may_use_aliased_memory()

bool may_use_aliased_memory ( self)
Is it possible for the operand to use aliased memory?

◆ preserve_side_effects()

bool preserve_side_effects ( self,
'mblock_t' blk,
'minsn_t' top,
'bool *' moved_calls = None )
Move subinstructions with side effects out of the operand. If we decide to delete an instruction operand, it is a good idea to call this function. Alternatively we should skip such operands by calling mop_t::has_side_effects() For example, if we transform: jnz x, x, @blk => goto @blk then we must call this function before deleting the X operands. 

@param blk: current block
@param top: top level instruction that contains our operand
@param moved_calls: pointer to the boolean that will track if all side effects get handled correctly. must be false initially.
@returns false failed to preserve a side effect, it is not safe to delete the operand true no side effects or successfully preserved them

◆ probably_floating()

bool probably_floating ( self)

◆ replace_by()

replace_by ( self,
o )

◆ set_impptr_done()

None set_impptr_done ( self)

◆ set_lowaddr()

None set_lowaddr ( self)

◆ set_udt()

None set_udt ( self)

◆ set_undef_val()

None set_undef_val ( self)

◆ shift_mop()

bool shift_mop ( self,
int offset )
Shift the operand. This function shifts only the beginning of the operand. The operand size will be changed. Examples: shift_mop(AH.1, -1) -> AX.2 shift_mop(qword_00000008.8, 4) -> dword_0000000C.4 shift_mop(xdu.8(op.4), 4) -> #0.4 shift_mop(#0x12345678.4, 3) -> #12.1 

@param offset: shift count (the number of bytes to shift)
@returns success

◆ signed_value()

'int64' signed_value ( self)

◆ swap()

None swap ( self,
'mop_t' rop )

◆ unsigned_value()

'uint64' unsigned_value ( self)

◆ update_numop_value()

None update_numop_value ( self,
'uint64' val )

◆ value()

'uint64' value ( self,
bool is_signed )
Retrieve value of a constant integer operand. These functions can be called only for mop_n operands. See is_constant() that can be called on any operand. 

◆ zero()

None zero ( self)

Member Data Documentation

◆ oprops

str oprops
static
Initial value:
= property(_ida_hexrays.mop_t_oprops_get, _ida_hexrays.
mop_t_oprops_set)

◆ size

str size
static
Initial value:
= property(_ida_hexrays.mop_t_size_get, _ida_hexrays.
mop_t_size_set)

◆ t

str t = property(_ida_hexrays.mop_t_t_get, _ida_hexrays.mop_t_t_set)
static

◆ valnum

str valnum
static
Initial value:
= property(_ida_hexrays.mop_t_valnum_get, _ida_hexrays
.mop_t_valnum_set)

Property Documentation

◆ a

a
static
Initial value:
= property(lambda self: self._get_a() if self.t == mop_a else None,
lambda self, v: self._ensure_cond(self.t == mop_a,
'self.t == mop_a') and self._ensure_no_obj(self._get_a(), 'a', True
) and self._acquire_ownership(v, True) and self._set_a(v))

◆ b

b
static
Initial value:
= property(lambda self: self._get_b() if self.t == mop_b else None,
lambda self, v: self._ensure_cond(self.t == mop_b,
'self.t == mop_b') and self._set_b(v))

◆ c

c
static
Initial value:
= property(lambda self: self._get_c() if self.t == mop_c else None,
lambda self, v: self._ensure_cond(self.t == mop_c,
'self.t == mop_c') and self._ensure_no_obj(self._get_c(), 'c', True
) and self._acquire_ownership(v, True) and self._set_c(v))

◆ cstr

cstr
static
Initial value:
= property(lambda self: self._get_cstr() if self.t == mop_str else
None, lambda self, v: self._ensure_cond(self.t == mop_str,
'self.t == mop_str') and self._ensure_no_obj(self._get_cstr(),
'cstr', False) and self._acquire_ownership(v, False) and self.
_set_cstr(v))

◆ d

d
static
Initial value:
= property(lambda self: self._get_d() if self.t == mop_d else None,
lambda self, v: self._ensure_cond(self.t == mop_d,
'self.t == mop_d') and self._ensure_no_obj(self._get_d(), 'd', True
) and self._acquire_ownership(v, True) and self._set_d(v))

◆ f

f
static
Initial value:
= property(lambda self: self._get_f() if self.t == mop_f else None,
lambda self, v: self._ensure_cond(self.t == mop_f,
'self.t == mop_f') and self._ensure_no_obj(self._get_f(), 'f', True
) and self._acquire_ownership(v, True) and self._set_f(v))

◆ fpc

fpc
static
Initial value:
= property(lambda self: self._get_fpc() if self.t == mop_fn else
None, lambda self, v: self._ensure_cond(self.t == mop_fn,
'self.t == mop_fn') and self._ensure_no_obj(self._get_fpc(), 'fpc',
True) and self._acquire_ownership(v, True) and self._set_fpc(v))

◆ g

g
static
Initial value:
= property(lambda self: self._get_g() if self.t == mop_v else None,
lambda self, v: self._ensure_cond(self.t == mop_v,
'self.t == mop_v') and self._set_g(v))

◆ helper

helper
static
Initial value:
= property(lambda self: self._get_helper() if self.t == mop_h else
None, lambda self, v: self._ensure_cond(self.t == mop_h,
'self.t == mop_h') and self._ensure_no_obj(self._get_helper(),
'helper', False) and self._acquire_ownership(v, False) and self.
_set_helper(v))

◆ l

l
static
Initial value:
= property(lambda self: self._get_l() if self.t == mop_l else None,
lambda self, v: self._ensure_cond(self.t == mop_l,
'self.t == mop_l') and self._ensure_no_obj(self._get_l(), 'l', True
) and self._acquire_ownership(v, True) and self._set_l(v))

◆ meminfo

meminfo = property(_meminfo)
static

◆ nnn

nnn
static
Initial value:
= property(lambda self: self._get_nnn() if self.t == mop_n else
None, lambda self, v: self._ensure_cond(self.t == mop_n,
'self.t == mop_n') and self._ensure_no_obj(self._get_nnn(), 'nnn',
True) and self._acquire_ownership(v, True) and self._set_nnn(v))

◆ obj_id

obj_id = property(_obj_id)
static

◆ pair

pair
static
Initial value:
= property(lambda self: self._get_pair() if self.t == mop_p else
None, lambda self, v: self._ensure_cond(self.t == mop_p,
'self.t == mop_p') and self._ensure_no_obj(self._get_pair(), 'pair',
True) and self._acquire_ownership(v, True) and self._set_pair(v))

◆ r

r
static
Initial value:
= property(lambda self: self._get_r() if self.t == mop_r else None,
lambda self, v: self._ensure_cond(self.t == mop_r,
'self.t == mop_r') and self._set_r(v))

◆ s

s
static
Initial value:
= property(lambda self: self._get_s() if self.t == mop_S else None,
lambda self, v: self._ensure_cond(self.t == mop_S,
'self.t == mop_S') and self._ensure_no_obj(self._get_s(), 's', True
) and self._acquire_ownership(v, True) and self._set_s(v))

◆ scif

scif
static
Initial value:
= property(lambda self: self._get_scif() if self.t == mop_sc else
None, lambda self, v: self._ensure_cond(self.t == mop_sc,
'self.t == mop_sc') and self._ensure_no_obj(self._get_scif(),
'scif', True) and self._acquire_ownership(v, True) and self.
_set_scif(v))

◆ thisown

bool thisown
static
Initial value:
= property(lambda x: x.this.own(), lambda x, v: x.this.own(v),
doc='The membership flag')

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