IDAPython 9.0
Loading...
Searching...
No Matches
mop_t Class Reference

Proxy of C++ mop_t class.

Inheritance diagram for mop_t:
mcallarg_t mop_addr_t

Public Member Functions

"void" set_impptr_done (self)
 set_impptr_done(self)
 
"void" set_udt (self)
 set_udt(self)
 
"void" set_undef_val (self)
 set_undef_val(self)
 
"void" set_lowaddr (self)
 set_lowaddr(self)
 
"bool" is_impptr_done (self)
 is_impptr_done(self) -> bool
 
"bool" is_udt (self)
 is_udt(self) -> bool
 
"bool" probably_floating (self)
 probably_floating(self) -> bool
 
"bool" is_undef_val (self)
 is_undef_val(self) -> bool
 
"bool" is_lowaddr (self)
 is_lowaddr(self) -> bool
 
"bool" is_ccflags (self)
 is_ccflags(self) -> bool
 
"bool" is_pcval (self)
 is_pcval(self) -> bool
 
"bool" is_glbaddr_from_fixup (self)
 is_glbaddr_from_fixup(self) -> bool
 
 __init__ (self, *args)
 init(self) -> mop_t init(self, rop) -> mop_t
 
"mop_t &" assign (self, "mop_t" rop)
 assign(self, rop) -> mop_t
 
"void" zero (self)
 zero(self)
 
"void" swap (self, "mop_t" rop)
 swap(self, rop)
 
"void" erase (self)
 erase(self)
 
"void" erase_but_keep_size (self)
 erase_but_keep_size(self)
 
"char const *" dstr (self)
 dstr(self) -> char const *
 
"bool" create_from_mlist (self, "mba_t" mba, "mlist_t" lst, "sval_t" fullsize)
 create_from_mlist(self, mba, lst, fullsize) -> bool Create operand from mlist_t.
 
"bool" create_from_ivlset (self, "mba_t" mba, "ivlset_t" ivs, "sval_t" fullsize)
 create_from_ivlset(self, mba, ivs, fullsize) -> bool Create operand from ivlset_t.
 
"void" create_from_vdloc (self, "mba_t" mba, "vdloc_t" loc, "int" _size)
 create_from_vdloc(self, mba, loc, _size) Create operand from vdloc_t.
 
"void" create_from_scattered_vdloc (self, "mba_t" mba, "char const *" name, "tinfo_t" type, "vdloc_t" loc)
 create_from_scattered_vdloc(self, mba, name, type, loc) Create operand from scattered vdloc_t.
 
"void" create_from_insn (self, "minsn_t" m)
 create_from_insn(self, m) Create operand from an instruction.
 
"void" make_number (self, *args)
 make_number(self, _value, _size, _ea=BADADDR, opnum=0) Create an integer constant operand.
 
"bool" make_fpnum (self, "void const *" bytes)
 make_fpnum(self, bytes) -> bool Create a floating point constant operand.
 
"void" make_reg (self, *args)
 make_reg(self, reg)
 
"void" make_gvar (self, "ea_t" ea)
 make_gvar(self, ea) Create a global variable operand.
 
"void" make_stkvar (self, "mba_t" mba, "sval_t" off)
 make_stkvar(self, mba, off)
 
"void" make_reg_pair (self, "int" loreg, "int" hireg, "int" halfsize)
 make_reg_pair(self, loreg, hireg, halfsize) Create pair of registers.
 
"void" make_insn (self, "minsn_t" ins)
 make_insn(self, ins) Create a nested instruction.
 
"void" make_blkref (self, "int" blknum)
 make_blkref(self, blknum) Create a global variable operand.
 
"void" make_helper (self, "char const *" name)
 make_helper(self, name) Create a helper operand.
 
"bool" empty (self)
 empty(self) -> bool
 
"bool" is_reg (self, *args)
 is_reg(self) -> bool Is the specified register of the specified size? is_reg(self, _r) -> bool
 
"bool" is_arglist (self)
 is_arglist(self) -> bool Is a list of arguments?
 
"bool" is_cc (self)
 is_cc(self) -> bool Is a condition code?
 
"bool" is_bit_reg (self, *args)
 is_bit_reg(self, reg) -> bool Is a bit register? This includes condition codes and eventually other bit registers
 
"bool" is_kreg (self)
 is_kreg(self) -> bool Is a kernel register?
 
