A call argument. More...
#include <hexrays.hpp>
Public Member Functions | |
mcallarg_t (const mop_t &rarg) | |
void | copy_mop (const mop_t &op) |
void | print (qstring *vout, int shins_flags=SHINS_SHORT|SHINS_VALNUM) const |
const char * | dstr () const |
void | set_regarg (mreg_t mr, int sz, const tinfo_t &tif) |
void | set_regarg (mreg_t mr, const tinfo_t &tif) |
void | set_regarg (mreg_t mr, char dt, type_sign_t sign=type_unsigned) |
void | make_int (int val, ea_t val_ea, int opno=0) |
void | make_uint (int val, ea_t val_ea, int opno=0) |
Public Member Functions inherited from mop_t | |
void | set_impptr_done () |
void | set_udt () |
void | set_undef_val () |
void | set_lowaddr () |
bool | is_impptr_done () const |
bool | is_udt () const |
bool | probably_floating () const |
bool | is_undef_val () const |
bool | is_lowaddr () const |
bool | is_ccflags () const |
bool | is_pcval () const |
bool | is_glbaddr_from_fixup () const |
mop_t (const mop_t &rop) | |
mop_t (mreg_t _r, int _s) | |
mop_t & | operator= (const mop_t &rop) |
mop_t & | assign (const mop_t &rop) |
void | zero () |
void | swap (mop_t &rop) |
void | erase () |
void | erase_but_keep_size () |
void | print (qstring *vout, int shins_flags=SHINS_SHORT|SHINS_VALNUM) const |
const char * | dstr () const |
bool | create_from_mlist (mba_t *mba, const mlist_t &lst, sval_t fullsize) |
Create operand from mlist_t. More... | |
bool | create_from_ivlset (mba_t *mba, const ivlset_t &ivs, sval_t fullsize) |
Create operand from ivlset_t. More... | |
void | create_from_vdloc (mba_t *mba, const vdloc_t &loc, int _size) |
Create operand from vdloc_t. More... | |
void | create_from_scattered_vdloc (mba_t *mba, const char *name, tinfo_t type, const vdloc_t &loc) |
Create operand from scattered vdloc_t. More... | |
void | create_from_insn (const minsn_t *m) |
Create operand from an instruction. More... | |
void | make_number (uint64 _value, int _size, ea_t _ea=BADADDR, int opnum=0) |
Create an integer constant operand. More... | |
bool | make_fpnum (const void *bytes, size_t _size) |
Create a floating point constant operand. More... | |
void | _make_reg (mreg_t reg) |
Create a register operand without erasing previous data. More... | |
void | _make_reg (mreg_t reg, int _size) |
void | make_reg (mreg_t reg) |
Create a register operand. More... | |
void | make_reg (mreg_t reg, int _size) |
void | _make_lvar (mba_t *mba, int idx, sval_t off=0) |
Create a local variable operand. More... | |
void | _make_gvar (ea_t ea) |
Create a global variable operand without erasing previous data. More... | |
void | make_gvar (ea_t ea) |
Create a global variable operand. More... | |
void | _make_stkvar (mba_t *mba, sval_t off) |
Create a stack variable operand. More... | |
void | make_stkvar (mba_t *mba, sval_t off) |
void | make_reg_pair (int loreg, int hireg, int halfsize) |
Create pair of registers. More... | |
void | _make_insn (minsn_t *ins) |
Create a nested instruction without erasing previous data. More... | |
void | make_insn (minsn_t *ins) |
Create a nested instruction. More... | |
void | _make_blkref (int blknum) |
Create a block reference operand without erasing previous data. More... | |
void | make_blkref (int blknum) |
Create a global variable operand. More... | |
void | make_helper (const char *name) |
Create a helper operand. More... | |
void | _make_strlit (const char *str) |
Create a constant string operand. More... | |
void | _make_strlit (qstring *str) |
void | _make_callinfo (mcallinfo_t *fi) |
Create a call info operand without erasing previous data. More... | |
void | _make_cases (mcases_t *_cases) |
Create a 'switch cases' operand without erasing previous data. More... | |
void | _make_pair (mop_pair_t *_pair) |
Create a pair operand without erasing previous data. More... | |
bool | empty () const |
bool | is_reg () const |
Is a register operand? See also get_mreg_name() More... | |
bool | is_reg (mreg_t _r) const |
Is the specified register? More... | |
bool | is_reg (mreg_t _r, int _size) const |
Is the specified register of the specified size? More... | |
bool | is_arglist () const |
Is a list of arguments? More... | |
bool | is_cc () const |
Is a condition code? More... | |
bool | is_bit_reg () const |
bool | is_kreg () const |
Is a kernel register? More... | |
bool | is_mob (int serial) const |
Is a block reference to the specified block? More... | |
bool | is_scattered () const |
Is a scattered operand? More... | |
bool | is_glbaddr () const |
Is address of a global memory cell? More... | |
bool | is_glbaddr (ea_t ea) const |
Is address of the specified global memory cell? More... | |
bool | is_stkaddr () const |
Is address of a stack variable? More... | |
bool | is_insn () const |
Is a sub-instruction? More... | |
bool | is_insn (mcode_t code) const |
Is a sub-instruction with the specified opcode? More... | |
bool | has_side_effects (bool include_ldx_and_divs=false) const |
Has any side effects? More... | |
bool | may_use_aliased_memory () const |
Is it possible for the operand to use aliased memory? More... | |
bool | is01 () const |
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. More... | |
bool | is_sign_extended_from (int nbytes) const |
Does the high part of the operand consist of the sign bytes? More... | |
bool | is_zero_extended_from (int nbytes) const |
Does the high part of the operand consist of zero bytes? More... | |
bool | is_extended_from (int nbytes, bool is_signed) const |
Does the high part of the operand consist of zero or sign bytes? More... | |
bool | equal_mops (const mop_t &rop, int eqflags) const |
Compare operands. More... | |
bool | operator== (const mop_t &rop) const |
bool | operator!= (const mop_t &rop) const |
bool | operator< (const mop_t &rop) const |
Lexographical operand comparison. More... | |
int | lexcompare (const mop_t &rop) const |
int | for_all_ops (mop_visitor_t &mv, const tinfo_t *type=nullptr, bool is_target=false) |
Visit the operand and all its sub-operands. More... | |
int | for_all_scattered_submops (scif_visitor_t &sv) const |
Visit all sub-operands of a scattered operand. More... | |
uint64 | value (bool is_signed) const |
Retrieve value of a constant integer operand. More... | |
int64 | signed_value () const |
uint64 | unsigned_value () const |
void | update_numop_value (uint64 val) |
bool | is_constant (uint64 *out=nullptr, bool is_signed=true) const |
Retrieve value of a constant integer operand. More... | |
bool | is_equal_to (uint64 n, bool is_signed=true) const |
bool | is_zero () const |
bool | is_one () const |
bool | is_positive_constant () const |
bool | is_negative_constant () const |
member_t * | get_stkvar (uval_t *p_off) const |
Retrieve the referenced stack variable. More... | |
bool | get_stkoff (sval_t *p_off) const |
Get the referenced stack offset. More... | |
const minsn_t * | get_insn (mcode_t code) const |
Get subinstruction of the operand. More... | |
minsn_t * | get_insn (mcode_t code) |
bool | make_low_half (int width) |
Make the low part of the operand. More... | |
bool | make_high_half (int width) |
Make the high part of the operand. More... | |
bool | make_first_half (int width) |
Make the first part of the operand. More... | |
bool | make_second_half (int width) |
Make the second part of the operand. More... | |
bool | shift_mop (int offset) |
Shift the operand. More... | |
bool | change_size (int nsize, side_effect_t sideff=WITH_SIDEFF) |
Change the operand size. More... | |
bool | double_size (side_effect_t sideff=WITH_SIDEFF) |
bool | preserve_side_effects (mblock_t *blk, minsn_t *top, bool *moved_calls=nullptr) |
Move subinstructions with side effects out of the operand. More... | |
void | apply_ld_mcode (mcode_t mcode, ea_t ea, int newsize) |
Apply a unary opcode to the operand. More... | |
void | apply_xdu (ea_t ea, int newsize) |
void | apply_xds (ea_t ea, int newsize) |
Public Attributes | |
ea_t | ea = BADADDR |
address where the argument was initialized. More... | |
tinfo_t | type |
formal argument type More... | |
qstring | name |
formal argument name More... | |
argloc_t | argloc |
ida argloc More... | |
uint32 | flags = 0 |
FAI_... More... | |
Public Attributes inherited from mop_t | |
mopt_t | t |
Operand type. More... | |
uint8 | oprops |
Operand properties. More... | |
uint16 | valnum |
Value number. More... | |
int | size |
Operand size. More... | |
union { | |
mreg_t r | |
mnumber_t * nnn | |
minsn_t * d | |
stkvar_ref_t * s | |
ea_t g | |
int b | |
mcallinfo_t * f | |
lvar_ref_t * l | |
mop_addr_t * a | |
char * helper | |
char * cstr | |
mcases_t * c | |
fnumber_t * fpc | |
mop_pair_t * pair | |
scif_t * scif | |
}; | |
The following union holds additional details about the operand. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from mop_t | |
static bool | is_bit_reg (mreg_t reg) |
Is a bit register? This includes condition codes and eventually other bit registers. More... | |
Detailed Description
A call argument.
- Examples
- hexrays_sample10.cpp, and hexrays_sample18.cpp.
Definition at line 3010 of file hexrays.hpp.
Constructor & Destructor Documentation
◆ mcallarg_t() [1/2]
mcallarg_t::mcallarg_t | ( | ) |
Definition at line 3020 of file hexrays.hpp.
◆ mcallarg_t() [2/2]
mcallarg_t::mcallarg_t | ( | const mop_t & | rarg | ) |
Definition at line 3021 of file hexrays.hpp.
Member Function Documentation
◆ copy_mop()
void mcallarg_t::copy_mop | ( | const mop_t & | op | ) |
Definition at line 3022 of file hexrays.hpp.
◆ dstr()
const char * mcallarg_t::dstr | ( | ) | const |
Definition at line 10761 of file hexrays.hpp.
◆ make_int()
void mcallarg_t::make_int | ( | int | val, |
ea_t | val_ea, | ||
int | opno = 0 |
||
) |
Definition at line 3035 of file hexrays.hpp.
◆ make_uint()
void mcallarg_t::make_uint | ( | int | val, |
ea_t | val_ea, | ||
int | opno = 0 |
||
) |
Definition at line 3040 of file hexrays.hpp.
◆ print()
void mcallarg_t::print | ( | qstring * | vout, |
int | shins_flags = SHINS_SHORT|SHINS_VALNUM |
||
) | const |
Definition at line 10755 of file hexrays.hpp.
◆ set_regarg() [1/3]
void mcallarg_t::set_regarg | ( | mreg_t | mr, |
char | dt, | ||
type_sign_t | sign = type_unsigned |
||
) |
Definition at line 3030 of file hexrays.hpp.
◆ set_regarg() [2/3]
void mcallarg_t::set_regarg | ( | mreg_t | mr, |
const tinfo_t & | tif | ||
) |
Definition at line 3026 of file hexrays.hpp.
◆ set_regarg() [3/3]
void mcallarg_t::set_regarg | ( | mreg_t | mr, |
int | sz, | ||
const tinfo_t & | tif | ||
) |
Definition at line 10767 of file hexrays.hpp.
Member Data Documentation
◆ argloc
argloc_t mcallarg_t::argloc |
ida argloc
Definition at line 3017 of file hexrays.hpp.
◆ ea
ea_t mcallarg_t::ea = BADADDR |
address where the argument was initialized.
BADADDR means unknown.
Definition at line 3013 of file hexrays.hpp.
◆ flags
uint32 mcallarg_t::flags = 0 |
FAI_...
Definition at line 3018 of file hexrays.hpp.
◆ name
qstring mcallarg_t::name |
formal argument name
Definition at line 3016 of file hexrays.hpp.
◆ type
tinfo_t mcallarg_t::type |