"bool" is_mob (self, "int" serial)
 is_mob(self, serial) -> bool Is a block reference to the specified block?
 
"bool" is_scattered (self)
 is_scattered(self) -> bool Is a scattered operand?
 
"bool" is_glbaddr (self, *args)
 is_glbaddr(self) -> bool Is address of the specified global memory cell? is_glbaddr(self, ea) -> bool
 
"bool" is_stkaddr (self)
 is_stkaddr(self) -> bool Is address of a stack variable?
 
"bool" is_insn (self, *args)
 is_insn(self) -> bool Is a sub-instruction with the specified opcode? is_insn(self, code) -> bool
 
"bool" has_side_effects (self, "bool" include_ldx_and_divs=False)
 has_side_effects(self, include_ldx_and_divs=False) -> bool Has any side effects?
 
"bool" may_use_aliased_memory (self)
 may_use_aliased_memory(self) -> bool Is it possible for the operand to use aliased memory?
 
"bool" is01 (self)
 is01(self) -> bool 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.
 
"bool" is_sign_extended_from (self, "int" nbytes)
 is_sign_extended_from(self, nbytes) -> bool Does the high part of the operand consist of the sign bytes?
 
"bool" is_zero_extended_from (self, "int" nbytes)
 is_zero_extended_from(self, nbytes) -> bool Does the high part of the operand consist of zero bytes?
 
"bool" is_extended_from (self, "int" nbytes, "bool" is_signed)
 is_extended_from(self, nbytes, is_signed) -> bool Does the high part of the operand consist of zero or sign bytes?
 
"bool" equal_mops (self, "mop_t" rop, "int" eqflags)
 equal_mops(self, rop, eqflags) -> bool Compare operands.
 
"bool" __eq__ (self, "mop_t" rop)
 eq(self, rop) -> bool
 
"bool" __ne__ (self, "mop_t" rop)
 ne(self, rop) -> bool
 
"bool" __lt__ (self, "mop_t" rop)
 lt(self, rop) -> bool
 
"int" lexcompare (self, "mop_t" rop)
 lexcompare(self, rop) -> int
 
"int" for_all_ops (self, "mop_visitor_t" mv, "tinfo_t" type=None, "bool" is_target=False)
 for_all_ops(self, mv, type=None, is_target=False) -> int Visit the operand and all its sub-operands.
 
"int" for_all_scattered_submops (self, "scif_visitor_t" sv)
 for_all_scattered_submops(self, sv) -> int Visit all sub-operands of a scattered operand.
 
"uint64" value (self, "bool" is_signed)
 value(self, is_signed) -> uint64 Retrieve value of a constant integer operand.
 
"int64" signed_value (self)
 signed_value(self) -> int64
 
"uint64" unsigned_value (self)
 unsigned_value(self) -> uint64
 
"void" update_numop_value (self, "uint64" val)
 update_numop_value(self, val)
 
"bool" is_constant (self, "bool" is_signed=True)
 is_constant(self, is_signed=True) -> bool Retrieve value of a constant integer operand.
 
"bool" is_equal_to (self, "uint64" n, "bool" is_signed=True)
 is_equal_to(self, n, is_signed=True) -> bool
 
"bool" is_zero (self)
 is_zero(self) -> bool
 
"bool" is_one (self)
 is_one(self) -> bool
 
"bool" is_positive_constant (self)
 is_positive_constant(self) -> bool
 
"bool" is_negative_constant (self)
 is_negative_constant(self) -> bool
 
"ssize_t" get_stkvar (self, "udm_t" udm=None, "uval_t *" p_idaoff=None)
 get_stkvar(self, udm=None, p_idaoff=None) -> ssize_t Retrieve the referenced stack variable.
 
"bool" get_stkoff (self, "sval_t *" p_vdoff)
 get_stkoff(self, p_vdoff) -> bool Get the referenced stack offset.
 
"minsn_t *" get_insn (self, *args)
 get_insn(self, code) -> minsn_t
 
"bool" make_low_half (self, "int" width)
 make_low_half(self, width) -> bool Make the low part of the operand.
 
"bool" make_high_half (self, "int" width)
 make_high_half(self, width) -> bool Make the high part of the operand.
 
"bool" make_first_half (self, "int" width)
 make_first_half(self, width) -> bool Make the first part of the operand.
 
"bool" make_second_half (self, "int" width)
 make_second_half(self, width) -> bool Make the second part of the operand.
 
"bool" shift_mop (self, "int" offset)
 shift_mop(self, offset) -> bool Shift the operand.
 
"bool" change_size (self, "int" nsize, "side_effect_t" sideff=WITH_SIDEFF)
 change_size(self, nsize, sideff=WITH_SIDEFF) -> bool Change the operand size.
 
"bool" double_size (self, "side_effect_t" sideff=WITH_SIDEFF)
 double_size(self, sideff=WITH_SIDEFF) -> bool
 
"bool" preserve_side_effects (self, "mblock_t" blk, "minsn_t" top, "bool *" moved_calls=None)
 preserve_side_effects(self, blk, top, moved_calls=None) -> bool Move subinstructions with side effects out of the operand.
 
"void" apply_ld_mcode (self, "mcode_t" mcode, "ea_t" ea, "int" newsize)
 apply_ld_mcode(self, mcode, ea, newsize) Apply a unary opcode to the operand.
 
"void" apply_xdu (self, "ea_t" ea, "int" newsize)
 apply_xdu(self, ea, newsize)
 
"void" apply_xds (self, "ea_t" ea, "int" newsize)
 apply_xds(self, ea, newsize)
 
 replace_by (self, o)
 

Static Public Attributes

str t = property(_ida_hexrays.mop_t_t_get, _ida_hexrays.mop_t_t_set, doc=)
 
str oprops = property(_ida_hexrays.mop_t_oprops_get, _ida_hexrays.mop_t_oprops_set, doc=)
 
str valnum = property(_ida_hexrays.mop_t_valnum_get, _ida_hexrays.mop_t_valnum_set, doc=)
 
str size = property(_ida_hexrays.mop_t_size_get, _ida_hexrays.mop_t_size_set, doc=)
 

Protected Member Functions

"void" _print (self, *args)
 _print(self, shins_flags=0x04|0x02)
 
"void" _make_reg (self, *args)
 _make_reg(self, reg)
 
"void" _make_lvar (self, "mba_t" mba, "int" idx, "sval_t" off=0)
 _make_lvar(self, mba, idx, off=0)
 
"void" _make_gvar (self, "ea_t" ea)
 _make_gvar(self, ea)
 
"void" _make_stkvar (self, "mba_t" mba, "sval_t" off)
 _make_stkvar(self, mba, off)
 
"void" _make_insn (self, "minsn_t" ins)
 _make_insn(self, ins)
 
"void" _make_blkref (self, "int" blknum)
 _make_blkref(self, blknum)
 
"void" _make_strlit (self, "char const *" str)
 _make_strlit(self, str)
 
"void" _make_callinfo (self, "mcallinfo_t" fi)
 _make_callinfo(self, fi)
 
"void" _make_cases (self, "mcases_t" _cases)
 _make_cases(self, _cases)
 
"void" _make_pair (self, "mop_pair_t" _pair)
 _make_pair(self, _pair)
 
"void" _register (self)
 _register(self)
 
"void" _deregister (self)
 _deregister(self)
 
"mopt_t" _get_t (self)
 _get_t(self) -> mopt_t
 
"void" _set_t (self, "mopt_t" v)
 _set_t(self, v)
 
 _ensure_no_t (self)
 
"PyObject *" _obj_id (self)
 _obj_id(self) -> PyObject *
 
 _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)
 _get_nnn(self) -> mnumber_t
 
"void" _set_nnn (self, "mnumber_t" _v)
 _set_nnn(self, _v)
 
"minsn_t *" _get_d (self)
 _get_d(self) -> minsn_t
 
"void" _set_d (self, "minsn_t" _v)
 _set_d(self, _v)
 
"stkvar_ref_t *" _get_s (self)
 _get_s(self) -> stkvar_ref_t
 
"void" _set_s (self, "stkvar_ref_t" _v)
 _set_s(self, _v)
 
"mcallinfo_t *" _get_f (self)
 _get_f(self) -> mcallinfo_t
 
"void" _set_f (self, "mcallinfo_t" _v)
 _set_f(self, _v)
 
"lvar_ref_t *" _get_l (self)
 _get_l(self) -> lvar_ref_t
 
"void" _set_l (self, "lvar_ref_t" _v)
 _set_l(self, _v)
 
"mop_addr_t *" _get_a (self)
 _get_a(self) -> mop_addr_t
 
"void" _set_a (self, "mop_addr_t" _v)
 _set_a(self, _v)
 
"mcases_t *" _get_c (self)
 _get_c(self) -> mcases_t
 
"void" _set_c (self, "mcases_t" _v)
 _set_c(self, _v)
 
"fnumber_t *" _get_fpc (self)
 _get_fpc(self) -> fnumber_t
 
"void" _set_fpc (self, "fnumber_t" _v)
 _set_fpc(self, _v)
 
"mop_pair_t *" _get_pair (self)
 _get_pair(self) -> mop_pair_t
 
"void" _set_pair (self, "mop_pair_t" _v)
 _set_pair(self, _v)
 
"scif_t *" _get_scif (self)
 _get_scif(self) -> scif_t
 
"void" _set_scif (self, "scif_t" _v)
 _set_scif(self, _v)
 
"mreg_t" _get_r (self)
 _get_r(self) -> mreg_t
 
"void" _set_r (self, "mreg_t" _v)
 _set_r(self, _v)
 
"ea_t" _get_g (self)
 _get_g(self) -> ea_t
 
"void" _set_g (self, "ea_t" _v)
 _set_g(self, _v)
 
"int" _get_b (self)
 _get_b(self) -> int
 
"void" _set_b (self, "int" _v)
 _set_b(self, _v)
 
"char const *" _get_cstr (self)
 _get_cstr(self) -> char const *
 
"void" _set_cstr (self, "char const *" _v)
 _set_cstr(self, _v)
 
"char const *" _get_helper (self)
 _get_helper(self) -> char const *
 
"void" _set_helper (self, "char const *" _v)
 _set_helper(self, _v)
 

Properties

bool thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
 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 )
Parameters
ropmop_t const &

init(self, _r, _s) -> mop_t

Parameters
_rmreg_t
_sint

Reimplemented in mcallarg_t, and mop_addr_t.

Member Function Documentation

◆ __eq__()

"bool" __eq__ ( self,
"mop_t" rop )
Parameters
ropmop_t const &

◆ __lt__()

"bool" __lt__ ( self,
"mop_t" rop )
Parameters
ropmop_t const &

◆ __ne__()

"bool" __ne__ ( self,
"mop_t" rop )
Parameters
ropmop_t const &

◆ _acquire_ownership()

_acquire_ownership ( self,
v,
acquire )
protected

◆ _deregister()

"void" _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()

"char const *" _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()

"ea_t" _get_g ( self)
protected

◆ _get_helper()

"char const *" _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()

"void" _make_blkref ( self,
"int" blknum )
protected

Parameters

blknum: int

◆ _make_callinfo()

"void" _make_callinfo ( self,
"mcallinfo_t" fi )
protected

Parameters

fi: mcallinfo_t *

◆ _make_cases()

"void" _make_cases ( self,
"mcases_t" _cases )
protected

Parameters

_cases: mcases_t *

◆ _make_gvar()

"void" _make_gvar ( self,
"ea_t" ea )
protected

Parameters

ea: ea_t

◆ _make_insn()

"void" _make_insn ( self,
"minsn_t" ins )
protected

Parameters

ins: minsn_t *

◆ _make_lvar()

"void" _make_lvar ( self,
"mba_t" mba,
"int" idx,
"sval_t" off = 0 )
protected

Parameters

mba: mba_t * idx: int off: sval_t

◆ _make_pair()

"void" _make_pair ( self,
"mop_pair_t" _pair )
protected

Parameters

_pair: mop_pair_t *

◆ _make_reg()

"void" _make_reg ( self,
* args )
protected

Parameters

reg: mreg_t

_make_reg(self, reg, _size)

Parameters

reg: mreg_t _size: int

◆ _make_stkvar()

"void" _make_stkvar ( self,
"mba_t" mba,
"sval_t" off )
protected

Parameters

mba: mba_t * off: sval_t

◆ _make_strlit()

"void" _make_strlit ( self,
"char const *" str )
protected

Parameters

str: char const *

◆ _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()

"void" _print ( self,
* args )
protected

Parameters

shins_flags: int

Reimplemented in mcallarg_t.

◆ _register()

"void" _register ( self)
protected

◆ _set_a()

"void" _set_a ( self,
"mop_addr_t" _v )
protected

Parameters

_v: mop_addr_t *

◆ _set_b()

"void" _set_b ( self,
"int" _v )
protected

Parameters

_v: int

◆ _set_c()

"void" _set_c ( self,
"mcases_t" _v )
protected

Parameters

_v: mcases_t *

◆ _set_cstr()

"void" _set_cstr ( self,
"char const *" _v )
protected

Parameters

_v: char const *

◆ _set_d()

"void" _set_d ( self,
"minsn_t" _v )
protected

Parameters

_v: minsn_t *

◆ _set_f()

"void" _set_f ( self,
"mcallinfo_t" _v )
protected

Parameters

_v: mcallinfo_t *

◆ _set_fpc()

"void" _set_fpc ( self,
"fnumber_t" _v )
protected

Parameters

_v: fnumber_t *

◆ _set_g()

"void" _set_g ( self,
"ea_t" _v )
protected

Parameters

_v: ea_t

◆ _set_helper()

"void" _set_helper ( self,
"char const *" _v )
protected

Parameters

_v: char const *

◆ _set_l()

"void" _set_l ( self,
"lvar_ref_t" _v )
protected

Parameters

_v: lvar_ref_t *

◆ _set_nnn()

"void" _set_nnn ( self,
"mnumber_t" _v )
protected

Parameters

_v: mnumber_t *

◆ _set_pair()

"void" _set_pair ( self,
"mop_pair_t" _v )
protected

Parameters

_v: mop_pair_t *

◆ _set_r()

"void" _set_r ( self,
"mreg_t" _v )
protected

Parameters

_v: mreg_t

◆ _set_s()

"void" _set_s ( self,
"stkvar_ref_t" _v )
protected

Parameters

_v: stkvar_ref_t *

◆ _set_scif()

"void" _set_scif ( self,
"scif_t" _v )
protected

Parameters

_v: scif_t *

◆ _set_t()

"void" _set_t ( self,
"mopt_t" v )
protected

Parameters

v: mopt_t

◆ apply_ld_mcode()

"void" apply_ld_mcode ( self,
"mcode_t" mcode,
"ea_t" ea,
"int" newsize )
Parameters
mcode(C++: mcode_t) opcode to apply. it must accept 'l' and 'd' operands but not 'r'.
ea(C++: ea_t) value of minsn_t.ea for the newly created insruction
newsize(C++: int) new operand size Example: apply_ld_mcode(m_low) will convert op => low(op)

◆ apply_xds()

"void" apply_xds ( self,
"ea_t" ea,
"int" newsize )
Parameters
eaea_t
newsizeint

◆ apply_xdu()

"void" apply_xdu ( self,
"ea_t" ea,
"int" newsize )
Parameters
eaea_t
newsizeint

◆ assign()

"mop_t &" assign ( self,
"mop_t" rop )
Parameters
ropmop_t const &

◆ change_size()

"bool" change_size ( self,
"int" nsize,
"side_effect_t" sideff = WITH_SIDEFF )

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

Parameters
nsize(C++: int) new operand size
sideff(C++: side_effect_t) may modify the database because of the size change?
Returns
: success

◆ create_from_insn()

"void" create_from_insn ( self,
"minsn_t" m )

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.

Parameters
m(C++: const minsn_t *) instruction to embed into operand. may not be nullptr.

◆ create_from_ivlset()

"bool" create_from_ivlset ( self,
"mba_t" mba,
"ivlset_t" ivs,
"sval_t" fullsize )

Example: if IVS contains [glbvar..glbvar+4), our operand will be (t=mop_v, g=&glbvar, size=4)

Parameters
mba(C++: mba_t *) pointer to microcode
ivs(C++: const ivlset_t &) set of memory intervals
fullsize(C++: sval_t) mba->fullsize
Returns
: success

◆ create_from_mlist()

"bool" create_from_mlist ( self,
"mba_t" mba,
"mlist_t" lst,
"sval_t" fullsize )

Example: if LST contains 4 bits for R0.4, our operand will be (t=mop_r, r=R0, size=4)

Parameters
mba(C++: mba_t *) pointer to microcode
lst(C++: const mlist_t &) list of locations
fullsize(C++: sval_t) mba->fullsize
Returns
: success

◆ create_from_scattered_vdloc()

"void" create_from_scattered_vdloc ( self,
"mba_t" mba,
"char const *" name,
"tinfo_t" type,
"vdloc_t" loc )

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})

Parameters
mba(C++: mba_t *) pointer to microcode
name(C++: const char *) name of the operand, if available
type(C++: tinfo_t) type of the operand, must be present
loc(C++: const vdloc_t &) a scattered location
Returns
: success

◆ create_from_vdloc()

"void" create_from_vdloc ( self,
"mba_t" mba,
"vdloc_t" loc,
"int" _size )

Example: if LOC contains (type=ALOC_REG1, r=R0), our operand will be (t=mop_r, r=R0, size=_SIZE)

Parameters
mba(C++: mba_t *) pointer to microcode
loc(C++: const vdloc_t &) location
_size(C++: int) operand size Note: this function cannot handle scattered locations.
Returns
: success

◆ double_size()

"bool" double_size ( self,
"side_effect_t" sideff = WITH_SIDEFF )
Parameters
sideffenum side_effect_t

◆ dstr()

"char const *" dstr ( self)

Reimplemented in mcallarg_t.

◆ empty()

"bool" empty ( self)

◆ equal_mops()

"bool" equal_mops ( self,
"mop_t" rop,
"int" eqflags )

This is the main comparison function for operands.

Parameters
rop(C++: const mop_t &) operand to compare with
eqflags(C++: int) combination of comparison bits bits

◆ erase()

"void" erase ( self)

◆ erase_but_keep_size()

"void" 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 )

This function visits the current operand as well.

Parameters
mv(C++: mop_visitor_t &) visitor object
type(C++: const tinfo_t *) operand type
is_target(C++: bool) is a destination operand?

◆ for_all_scattered_submops()

"int" for_all_scattered_submops ( self,
"scif_visitor_t" sv )

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.

Parameters
sv(C++: scif_visitor_t &) visitor object

◆ get_insn()

"minsn_t *" get_insn ( self,
* args )
Parameters
codeenum mcode_t

◆ get_stkoff()

"bool" get_stkoff ( self,
"sval_t *" p_vdoff )

This function can also handle mop_sc if it is entirely mapped into a continuous stack region.

Parameters
p_vdoff(C++: sval_t *) the output buffer
Returns
: success

◆ get_stkvar()

"ssize_t" get_stkvar ( self,
"udm_t" udm = None,
"uval_t *" p_idaoff = None )
Parameters
udm(C++: udm_t *) stkvar, may be nullptr
p_idaoff(C++: uval_t *) 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 )
Parameters
include_ldx_and_divs(C++: bool) consider ldx/div/mod as having side effects?

◆ is01()

"bool" is01 ( self)

◆ is_arglist()

"bool" is_arglist ( self)

◆ is_bit_reg()

"bool" is_bit_reg ( self,
* args )
Parameters
reg(C++: mreg_t)

is_bit_reg(self) -> bool

◆ is_cc()

"bool" is_cc ( self)

◆ is_ccflags()

"bool" is_ccflags ( self)

◆ is_constant()

"bool" is_constant ( self,
"bool" is_signed = True )
Parameters
is_signed(C++: bool) 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 )
Parameters
nuint64
is_signedbool

◆ is_extended_from()

"bool" is_extended_from ( self,
"int" nbytes,
"bool" is_signed )
Parameters
nbytes(C++: int)
is_signed(C++: bool)

◆ is_glbaddr()

"bool" is_glbaddr ( self,
* args )
Parameters
eaea_t

◆ 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 )
Parameters
codeenum mcode_t

◆ is_kreg()

"bool" is_kreg ( self)

◆ is_lowaddr()

"bool" is_lowaddr ( self)

◆ is_mob()

"bool" is_mob ( self,
"int" serial )
Parameters
serial(C++: int)

◆ 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 )
Parameters
_rmreg_t

is_reg(self, _r, _size) -> bool

Parameters
_rmreg_t
_sizeint

◆ is_scattered()

"bool" is_scattered ( self)

◆ is_sign_extended_from()

"bool" is_sign_extended_from ( self,
"int" nbytes )
Parameters
nbytes(C++: int) 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_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 )
Parameters
nbytes(C++: int) 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 )
Parameters
ropmop_t const &

Reimplemented in mop_addr_t.

◆ make_blkref()

"void" make_blkref ( self,
"int" blknum )
Parameters
blknum(C++: int)

◆ make_first_half()

"bool" make_first_half ( self,
"int" width )

This function does not care about the memory endianness

Parameters
width(C++: int) the desired size of the operand part in bytes
Returns
: success

◆ make_fpnum()

"bool" make_fpnum ( self,
"void const *" bytes )
Parameters
bytes(C++: const void *) 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()

"void" make_gvar ( self,
"ea_t" ea )
Parameters
ea(C++: ea_t)

◆ make_helper()

"void" make_helper ( self,
"char const *" name )

A helper operand usually keeps a built-in function name like "va_start" It is essentially just an arbitrary identifier without any additional info.

Parameters
name(C++: const char *) char const *

◆ make_high_half()

"bool" make_high_half ( self,
"int" width )

This function takes into account the memory endianness (byte sex)

Parameters
width(C++: int) the desired size of the operand part in bytes
Returns
: success

◆ make_insn()

"void" make_insn ( self,
"minsn_t" ins )
Parameters
ins(C++: minsn_t *)

◆ make_low_half()

"bool" make_low_half ( self,
"int" width )

This function takes into account the memory endianness (byte sex)

Parameters
width(C++: int) the desired size of the operand part in bytes
Returns
: success

◆ make_number()

"void" make_number ( self,
* args )
Parameters
_value(C++: uint64) value to store in the operand
_size(C++: int) size of the value in bytes (1,2,4,8)
_ea(C++: ea_t) address of the processor instruction that made the value
opnum(C++: int) operand number of the processor instruction

◆ make_reg()

"void" make_reg ( self,
* args )
Parameters
regmreg_t

make_reg(self, reg, _size)

Parameters
regmreg_t
_sizeint

◆ make_reg_pair()

"void" make_reg_pair ( self,
"int" loreg,
"int" hireg,
"int" halfsize )
Parameters
loreg(C++: int) register holding the low part of the value
hireg(C++: int) register holding the high part of the value
halfsize(C++: int) the size of each of loreg/hireg

◆ make_second_half()

"bool" make_second_half ( self,
"int" width )

This function does not care about the memory endianness

Parameters
width(C++: int) the desired size of the operand part in bytes
Returns
: success

◆ make_stkvar()

"void" make_stkvar ( self,
"mba_t" mba,
"sval_t" off )
Parameters
mbamba_t *
offsval_t

◆ may_use_aliased_memory()

"bool" may_use_aliased_memory ( self)

◆ preserve_side_effects()

"bool" preserve_side_effects ( self,
"mblock_t" blk,
"minsn_t" top,
"bool *" moved_calls = None )

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.

Parameters
blk(C++: mblock_t *) current block
top(C++: minsn_t *) top level instruction that contains our operand
moved_calls(C++: bool *) 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()

"void" set_impptr_done ( self)

◆ set_lowaddr()

"void" set_lowaddr ( self)

◆ set_udt()

"void" set_udt ( self)

◆ set_undef_val()

"void" set_undef_val ( self)

◆ shift_mop()

"bool" shift_mop ( self,
"int" offset )

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

Parameters
offset(C++: int) shift count (the number of bytes to shift)
Returns
: success

◆ signed_value()

"int64" signed_value ( self)

◆ swap()

"void" swap ( self,
"mop_t" rop )
Parameters
ropmop_t &

◆ unsigned_value()

"uint64" unsigned_value ( self)

◆ update_numop_value()

"void" update_numop_value ( self,
"uint64" val )
Parameters
valuint64

◆ value()

"uint64" value ( self,
"bool" is_signed )

These functions can be called only for mop_n operands. See is_constant() that can be called on any operand.

Parameters
is_signed(C++: bool)

◆ zero()

"void" zero ( self)

Member Data Documentation

◆ oprops

str oprops = property(_ida_hexrays.mop_t_oprops_get, _ida_hexrays.mop_t_oprops_set, doc=)
static

◆ size

str size = property(_ida_hexrays.mop_t_size_get, _ida_hexrays.mop_t_size_set, doc=)
static

◆ t

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

◆ valnum

str valnum = property(_ida_hexrays.mop_t_valnum_get, _ida_hexrays.mop_t_valnum_set, doc=)
static

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 = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
static

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