Miasm2
 All Classes Namespaces Files Functions Variables Typedefs Properties Macros
Classes | Functions | Variables
miasm2.arch.x86.arch Namespace Reference

Classes

class  additional_info
 
class  bs_ad_mode
 
class  bs_cl1
 
class  bs_cond_disp
 
class  bs_cond_imm
 
class  bs_cond_imm64
 
class  bs_cond_index
 
class  bs_cond_scale
 
class  bs_cs
 
class  bs_disp
 
class  bs_ds
 
class  bs_eax
 
class  bs_edx
 
class  bs_es
 
class  bs_fbit
 
class  bs_fs
 
class  bs_gs
 
class  bs_mem
 
class  bs_modname_jecx
 
class  bs_modname_mode
 
class  bs_modname_size
 
class  bs_moff
 
class  bs_movoff
 
class  bs_msegoff
 
class  bs_op_mode
 
class  bs_op_mode64
 
class  bs_op_mode_no64
 
class  bs_op_modeno64
 
class  bs_rel_off
 
class  bs_rel_off08
 
class  bs_s08
 
class  bs_seg
 
class  bs_sib_base
 
class  bs_sib_index
 
class  bs_sib_scale
 
class  bs_ss
 
class  bs_st
 
class  field_size
 
class  group
 
class  instruction_x86
 
class  mn_x86
 
class  r_al
 
class  r_ax
 
class  r_cl
 
class  r_dx
 
class  r_eax
 
class  r_rax
 
class  x86_08
 
class  x86_08_ne
 
class  x86_16
 
class  x86_16_ne
 
class  x86_32
 
class  x86_32_ne
 
class  x86_64
 
class  x86_64_ne
 
class  x86_imm
 
class  x86_imm_fix
 
class  x86_reg
 
class  x86_reg_noarg
 
class  x86_reg_st
 
class  x86_rm_arg
 
class  x86_rm_cr
 
class  x86_rm_dr
 
class  x86_rm_flt
 
class  x86_rm_m08
 
class  x86_rm_m16
 
class  x86_rm_m64
 
class  x86_rm_m80
 
class  x86_rm_mm
 
class  x86_rm_mm_m64
 
class  x86_rm_reg
 
class  x86_rm_reg_mm
 
class  x86_rm_reg_noarg
 
class  x86_rm_reg_xmm
 
class  x86_rm_sd
 
class  x86_rm_segm
 
class  x86_rm_sx
 
class  x86_rm_sxd
 
class  x86_rm_w8
 
class  x86_rm_wd
 
class  x86_rm_xmm
 
class  x86_rm_xmm_m32
 
class  x86_rm_xmm_m64
 
class  x86_s08to16
 
class  x86_s08to32
 
class  x86_s08to64
 
class  x86_s32to64
 

Functions

def reg2exprid
 
def parse_deref_reg
 
def parse_deref_int
 
def parse_deref_regint
 
def parse_deref_regreg
 
def parse_deref_regregint
 
def parse_deref_reg_intmreg
 
def parse_deref_reg_intmreg_int
 
def parse_deref_intmreg
 
def parse_deref_intmregint
 
def getreg
 
def parse_deref_ptr
 
def parse_deref_segmoff
 
def ast_id2expr
 
def ast_int2expr
 
def parse_deref_mem
 
def opmode_prefix
 
def admode_prefix
 
def v_opmode_info
 
def v_opmode
 
def v_admode_info
 
def v_admode
 
def offsize
 
def get_prefix
 
def getmodrm
 
def setmodrm
 
def sib
 
def gen_modrm_form
 
def exprfindmod
 
def test_addr_size
 
def parse_mem
 
def expr2modrm
 
def modrm2expr
 
def sib_cond
 
def rmmod
 
def addop
 
def print_size
 MMX/SSE/AVX operations  Categories are the same than here: https://software.intel.com/sites/landingpage/IntrinsicsGuide/. More...
 

Variables

tuple log = logging.getLogger("x86_arch")
 
tuple console_handler = logging.StreamHandler()
 
list conditional_branch
 
list unconditional_branch = ['JMP', 'JMPF']
 
string f_isad = "AD"
 
string f_s08 = "S08"
 
string f_u08 = "U08"
 
string f_s16 = "S16"
 
string f_u16 = "U16"
 
string f_s32 = "S32"
 
string f_u32 = "U32"
 
string f_s64 = "S64"
 
string f_u64 = "U64"
 
string f_imm = 'IMM'
 
dictionary f_imm2size
 
dictionary size2gpregs
 
dictionary replace_regs64
 
dictionary replace_regs32
 
dictionary replace_regs16
 
dictionary replace_regs
 
tuple PLUS = Suppress("+")
 
tuple MULT = Suppress("*")
 
tuple COLON = Suppress(":")
 
tuple LBRACK = Suppress("[")
 
tuple RBRACK = Suppress("]")
 
tuple dbreg = Group(gpregs16.parser | gpregs32.parser | gpregs64.parser)
 
tuple gpreg
 
tuple my_var_parser = parse_ast(ast_id2expr, ast_int2expr)
 
 int_or_expr = base_expr
 
tuple deref_mem_ad = Group(LBRACK + dbreg + RBRACK)
 
tuple deref_ptr
 
tuple PTR = Suppress('PTR')
 
tuple BYTE = Literal('BYTE')
 
tuple WORD = Literal('WORD')
 
tuple DWORD = Literal('DWORD')
 
tuple QWORD = Literal('QWORD')
 
tuple TBYTE = Literal('TBYTE')
 
tuple XMMWORD = Literal('XMMWORD')
 
dictionary MEMPREFIX2SIZE
 
tuple SIZE2MEMPREFIX = dict((x[1], x[0]) for x in MEMPREFIX2SIZE.items())
 
tuple mem_size = Group(BYTE | DWORD | QWORD | WORD | TBYTE | XMMWORD)
 
tuple deref_mem
 
tuple rmarg
 
tuple cl_or_imm = Group(r08_ecx.parser)
 
dictionary invmode = {16: 32, 32: 16}
 
list repeat_mn
 
dictionary segm2enc = {CS: 1, SS: 2, DS: 3, ES: 4, FS: 5, GS: 6}
 
tuple enc2segm = dict([(x[1], x[0]) for x in segm2enc.items()])
 
list db_afs_64 = []
 
list sib_64_s08_ebp = []
 
dictionary SIZE2XMMREG
 
tuple d_rex_p = bs(l=0, cls=(bs_fbit,), fname="rex_p")
 
tuple d_rex_w = bs(l=0, cls=(bs_fbit,), fname="rex_w")
 
tuple d_rex_r = bs(l=0, cls=(bs_fbit,), fname="rex_r")
 
tuple d_rex_x = bs(l=0, cls=(bs_fbit,), fname="rex_x")
 
tuple d_rex_b = bs(l=0, cls=(bs_fbit,), fname="rex_b")
 
tuple d_g1 = bs(l=0, cls=(bs_fbit,), fname="g1")
 
tuple d_g2 = bs(l=0, cls=(bs_fbit,), fname="g2")
 
tuple d_cl1 = bs(l=1, cls=(bs_cl1,), fname="cl1")
 
tuple w8 = bs(l=1, fname="w8")
 
tuple se = bs(l=1, fname="se")
 
tuple sx = bs(l=0, fname="sx")
 
tuple sxd = bs(l=0, fname="sx")
 
tuple xmmreg = bs(l=0, fname="xmmreg")
 
tuple mmreg = bs(l=0, fname="mmreg")
 
tuple pref_f2 = bs(l=0, fname="prefixed", default="\xf2")
 
tuple pref_f3 = bs(l=0, fname="prefixed", default="\xf3")
 
tuple pref_66 = bs(l=0, fname="prefixed", default="\x66")
 
tuple no_xmm_pref = bs(l=0, fname="no_xmm_pref")
 
tuple sib_scale = bs(l=2, cls=(bs_cond_scale,), fname = "sib_scale")
 
tuple sib_index = bs(l=3, cls=(bs_cond_index,), fname = "sib_index")
 
tuple sib_base = bs(l=3, cls=(bs_cond_index,), fname = "sib_base")
 
tuple disp = bs(l=0, cls=(bs_cond_disp,), fname = "disp")
 
tuple s08 = bs(l=8, cls=(bs_s08, ))
 
tuple u08 = bs(l=8, cls=(x86_08, m_arg))
 
tuple u07 = bs(l=7, cls=(x86_08, m_arg))
 
tuple u16 = bs(l=16, cls=(x86_16, m_arg))
 
tuple u32 = bs(l=32, cls=(x86_32, m_arg))
 
tuple s3264 = bs(l=32, cls=(x86_s32to64, m_arg))
 
tuple u08_3 = bs(l=0, cls=(x86_imm_fix, m_arg), ival = 3)
 
tuple d0 = bs("000", fname='reg')
 
tuple d1 = bs("001", fname='reg')
 
tuple d2 = bs("010", fname='reg')
 
tuple d3 = bs("011", fname='reg')
 
tuple d4 = bs("100", fname='reg')
 
tuple d5 = bs("101", fname='reg')
 
tuple d6 = bs("110", fname='reg')
 
tuple d7 = bs("111", fname='reg')
 
tuple sd = bs(l=1, fname="sd")
 
tuple wd = bs(l=1, fname="wd")
 
tuple stk = bs(l=0, fname="stk")
 
tuple d_imm64 = bs(l=0, fname="imm64")
 
tuple d_eax = bs(l=0, cls=(bs_eax, ), fname='eax')
 
tuple d_edx = bs(l=0, cls=(bs_edx, ), fname='edx')
 
tuple d_st = bs(l=0, cls=(x86_reg_st, ), fname='st')
 
tuple d_imm = bs(l=0, cls=(bs_cond_imm,), fname="imm")
 
tuple d_ax = bs(l=0, cls=(r_ax, ), fname='ax')
 
tuple d_dx = bs(l=0, cls=(r_dx, ), fname='dx')
 
tuple d_cl = bs(l=0, cls=(r_cl, ), fname='cl')
 
tuple d_cs = bs(l=0, cls=(bs_cs, ), fname='cs')
 
tuple d_ds = bs(l=0, cls=(bs_ds, ), fname='ds')
 
tuple d_es = bs(l=0, cls=(bs_es, ), fname='es')
 
tuple d_ss = bs(l=0, cls=(bs_ss, ), fname='ss')
 
tuple d_fs = bs(l=0, cls=(bs_fs, ), fname='fs')
 
tuple d_gs = bs(l=0, cls=(bs_gs, ), fname='gs')
 
tuple rel_off = bs(l=0, cls=(bs_rel_off,), fname="off", order=-1)
 
tuple rel_off08 = bs(l=8, cls=(bs_rel_off08,), fname="off", order=-1)
 
tuple moff = bs(l=0, cls=(bs_moff,), fname="off")
 
tuple msegoff = bs(l=16, cls=(bs_msegoff,), fname="mseg")
 
tuple movoff = bs(l=0, cls=(bs_movoff,), fname="off")
 
tuple mod = bs(l=2, fname="mod")
 
tuple mod_mem = bs(l=2, cls=(bs_mem,), fname="mod")
 
tuple rmreg = bs(l=3, cls=(x86_rm_reg, ), order =1, fname = "reg")
 
tuple reg = bs(l=3, cls=(x86_reg, ), order =1, fname = "reg")
 
tuple regnoarg = bs(l=3, default_val="000", order=1, fname="reg")
 
tuple segm = bs(l=3, cls=(x86_rm_segm, ), order =1, fname = "reg")
 
tuple crreg = bs(l=3, cls=(x86_rm_cr, ), order =1, fname = "reg")
 
tuple drreg = bs(l=3, cls=(x86_rm_dr, ), order =1, fname = "reg")
 
tuple mm_reg = bs(l=3, cls=(x86_rm_reg_mm, ), order =1, fname = "reg")
 
tuple xmm_reg = bs(l=3, cls=(x86_rm_reg_xmm, ), order =1, fname = "reg")
 
tuple fltreg = bs(l=3, cls=(x86_rm_flt, ), order =1, fname = "reg")
 
tuple rm = bs(l=3, fname="rm")
 
tuple rm_arg = bs(l=0, cls=(x86_rm_arg,), fname='rmarg')
 
tuple rm_arg_w8 = bs(l=0, cls=(x86_rm_w8,), fname='rmarg')
 
tuple rm_arg_sx = bs(l=0, cls=(x86_rm_sx,), fname='rmarg')
 
tuple rm_arg_sxd = bs(l=0, cls=(x86_rm_sxd,), fname='rmarg')
 
tuple rm_arg_sd = bs(l=0, cls=(x86_rm_sd,), fname='rmarg')
 
tuple rm_arg_wd = bs(l=0, cls=(x86_rm_wd,), fname='rmarg')
 
tuple rm_arg_m64 = bs(l=0, cls=(x86_rm_m64,), fname='rmarg')
 
tuple rm_arg_m80 = bs(l=0, cls=(x86_rm_m80,), fname='rmarg')
 
tuple rm_arg_m08 = bs(l=0, cls=(x86_rm_m08,), fname='rmarg')
 
tuple rm_arg_m16 = bs(l=0, cls=(x86_rm_m16,), fname='rmarg')
 
tuple rm_arg_mm = bs(l=0, cls=(x86_rm_mm,), fname='rmarg')
 
tuple rm_arg_mm_m64 = bs(l=0, cls=(x86_rm_mm_m64,), fname='rmarg')
 
tuple rm_arg_xmm = bs(l=0, cls=(x86_rm_xmm,), fname='rmarg')
 
tuple rm_arg_xmm_m32 = bs(l=0, cls=(x86_rm_xmm_m32,), fname='rmarg')
 
tuple rm_arg_xmm_m64 = bs(l=0, cls=(x86_rm_xmm_m64,), fname='rmarg')
 
tuple swapargs = bs_swapargs(l=1, fname="swap", mn_mod=range(1 << 1))
 
list cond_list
 
tuple cond = bs_mod_name(l=4, fname='cond', mn_mod=cond_list)
 
tuple bs_opmode16 = bs(l=0, cls=(bs_op_mode,), mode = 16, fname="fopmode")
 
tuple bs_opmode32 = bs(l=0, cls=(bs_op_mode,), mode = 32, fname="fopmode")
 
tuple bs_opmode64 = bs(l=0, cls=(bs_op_mode,), mode = 64, fname="fopmode")
 
tuple bs_admode16 = bs(l=0, cls=(bs_ad_mode,), mode = 16, fname="fadmode")
 
tuple bs_admode32 = bs(l=0, cls=(bs_ad_mode,), mode = 32, fname="fadmode")
 
tuple bs_admode64 = bs(l=0, cls=(bs_ad_mode,), mode = 64, fname="fadmode")
 
tuple bs_opmode16_no64 = bs(l=0, cls=(bs_op_mode_no64,), mode = 16, fname="fopmode")
 
tuple bs_opmode32_no64 = bs(l=0, cls=(bs_op_mode_no64,), mode = 32, fname="fopmode")
 
tuple bs_mode64 = bs(l=0, cls=(bs_op_mode64,))
 
tuple bs_modeno64 = bs(l=0, cls=(bs_op_modeno64,))
 

Function Documentation

def miasm2.arch.x86.arch.addop (   name,
  fields,
  args = None,
  alias = False 
)

Definition at line 3108 of file arch.py.

3109 def addop(name, fields, args=None, alias=False):
3110  dct = {"fields": fields}
3111  dct["alias"] = alias
3112  if args is not None:
3113  dct['args'] = args
3114  type(name, (mn_x86,), dct)
3115 """
3116 class ia32_aaa(mn_x86):
3117  fields = [bs8(0x37)]
3118 """
3119 addop("aaa", [bs8(0x37)])
3120 addop("aas", [bs8(0x3F)])
3121 addop("aad", [bs8(0xd5), u08])
3122 addop("aam", [bs8(0xd4), u08])
3123 
3124 addop("adc", [bs("0001010"), w8, d_eax, d_imm])
3125 addop("adc", [bs("100000"), se, w8] + rmmod(d2, rm_arg_w8) + [d_imm])
3126 addop("adc", [bs("000100"), swapargs, w8] +
3127  rmmod(rmreg, rm_arg_w8), [rm_arg_w8, rmreg])
3128 
3129 addop("add", [bs("0000010"), w8, d_eax, d_imm])
3130 addop("add", [bs("100000"), se, w8] + rmmod(d0, rm_arg_w8) + [d_imm])
3131 addop("add", [bs("000000"), swapargs, w8] +
3132  rmmod(rmreg, rm_arg_w8), [rm_arg_w8, rmreg])
3133 
3134 addop("and", [bs("0010010"), w8, d_eax, d_imm])
3135 addop("and", [bs("100000"), se, w8] + rmmod(d4, rm_arg_w8) + [d_imm])
3136 addop("and", [bs("001000"), swapargs, w8] +
3137  rmmod(rmreg, rm_arg_w8), [rm_arg_w8, rmreg])
3138 
3139 addop("bsf", [bs8(0x0f), bs8(0xbc)] + rmmod(rmreg))
3140 addop("bsr", [bs8(0x0f), bs8(0xbd), mod,
3141  rmreg, rm, sib_scale, sib_index, sib_base, disp, rm_arg])
3142 
3143 addop("bswap", [bs8(0x0f), bs('11001'), reg])
3144 
3145 addop("bt", [bs8(0x0f), bs8(0xa3)] + rmmod(rmreg), [rm_arg, rmreg])
3146 addop("bt", [bs8(0x0f), bs8(0xba)] + rmmod(d4) + [u08])
3147 addop("btc", [bs8(0x0f), bs8(0xbb)] + rmmod(rmreg), [rm_arg, rmreg])
3148 addop("btc", [bs8(0x0f), bs8(0xba)] + rmmod(d7) + [u08])
3149 
3150 
3151 addop("btr", [bs8(0x0f), bs8(0xb3)] + rmmod(rmreg), [rm_arg, rmreg])
3152 addop("btr", [bs8(0x0f), bs8(0xba)] + rmmod(d6) + [u08])
3153 addop("bts", [bs8(0x0f), bs8(0xab)] + rmmod(rmreg), [rm_arg, rmreg])
3154 addop("bts", [bs8(0x0f), bs8(0xba)] + rmmod(d5) + [u08])
3155 
3156 addop("call", [bs8(0xe8), rel_off])
3157 addop("call", [bs8(0xff), stk] + rmmod(d2))
3158 addop("call", [bs8(0xff), stk] + rmmod(d3, modrm=mod_mem))
3159 addop("call", [bs8(0x9a), moff, msegoff])
3160 

+ Here is the call graph for this function:

def miasm2.arch.x86.arch.admode_prefix (   mode)

Definition at line 368 of file arch.py.

369 def admode_prefix(mode):
370  size, opmode, admode = mode
371  if size in [16, 32]:
372  if admode:
373  return invmode[size]
374  else:
375  return size
376  elif size == 64:
377  return 64
378  raise NotImplementedError('not fully functional')
379 

+ Here is the caller graph for this function:

def miasm2.arch.x86.arch.ast_id2expr (   t)

Definition at line 226 of file arch.py.

227 def ast_id2expr(t):
228  if not t in mn_x86.regs.all_regs_ids_byname:
229  r = ExprId(asm_label(t))
230  else:
231  r = mn_x86.regs.all_regs_ids_byname[t]
232  return r
233 
def miasm2.arch.x86.arch.ast_int2expr (   a)

Definition at line 234 of file arch.py.

235 def ast_int2expr(a):
236  return ExprInt64(a)
237 

+ Here is the call graph for this function:

def miasm2.arch.x86.arch.expr2modrm (   expr,
  parent,
  w8,
  sx = 0,
  xmm = 0,
  mm = 0 
)

Definition at line 1764 of file arch.py.

1765 def expr2modrm(expr, parent, w8, sx=0, xmm=0, mm=0):
1766  dct_expr = {f_isad : False}
1767 
1768  if mm or xmm:
1769  if mm and expr.size != 64:
1770  return None, None, False
1771  elif xmm and expr.size != 128:
1772  return None, None, False
1773 
1774  if isinstance(expr, ExprId):
1775  selreg = SIZE2XMMREG[expr.size]
1776  if not expr in selreg.expr:
1777  return None, None, False
1778  i = selreg.expr.index(expr)
1779  dct_expr[i] = 1
1780  return [dct_expr], None, True
1781  else:
1782  return parse_mem(expr, parent, w8, sx, xmm, mm)
1783 
1784  elif expr.size == 64 and expr not in gpregs_mm.expr:
1785  if hasattr(parent, 'sd'):
1786  parent.sd.value = 1
1787  elif hasattr(parent, 'wd'):
1788  pass
1789  elif hasattr(parent, 'stk'):
1790  pass
1791  else:
1792  parent.rex_w.value = 1
1793  opmode = parent.v_opmode()
1794  if sx == 1:
1795  opmode = 16
1796  if sx == 2:
1797  opmode = 32
1798  if expr.size == 8 and w8 != 0:
1799  return None, None, False
1800 
1801  if w8 == 0 and expr.size != 8:
1802  return None, None, False
1803 
1804  if not isinstance(expr, ExprMem):
1805  dct_expr[f_isad] = False
1806  if xmm:
1807  if expr in gpregs_xmm.expr:
1808  i = gpregs_xmm.expr.index(expr)
1809  dct_expr[i] = 1
1810  return [dct_expr], None, True
1811  else:
1812  return None, None, False
1813  if mm:
1814  if expr in gpregs_mm.expr:
1815  i = gpregs_mm.expr.index(expr)
1816  dct_expr[i] = 1
1817  return [dct_expr], None, True
1818  else:
1819  return None, None, False
1820  if w8 == 0:
1821  if parent.mode == 64 and expr in gpregs08_64.expr:
1822  r = gpregs08_64
1823  parent.rex_p.value = 1
1824  else:
1825  parent.rex_p.value = 0
1826  parent.rex_x.value = 0
1827  r = size2gpregs[8]
1828  if not expr in r.expr:
1829  return None, None, False
1830  i = r.expr.index(expr)
1831  dct_expr[i] = 1
1832  return [dct_expr], None, True
1833  if opmode != expr.size:
1834  return None, None, False
1835  if not expr in size2gpregs[opmode].expr:
1836  return None, None, False
1837  i = size2gpregs[opmode].expr.index(expr)
1838  if i > 7:
1839  if parent.mode != 64:
1840  return None, None, False
1841  dct_expr[i] = 1
1842  return [dct_expr], None, True
1843  return parse_mem(expr, parent, w8, sx, xmm, mm)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def miasm2.arch.x86.arch.exprfindmod (   e,
  o = None 
)

Definition at line 1663 of file arch.py.

1664 def exprfindmod(e, o=None):
1665  if o is None:
1666  o = {}
1667  if isinstance(e, ExprInt):
1668  return e
1669  if isinstance(e, ExprId):
1670  i = size2gpregs[e.size].expr.index(e)
1671  o[i] = 1
1672  return None
1673  elif isinstance(e, ExprOp):
1674  out = None
1675  if e.op == '+':
1676  for a in e.args:
1677  r = exprfindmod(a, o)
1678  if out and r1:
1679  raise ValueError('multiple displacement!')
1680  out = r
1681  return out
1682  elif e.op == "*":
1683  mul = int(e.args[1].arg)
1684  a = e.args[0]
1685  i = size2gpregs[a.size].expr.index(a)
1686  o[i] = mul
1687  else:
1688  raise ValueError('bad op')
1689  return None

+ Here is the caller graph for this function:

def miasm2.arch.x86.arch.gen_modrm_form ( )

Definition at line 1421 of file arch.py.

1422 def gen_modrm_form():
1423  global db_afs_64, sib_64_s08_ebp
1424  ebp = 5
1425 
1426  sib_s08_ebp = [{f_isad: True} for i in range(0x100)]
1427  sib_u32_ebp = [{f_isad: True} for i in range(0x100)]
1428  sib_u32 = [{f_isad: True} for i in range(0x100)]
1429 
1430  sib_u64 = []
1431  for rex_x in xrange(2):
1432  o = []
1433  for rex_b in xrange(2):
1434  x = [{f_isad: True} for i in range(0x100)]
1435  o.append(x)
1436  sib_u64.append(o)
1437 
1438  sib_u64_ebp = []
1439  for rex_x in xrange(2):
1440  o = []
1441  for rex_b in xrange(2):
1442  x = [{f_isad: True} for i in range(0x100)]
1443  o.append(x)
1444  sib_u64_ebp.append(o)
1445 
1446  sib_64_s08_ebp = []
1447  for rex_x in xrange(2):
1448  o = []
1449  for rex_b in xrange(2):
1450  x = [{f_isad: True} for i in range(0x100)]
1451  o.append(x)
1452  sib_64_s08_ebp.append(o)
1453 
1454  for sib_rez in [sib_s08_ebp,
1455  sib_u32_ebp,
1456  sib_u32,
1457  sib_64_s08_ebp,
1458  sib_u64_ebp,
1459  sib_u64,
1460  ]:
1461  for index in range(0x100):
1462  ss, i, b = getmodrm(index)
1463 
1464  if b == 0b101:
1465  if sib_rez == sib_s08_ebp:
1466  sib_rez[index][f_imm] = f_s08
1467  sib_rez[index][ebp] = 1
1468  elif sib_rez == sib_u32_ebp:
1469  sib_rez[index][f_imm] = f_u32
1470  sib_rez[index][ebp] = 1
1471  elif sib_rez == sib_u32:
1472  sib_rez[index][f_imm] = f_u32
1473  elif sib_rez == sib_u64_ebp:
1474  for rex_b in xrange(2):
1475  for rex_x in xrange(2):
1476  sib_rez[rex_x][rex_b][index][f_imm] = f_u32
1477  sib_rez[rex_x][rex_b][index][ebp + 8 * rex_b] = 1
1478  elif sib_rez == sib_u64:
1479  for rex_b in xrange(2):
1480  for rex_x in xrange(2):
1481  sib_rez[rex_x][rex_b][index][f_imm] = f_u32
1482  elif sib_rez == sib_64_s08_ebp:
1483  for rex_b in xrange(2):
1484  for rex_x in xrange(2):
1485  sib_rez[rex_x][rex_b][index][f_imm] = f_s08
1486  sib_rez[rex_x][rex_b][index][ebp + 8 * rex_b] = 1
1487 
1488  else:
1489  if sib_rez == sib_s08_ebp:
1490  sib_rez[index][b] = 1
1491  sib_rez[index][f_imm] = f_s08
1492  elif sib_rez == sib_u32_ebp:
1493  sib_rez[index][b] = 1
1494  sib_rez[index][f_imm] = f_u32
1495  elif sib_rez == sib_u32:
1496  sib_rez[index][b] = 1
1497  elif sib_rez == sib_u64_ebp:
1498  for rex_b in xrange(2):
1499  for rex_x in xrange(2):
1500  sib_rez[rex_x][rex_b][index][b + 8 * rex_b] = 1
1501  sib_rez[rex_x][rex_b][index][f_imm] = f_u32
1502  elif sib_rez == sib_u64:
1503  for rex_b in xrange(2):
1504  for rex_x in xrange(2):
1505  sib_rez[rex_x][rex_b][index][b + 8 * rex_b] = 1
1506  elif sib_rez == sib_64_s08_ebp:
1507  for rex_b in xrange(2):
1508  for rex_x in xrange(2):
1509  sib_rez[rex_x][rex_b][index][f_imm] = f_s08
1510  sib_rez[rex_x][rex_b][index][b + 8 * rex_b] = 1
1511 
1512  if i == 0b100 and sib_rez in [sib_s08_ebp, sib_u32_ebp, sib_u32]:
1513  continue
1514 
1515  if sib_rez in [sib_s08_ebp, sib_u32_ebp, sib_u32]:
1516  tmp = i
1517  if not tmp in sib_rez[index]:
1518  sib_rez[index][tmp] = 0 # 1 << ss
1519  sib_rez[index][tmp] += 1 << ss
1520  else:
1521  for rex_b in xrange(2):
1522  for rex_x in xrange(2):
1523  tmp = i + 8 * rex_x
1524  if i == 0b100 and rex_x == 0:
1525  continue
1526  if not tmp in sib_rez[rex_x][rex_b][index]:
1527  sib_rez[rex_x][rex_b][index][tmp] = 0 # 1 << ss
1528  sib_rez[rex_x][rex_b][index][tmp] += 1 << ss
1529 
1530  # 32bit
1531  db_afs_32 = [None for i in range(0x100)]
1532  for i in range(0x100):
1533  index = i
1534  mod, re, rm = getmodrm(i)
1535 
1536  if mod == 0b00:
1537  if rm == 0b100:
1538  db_afs_32[index] = sib_u32
1539  elif rm == 0b101:
1540  db_afs_32[index] = {f_isad: True, f_imm: f_u32}
1541  else:
1542  db_afs_32[index] = {f_isad: True, rm: 1}
1543  elif mod == 0b01:
1544  if rm == 0b100:
1545  db_afs_32[index] = sib_s08_ebp
1546  continue
1547  tmp = {f_isad: True, rm: 1, f_imm: f_s08}
1548  db_afs_32[index] = tmp
1549 
1550  elif mod == 0b10:
1551  if rm == 0b100:
1552  db_afs_32[index] = sib_u32_ebp
1553  else:
1554  db_afs_32[index] = {f_isad: True, rm: 1, f_imm: f_u32}
1555  elif mod == 0b11:
1556  db_afs_32[index] = {f_isad: False, rm: 1}
1557 
1558  # 64bit
1559  db_afs_64 = [None for i in range(0x400)]
1560  for i in range(0x400):
1561  index = i
1562  rex_x = (index >> 9) & 1
1563  rex_b = (index >> 8) & 1
1564  mod, re, rm = getmodrm(i & 0xff)
1565 
1566  if mod == 0b00:
1567  if rm == 0b100:
1568  db_afs_64[i] = sib_u64[rex_x][rex_b]
1569  elif rm == 0b101:
1570  db_afs_64[i] = {f_isad: True, f_imm: f_u32, 16: 1}
1571  else:
1572  db_afs_64[i] = {f_isad: True, rm + 8 * rex_b: 1}
1573  elif mod == 0b01:
1574  if rm == 0b100:
1575  db_afs_64[i] = sib_64_s08_ebp[rex_x][rex_b]
1576  continue
1577  tmp = {f_isad: True, rm + 8 * rex_b: 1, f_imm: f_s08}
1578  db_afs_64[i] = tmp
1579 
1580  elif mod == 0b10:
1581  if rm == 0b100:
1582  db_afs_64[i] = sib_u64_ebp[rex_x][rex_b]
1583  else:
1584  db_afs_64[i] = {f_isad: True, rm + 8 * rex_b: 1, f_imm: f_u32}
1585  elif mod == 0b11:
1586  db_afs_64[i] = {f_isad: False, rm + 8 * rex_b: 1}
1587 
1588  # 16bit
1589  db_afs_16 = [None for i in range(0x100)]
1590  _si = 6
1591  _di = 7
1592  _bx = 3
1593  _bp = 5
1594  for i in range(0x100):
1595  index = i
1596  mod, re, rm = getmodrm(i)
1597 
1598  if mod == 0b00:
1599  if rm == 0b100:
1600  db_afs_16[index] = {f_isad: True, _si: 1}
1601  elif rm == 0b101:
1602  db_afs_16[index] = {f_isad: True, _di: 1}
1603  elif rm == 0b110:
1604  db_afs_16[index] = {
1605  f_isad: True, f_imm: f_u16} # {f_isad:True,_bp:1}
1606  elif rm == 0b111:
1607  db_afs_16[index] = {f_isad: True, _bx: 1}
1608  else:
1609  db_afs_16[index] = {f_isad: True,
1610  [_si, _di][rm % 2]: 1,
1611  [_bx, _bp][(rm >> 1) % 2]: 1}
1612  elif mod in [0b01, 0b10]:
1613  if mod == 0b01:
1614  my_imm = f_s08
1615  else:
1616  my_imm = f_u16
1617 
1618  if rm == 0b100:
1619  db_afs_16[index] = {f_isad: True, _si: 1, f_imm: my_imm}
1620  elif rm == 0b101:
1621  db_afs_16[index] = {f_isad: True, _di: 1, f_imm: my_imm}
1622  elif rm == 0b110:
1623  db_afs_16[index] = {f_isad: True, _bp: 1, f_imm: my_imm}
1624  elif rm == 0b111:
1625  db_afs_16[index] = {f_isad: True, _bx: 1, f_imm: my_imm}
1626  else:
1627  db_afs_16[index] = {f_isad: True,
1628  [_si, _di][rm % 2]: 1,
1629  [_bx, _bp][(rm >> 1) % 2]: 1,
1630  f_imm: my_imm}
1631 
1632  elif mod == 0b11:
1633  db_afs_16[index] = {f_isad: False, rm: 1}
1634 
1635  byte2modrm = {}
1636  byte2modrm[16] = db_afs_16
1637  byte2modrm[32] = db_afs_32
1638  byte2modrm[64] = db_afs_64
1639 
1640  modrm2byte = {16: defaultdict(list),
1641  32: defaultdict(list),
1642  64: defaultdict(list),
1643  }
1644  for size, db_afs in byte2modrm.items():
1645  for i, modrm in enumerate(db_afs):
1646  if not isinstance(modrm, list):
1647  modrm = modrm.items()
1648  modrm.sort()
1649  modrm = tuple(modrm)
1650  modrm2byte[size][modrm].append(i)
1651  continue
1652  for j, modrm_f in enumerate(modrm):
1653  modrm_f = modrm_f.items()
1654  modrm_f.sort()
1655  modrm_f = tuple(modrm_f)
1656  modrm2byte[size][modrm_f].append((i, j))
1657 
1658  return byte2modrm, modrm2byte
1659 
1660 byte2modrm, modrm2byte = gen_modrm_form()
1661 
1662 
# ret is modr; ret is displacement

+ Here is the call graph for this function:

def miasm2.arch.x86.arch.get_prefix (   s)

Definition at line 428 of file arch.py.

429 def get_prefix(s):
430  g = re.search('(\S+)(\s+)', s)
431  if not g:
432  return None, s
433  prefix, b = g.groups()
434  return prefix, s[len(prefix) + len(b):]
435 

+ Here is the caller graph for this function:

def miasm2.arch.x86.arch.getmodrm (   c)

Definition at line 1406 of file arch.py.

1407 def getmodrm(c):
1408  return (c >> 6) & 3, (c >> 3) & 7, c & 7
1409 

+ Here is the caller graph for this function:

def miasm2.arch.x86.arch.getreg (   s,
  l,
  t 
)

Definition at line 209 of file arch.py.

210 def getreg(s, l, t):
211  t = t[0]
212  return t[0]
213 
def miasm2.arch.x86.arch.modrm2expr (   modrm,
  parent,
  w8,
  sx = 0,
  xmm = 0,
  mm = 0 
)

Definition at line 1844 of file arch.py.

1845 def modrm2expr(modrm, parent, w8, sx=0, xmm=0, mm=0):
1846  o = []
1847  if not modrm[f_isad]:
1848  modrm_k = [x[0] for x in modrm.iteritems() if x[1] == 1]
1849  if len(modrm_k) != 1:
1850  raise ValueError('strange reg encoding %r' % modrm)
1851  modrm_k = modrm_k[0]
1852  if w8 == 0:
1853  opmode = 8
1854  elif sx == 1:
1855  opmode = 16
1856  elif sx == 2:
1857  opmode = 32
1858  else:
1859  opmode = parent.v_opmode()
1860  if xmm:
1861  expr = gpregs_xmm.expr[modrm_k]
1862  elif mm:
1863  expr = gpregs_mm.expr[modrm_k]
1864  elif opmode == 8 and (parent.v_opmode() == 64 or parent.rex_p.value == 1):
1865  expr = gpregs08_64.expr[modrm_k]
1866  else:
1867  expr = size2gpregs[opmode].expr[modrm_k]
1868  return expr
1869  admode = parent.v_admode()
1870  opmode = parent.v_opmode()
1871  for modrm_k, scale in modrm.items():
1872  if isinstance(modrm_k, (int, long)):
1873  expr = size2gpregs[admode].expr[modrm_k]
1874  if scale != 1:
1875  expr = ExprInt(scale, admode) * expr
1876  o.append(expr)
1877  if f_imm in modrm:
1878  if parent.disp.value is None:
1879  return None
1880  o.append(ExprInt(int(parent.disp.expr.arg), admode))
1881  expr = ExprOp('+', *o)
1882  if w8 == 0:
1883  opmode = 8
1884  elif sx == 1:
1885  opmode = 16
1886  elif sx == 2:
1887  opmode = 32
1888  if xmm:
1889  opmode = 128
1890  elif mm:
1891  opmode = 64
1892 
1893  expr = ExprMem(expr, size=opmode)
1894  return expr
1895 

+ Here is the caller graph for this function:

def miasm2.arch.x86.arch.offsize (   p)

Definition at line 421 of file arch.py.

422 def offsize(p):
423  if p.opmode:
424  return 16
425  else:
426  return p.mode
427 

+ Here is the caller graph for this function:

def miasm2.arch.x86.arch.opmode_prefix (   mode)

Definition at line 353 of file arch.py.

354 def opmode_prefix(mode):
355  size, opmode, admode = mode
356  if size in [16, 32]:
357  if opmode:
358  return invmode[size]
359  else:
360  return size
361  elif size == 64:
362  if opmode:
363  return 16
364  else:
365  return 32
366  raise NotImplementedError('not fully functional')
367 

+ Here is the caller graph for this function:

def miasm2.arch.x86.arch.parse_deref_int (   s,
  l,
  t 
)

Definition at line 152 of file arch.py.

153 def parse_deref_int(s, l, t):
154  t = t[0]
155  return t[0]
156 
def miasm2.arch.x86.arch.parse_deref_intmreg (   s,
  l,
  t 
)

Definition at line 194 of file arch.py.

195 def parse_deref_intmreg(s, l, t):
196  t = t[0]
197  r1 = reg2exprid(t[0][0])
198  i1 = ExprInt_from(r1, t[1].arg)
199  return r1 * i1
200 
def parse_deref_intmreg
Definition: arch.py:194

+ Here is the call graph for this function:

def miasm2.arch.x86.arch.parse_deref_intmregint (   s,
  l,
  t 
)

Definition at line 201 of file arch.py.

202 def parse_deref_intmregint(s, l, t):
203  t = t[0]
204  r1 = reg2exprid(t[0][0])
205  i1 = ExprInt_from(r1, t[1].arg)
206  i2 = ExprInt_from(r1, t[1].arg)
207  return (r1 * i1) + i2
208 
def parse_deref_intmregint
Definition: arch.py:201

+ Here is the call graph for this function:

def miasm2.arch.x86.arch.parse_deref_mem (   s,
  l,
  t 
)

Definition at line 288 of file arch.py.

289 def parse_deref_mem(s, l, t):
290  t = t[0]
291  if len(t) == 2:
292  s, ptr = t
293  return ExprMem(ptr, MEMPREFIX2SIZE[s[0]])
294  elif len(t) == 3:
295  s, segm, ptr = t
296  return ExprMem(ExprOp('segm', segm[0], ptr), MEMPREFIX2SIZE[s[0]])
297  else:
298  raise ValueError('len(t) > 3')
def miasm2.arch.x86.arch.parse_deref_ptr (   s,
  l,
  t 
)

Definition at line 214 of file arch.py.

215 def parse_deref_ptr(s, l, t):
216  t = t[0]
217  return ExprMem(ExprOp('segm', t[0], t[1]))
def miasm2.arch.x86.arch.parse_deref_reg (   s,
  l,
  t 
)

Definition at line 147 of file arch.py.

148 def parse_deref_reg(s, l, t):
149  t = t[0][0]
150  return t[0]
151 
def miasm2.arch.x86.arch.parse_deref_reg_intmreg (   s,
  l,
  t 
)

Definition at line 177 of file arch.py.

178 def parse_deref_reg_intmreg(s, l, t):
179  t = t[0]
180  r1 = reg2exprid(t[0][0])
181  r2 = reg2exprid(t[1][0])
182  i1 = ExprInt_from(r1, t[2].arg)
183  return r1 + (r2 * i1)
184 
def parse_deref_reg_intmreg
Definition: arch.py:177

+ Here is the call graph for this function:

def miasm2.arch.x86.arch.parse_deref_reg_intmreg_int (   s,
  l,
  t 
)

Definition at line 185 of file arch.py.

186 def parse_deref_reg_intmreg_int(s, l, t):
187  t = t[0]
188  r1 = reg2exprid(t[0][0])
189  r2 = reg2exprid(t[1][0])
190  i1 = ExprInt_from(r1, t[2].arg)
191  i2 = ExprInt_from(r1, t[3].arg)
192  return r1 + (r2 * i1) + i2
193 
def parse_deref_reg_intmreg_int
Definition: arch.py:185

+ Here is the call graph for this function:

def miasm2.arch.x86.arch.parse_deref_regint (   s,
  l,
  t 
)

Definition at line 157 of file arch.py.

158 def parse_deref_regint(s, l, t):
159  t = t[0]
160  r1 = reg2exprid(t[0][0])
161  i1 = ExprInt_from(r1, t[1].arg)
162  return r1 + i1
163 
def parse_deref_regint
Definition: arch.py:157

+ Here is the call graph for this function:

def miasm2.arch.x86.arch.parse_deref_regreg (   s,
  l,
  t 
)

Definition at line 164 of file arch.py.

165 def parse_deref_regreg(s, l, t):
166  t = t[0]
167  return t[0][0] + t[1][0]
168 
def parse_deref_regreg
Definition: arch.py:164
def miasm2.arch.x86.arch.parse_deref_regregint (   s,
  l,
  t 
)

Definition at line 169 of file arch.py.

170 def parse_deref_regregint(s, l, t):
171  t = t[0]
172  r1 = reg2exprid(t[0][0])
173  r2 = reg2exprid(t[1][0])
174  i1 = ExprInt_from(r1, t[2].arg)
175  return r1 + r2 + i1
176 
def parse_deref_regregint
Definition: arch.py:169

+ Here is the call graph for this function:

def miasm2.arch.x86.arch.parse_deref_segmoff (   s,
  l,
  t 
)

Definition at line 218 of file arch.py.

219 def parse_deref_segmoff(s, l, t):
220  t = t[0]
221  return ExprOp('segm', t[0], t[1])
222 
223 
224 variable, operand, base_expr = gen_base_expr()
225 
def gen_base_expr
Definition: cpu.py:309
def parse_deref_segmoff
Definition: arch.py:218

+ Here is the call graph for this function:

def miasm2.arch.x86.arch.parse_mem (   expr,
  parent,
  w8,
  sx = 0,
  xmm = 0,
  mm = 0 
)

Definition at line 1699 of file arch.py.

1700 def parse_mem(expr, parent, w8, sx=0, xmm=0, mm=0):
1701  dct_expr = {}
1702  opmode = parent.v_opmode()
1703  if expr.is_op_segm() and isinstance(expr.arg.args[0], ExprInt):
1704  return None, None, False
1705 
1706  if expr.is_op_segm():
1707  segm = expr.arg.args[0]
1708  ptr = expr.arg.args[1]
1709  else:
1710  segm = None
1711  ptr = expr.arg
1712 
1713  dct_expr[f_isad] = True
1714  ad_size = ptr.size
1715  admode = parent.v_admode()
1716  if not test_addr_size(ptr, admode):
1717  return None, None, False
1718 
1719  if (w8 == 1 and expr.size != opmode and not sx and
1720  not (hasattr(parent, 'sd') or hasattr(parent, 'wd'))):
1721  return None, None, False
1722 
1723  if hasattr(parent, 'wd'):
1724  if expr.size == 16:
1725  parent.wd.value = 1
1726  elif expr.size == 32:
1727  pass
1728  else:
1729  return None, None, False
1730 
1731  if (parent.mode == 64 and ptr.size == 32 and
1732  parent.admode != 1):
1733  return None, None, False
1734  dct_expr = {f_isad: True}
1735  disp = exprfindmod(ptr, dct_expr)
1736  out = []
1737  if disp is None:
1738  # add 0 disp
1739  disp = ExprInt32(0)
1740  if disp is not None:
1741  for signed, encoding, cast_int in [(True, f_s08, ExprInt8),
1742  (True, f_s16, ExprInt16),
1743  (True, f_s32, ExprInt32),
1744  (False, f_u08, ExprInt8),
1745  (False, f_u16, ExprInt16),
1746  (False, f_u32, ExprInt32)]:
1747  value = cast_int(int(disp.arg))
1748  if admode < value.size:
1749  if signed:
1750  if int(disp.arg) != sign_ext(int(value.arg), admode, disp.size):
1751  continue
1752  else:
1753  if int(disp.arg) != int(value.arg):
1754  continue
1755  else:
1756  if int(disp.arg) != sign_ext(int(value.arg), value.size, admode):
1757  continue
1758  x1 = dict(dct_expr)
1759  x1[f_imm] = (encoding, value)
1760  out.append(x1)
1761  else:
1762  out = [dct_expr]
1763  return out, segm, True
def sign_ext
Definition: cpu.py:1602

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def miasm2.arch.x86.arch.print_size (   e)

MMX/SSE/AVX operations  Categories are the same than here: https://software.intel.com/sites/landingpage/IntrinsicsGuide/.

Arithmetic (integers) Move SSE Additions SSE Substractions SSE Arithmetic (floating-point) Additions SSE Substractions SSE Multiplications SSE Divisions SSE Logical (floating-point) XOR AND OR AND MMX OR MMX XOR MMX Convert SS = single precision SD = double precision SS -> SD

Definition at line 3955 of file arch.py.

3956 def print_size(e):
3957  print e, e.size
3958  return e
def print_size
MMX/SSE/AVX operations  Categories are the same than here: https://software.intel.com/sites/landingpage/IntrinsicsGuide/.
Definition: arch.py:3955
def miasm2.arch.x86.arch.reg2exprid (   r)

Definition at line 141 of file arch.py.

142 def reg2exprid(r):
143  if not r.name in all_regs_ids_byname:
144  raise ValueError('unknown reg')
145  return all_regs_ids_byname[r.name]
146 

+ Here is the caller graph for this function:

def miasm2.arch.x86.arch.rmmod (   r,
  rm_arg_x = rm_arg,
  modrm = mod 
)

Definition at line 3092 of file arch.py.

3093 def rmmod(r, rm_arg_x=rm_arg, modrm=mod):
3094  return [modrm, r, rm, sib_scale, sib_index, sib_base, disp, rm_arg_x]
3095 
3096 #
3097 # mode | reg | rm #
3098 #
3099 
3100 #
3101 # scale | index | base #
3102 #
3103 
3104 #
3105 # Prefix | REX prefix | Opcode | mod/rm | sib | displacement | immediate #
3106 #
3107 

+ Here is the caller graph for this function:

def miasm2.arch.x86.arch.setmodrm (   mod,
  re,
  rm 
)

Definition at line 1410 of file arch.py.

1411 def setmodrm(mod, re, rm):
1412  return ((mod & 3) << 6) | ((re & 7) << 3) | (rm & 7)
1413 

+ Here is the caller graph for this function:

def miasm2.arch.x86.arch.sib (   c)

Definition at line 1414 of file arch.py.

1415 def sib(c):
1416  return modrm(c)
def miasm2.arch.x86.arch.sib_cond (   cls,
  mode,
  v 
)

Definition at line 2461 of file arch.py.

2462 def sib_cond(cls, mode, v):
2463  if admode_prefix((mode, v["opmode"], v["admode"])) == 16:
2464  return None
2465  if v['mod'] == 0b11:
2466  return None
2467  elif v['rm'] == 0b100:
2468  return cls.ll
2469  else:
2470  return None
2471  return v['rm'] == 0b100
2472 

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def miasm2.arch.x86.arch.test_addr_size (   ptr,
  size 
)

Definition at line 1690 of file arch.py.

1691 def test_addr_size(ptr, size):
1692  if isinstance(ptr, ExprInt):
1693  return ptr.arg < (1 << size)
1694  else:
1695  return ptr.size == size

+ Here is the caller graph for this function:

def miasm2.arch.x86.arch.v_admode (   p)

Definition at line 417 of file arch.py.

418 def v_admode(p):
419  return v_admode_info(p.mode, p.admode)
420 

+ Here is the call graph for this function:

def miasm2.arch.x86.arch.v_admode_info (   size,
  admode 
)

Definition at line 405 of file arch.py.

406 def v_admode_info(size, admode):
407  if size in [16, 32]:
408  if admode:
409  return invmode[size]
410  else:
411  return size
412  elif size == 64:
413  if admode == 1:
414  return 32
415  return 64
416 

+ Here is the caller graph for this function:

def miasm2.arch.x86.arch.v_opmode (   p)

Definition at line 400 of file arch.py.

401 def v_opmode(p):
402  stk = hasattr(p, 'stk')
403  return v_opmode_info(p.mode, p.opmode, p.rex_w.value, stk)
404 

+ Here is the call graph for this function:

def miasm2.arch.x86.arch.v_opmode_info (   size,
  opmode,
  rex_w,
  stk 
)

Definition at line 380 of file arch.py.

381 def v_opmode_info(size, opmode, rex_w, stk):
382  if size in [16, 32]:
383  if opmode:
384  return invmode[size]
385  else:
386  return size
387  elif size == 64:
388  # Rex has the maximum priority
389  # Then opmode
390  # Then stacker
391  if rex_w == 1:
392  return 64
393  elif opmode == 1:
394  return 16
395  elif stk:
396  return 64
397  else:
398  return 32
399 

+ Here is the caller graph for this function:

Variable Documentation

tuple miasm2.arch.x86.arch.bs_admode16 = bs(l=0, cls=(bs_ad_mode,), mode = 16, fname="fadmode")

Definition at line 3218 of file arch.py.

tuple miasm2.arch.x86.arch.bs_admode32 = bs(l=0, cls=(bs_ad_mode,), mode = 32, fname="fadmode")

Definition at line 3219 of file arch.py.

tuple miasm2.arch.x86.arch.bs_admode64 = bs(l=0, cls=(bs_ad_mode,), mode = 64, fname="fadmode")

Definition at line 3220 of file arch.py.

tuple miasm2.arch.x86.arch.bs_mode64 = bs(l=0, cls=(bs_op_mode64,))

Definition at line 3225 of file arch.py.

tuple miasm2.arch.x86.arch.bs_modeno64 = bs(l=0, cls=(bs_op_modeno64,))

Definition at line 3226 of file arch.py.

tuple miasm2.arch.x86.arch.bs_opmode16 = bs(l=0, cls=(bs_op_mode,), mode = 16, fname="fopmode")

Definition at line 3213 of file arch.py.

tuple miasm2.arch.x86.arch.bs_opmode16_no64 = bs(l=0, cls=(bs_op_mode_no64,), mode = 16, fname="fopmode")

Definition at line 3222 of file arch.py.

tuple miasm2.arch.x86.arch.bs_opmode32 = bs(l=0, cls=(bs_op_mode,), mode = 32, fname="fopmode")

Definition at line 3214 of file arch.py.

tuple miasm2.arch.x86.arch.bs_opmode32_no64 = bs(l=0, cls=(bs_op_mode_no64,), mode = 32, fname="fopmode")

Definition at line 3223 of file arch.py.

tuple miasm2.arch.x86.arch.bs_opmode64 = bs(l=0, cls=(bs_op_mode,), mode = 64, fname="fopmode")

Definition at line 3215 of file arch.py.

tuple miasm2.arch.x86.arch.BYTE = Literal('BYTE')

Definition at line 276 of file arch.py.

tuple miasm2.arch.x86.arch.cl_or_imm = Group(r08_ecx.parser)

Definition at line 316 of file arch.py.

tuple miasm2.arch.x86.arch.COLON = Suppress(":")

Definition at line 129 of file arch.py.

tuple miasm2.arch.x86.arch.cond = bs_mod_name(l=4, fname='cond', mn_mod=cond_list)

Definition at line 3089 of file arch.py.

list miasm2.arch.x86.arch.cond_list
Initial value:
1 = ["O", "NO", "B", "AE",
2  "Z", "NZ", "BE", "A",
3  "S", "NS", "PE", "NP",
4  #"L", "NL", "NG", "G"]

Definition at line 3084 of file arch.py.

list miasm2.arch.x86.arch.conditional_branch
Initial value:
1 = ["JO", "JNO", "JB", "JAE",
2  "JZ", "JNZ", "JBE", "JA",
3  "JS", "JNS", "JPE", "JNP",
4  #"L", "NL", "NG", "G"]

Definition at line 19 of file arch.py.

tuple miasm2.arch.x86.arch.console_handler = logging.StreamHandler()

Definition at line 14 of file arch.py.

tuple miasm2.arch.x86.arch.crreg = bs(l=3, cls=(x86_rm_cr, ), order =1, fname = "reg")

Definition at line 3051 of file arch.py.

tuple miasm2.arch.x86.arch.d0 = bs("000", fname='reg')

Definition at line 2985 of file arch.py.

tuple miasm2.arch.x86.arch.d1 = bs("001", fname='reg')

Definition at line 2986 of file arch.py.

tuple miasm2.arch.x86.arch.d2 = bs("010", fname='reg')

Definition at line 2987 of file arch.py.

tuple miasm2.arch.x86.arch.d3 = bs("011", fname='reg')

Definition at line 2988 of file arch.py.

tuple miasm2.arch.x86.arch.d4 = bs("100", fname='reg')

Definition at line 2989 of file arch.py.

tuple miasm2.arch.x86.arch.d5 = bs("101", fname='reg')

Definition at line 2990 of file arch.py.

tuple miasm2.arch.x86.arch.d6 = bs("110", fname='reg')

Definition at line 2991 of file arch.py.

tuple miasm2.arch.x86.arch.d7 = bs("111", fname='reg')

Definition at line 2992 of file arch.py.

tuple miasm2.arch.x86.arch.d_ax = bs(l=0, cls=(r_ax, ), fname='ax')

Definition at line 3026 of file arch.py.

tuple miasm2.arch.x86.arch.d_cl = bs(l=0, cls=(r_cl, ), fname='cl')

Definition at line 3028 of file arch.py.

tuple miasm2.arch.x86.arch.d_cl1 = bs(l=1, cls=(bs_cl1,), fname="cl1")

Definition at line 2951 of file arch.py.

tuple miasm2.arch.x86.arch.d_cs = bs(l=0, cls=(bs_cs, ), fname='cs')

Definition at line 3030 of file arch.py.

tuple miasm2.arch.x86.arch.d_ds = bs(l=0, cls=(bs_ds, ), fname='ds')

Definition at line 3031 of file arch.py.

tuple miasm2.arch.x86.arch.d_dx = bs(l=0, cls=(r_dx, ), fname='dx')

Definition at line 3027 of file arch.py.

tuple miasm2.arch.x86.arch.d_eax = bs(l=0, cls=(bs_eax, ), fname='eax')

Definition at line 3021 of file arch.py.

tuple miasm2.arch.x86.arch.d_edx = bs(l=0, cls=(bs_edx, ), fname='edx')

Definition at line 3022 of file arch.py.

tuple miasm2.arch.x86.arch.d_es = bs(l=0, cls=(bs_es, ), fname='es')

Definition at line 3032 of file arch.py.

tuple miasm2.arch.x86.arch.d_fs = bs(l=0, cls=(bs_fs, ), fname='fs')

Definition at line 3034 of file arch.py.

tuple miasm2.arch.x86.arch.d_g1 = bs(l=0, cls=(bs_fbit,), fname="g1")

Definition at line 2947 of file arch.py.

tuple miasm2.arch.x86.arch.d_g2 = bs(l=0, cls=(bs_fbit,), fname="g2")

Definition at line 2948 of file arch.py.

tuple miasm2.arch.x86.arch.d_gs = bs(l=0, cls=(bs_gs, ), fname='gs')

Definition at line 3035 of file arch.py.

tuple miasm2.arch.x86.arch.d_imm = bs(l=0, cls=(bs_cond_imm,), fname="imm")

Definition at line 3024 of file arch.py.

tuple miasm2.arch.x86.arch.d_imm64 = bs(l=0, fname="imm64")

Definition at line 3019 of file arch.py.

tuple miasm2.arch.x86.arch.d_rex_b = bs(l=0, cls=(bs_fbit,), fname="rex_b")

Definition at line 2945 of file arch.py.

tuple miasm2.arch.x86.arch.d_rex_p = bs(l=0, cls=(bs_fbit,), fname="rex_p")

Definition at line 2941 of file arch.py.

tuple miasm2.arch.x86.arch.d_rex_r = bs(l=0, cls=(bs_fbit,), fname="rex_r")

Definition at line 2943 of file arch.py.

tuple miasm2.arch.x86.arch.d_rex_w = bs(l=0, cls=(bs_fbit,), fname="rex_w")

Definition at line 2942 of file arch.py.

tuple miasm2.arch.x86.arch.d_rex_x = bs(l=0, cls=(bs_fbit,), fname="rex_x")

Definition at line 2944 of file arch.py.

tuple miasm2.arch.x86.arch.d_ss = bs(l=0, cls=(bs_ss, ), fname='ss')

Definition at line 3033 of file arch.py.

tuple miasm2.arch.x86.arch.d_st = bs(l=0, cls=(x86_reg_st, ), fname='st')

Definition at line 3023 of file arch.py.

list miasm2.arch.x86.arch.db_afs_64 = []

Definition at line 1417 of file arch.py.

tuple miasm2.arch.x86.arch.dbreg = Group(gpregs16.parser | gpregs32.parser | gpregs64.parser)

Definition at line 135 of file arch.py.

tuple miasm2.arch.x86.arch.deref_mem
Initial value:
1 = Group(mem_size + PTR + Optional(Group(int_or_expr + COLON))
2  + deref_mem_ad)

Definition at line 300 of file arch.py.

tuple miasm2.arch.x86.arch.deref_mem_ad = Group(LBRACK + dbreg + RBRACK)

Definition at line 243 of file arch.py.

tuple miasm2.arch.x86.arch.deref_ptr
Initial value:
1 = Group(int_or_expr + COLON +
2  int_or_expr)

Definition at line 269 of file arch.py.

tuple miasm2.arch.x86.arch.disp = bs(l=0, cls=(bs_cond_disp,), fname = "disp")

Definition at line 2973 of file arch.py.

tuple miasm2.arch.x86.arch.drreg = bs(l=3, cls=(x86_rm_dr, ), order =1, fname = "reg")

Definition at line 3052 of file arch.py.

tuple miasm2.arch.x86.arch.DWORD = Literal('DWORD')

Definition at line 278 of file arch.py.

tuple miasm2.arch.x86.arch.enc2segm = dict([(x[1], x[0]) for x in segm2enc.items()])

Definition at line 445 of file arch.py.

string miasm2.arch.x86.arch.f_imm = 'IMM'

Definition at line 37 of file arch.py.

dictionary miasm2.arch.x86.arch.f_imm2size
Initial value:
1 = {f_s08: 8, f_s16: 16, f_s32: 32, f_s64: 64,
2  f_u08: 8, f_u16: 16, f_u32: 32, f_u64: 64}

Definition at line 39 of file arch.py.

string miasm2.arch.x86.arch.f_isad = "AD"

Definition at line 28 of file arch.py.

string miasm2.arch.x86.arch.f_s08 = "S08"

Definition at line 29 of file arch.py.

string miasm2.arch.x86.arch.f_s16 = "S16"

Definition at line 31 of file arch.py.

string miasm2.arch.x86.arch.f_s32 = "S32"

Definition at line 33 of file arch.py.

string miasm2.arch.x86.arch.f_s64 = "S64"

Definition at line 35 of file arch.py.

string miasm2.arch.x86.arch.f_u08 = "U08"

Definition at line 30 of file arch.py.

string miasm2.arch.x86.arch.f_u16 = "U16"

Definition at line 32 of file arch.py.

string miasm2.arch.x86.arch.f_u32 = "U32"

Definition at line 34 of file arch.py.

string miasm2.arch.x86.arch.f_u64 = "U64"

Definition at line 36 of file arch.py.

tuple miasm2.arch.x86.arch.fltreg = bs(l=3, cls=(x86_rm_flt, ), order =1, fname = "reg")

Definition at line 3059 of file arch.py.

tuple miasm2.arch.x86.arch.gpreg
Initial value:
1 = (gpregs08.parser | gpregs08_64.parser | gpregs16.parser |
2  gpregs32.parser | gpregs64.parser | gpregs_xmm.parser |
3  gpregs_mm.parser)

Definition at line 136 of file arch.py.

miasm2.arch.x86.arch.int_or_expr = base_expr

Definition at line 241 of file arch.py.

dictionary miasm2.arch.x86.arch.invmode = {16: 32, 32: 16}

Definition at line 350 of file arch.py.

tuple miasm2.arch.x86.arch.LBRACK = Suppress("[")

Definition at line 132 of file arch.py.

tuple miasm2.arch.x86.arch.log = logging.getLogger("x86_arch")

Definition at line 13 of file arch.py.

tuple miasm2.arch.x86.arch.mem_size = Group(BYTE | DWORD | QWORD | WORD | TBYTE | XMMWORD)

Definition at line 299 of file arch.py.

dictionary miasm2.arch.x86.arch.MEMPREFIX2SIZE
Initial value:
1 = {'BYTE': 8, 'WORD': 16, 'DWORD': 32,
2  'QWORD': 64, 'TBYTE': 80, 'XMMWORD': 128}

Definition at line 283 of file arch.py.

tuple miasm2.arch.x86.arch.mm_reg = bs(l=3, cls=(x86_rm_reg_mm, ), order =1, fname = "reg")

Definition at line 3055 of file arch.py.

tuple miasm2.arch.x86.arch.mmreg = bs(l=0, fname="mmreg")

Definition at line 2962 of file arch.py.

tuple miasm2.arch.x86.arch.mod = bs(l=2, fname="mod")

Definition at line 3044 of file arch.py.

tuple miasm2.arch.x86.arch.mod_mem = bs(l=2, cls=(bs_mem,), fname="mod")

Definition at line 3045 of file arch.py.

tuple miasm2.arch.x86.arch.moff = bs(l=0, cls=(bs_moff,), fname="off")

Definition at line 3041 of file arch.py.

tuple miasm2.arch.x86.arch.movoff = bs(l=0, cls=(bs_movoff,), fname="off")

Definition at line 3043 of file arch.py.

tuple miasm2.arch.x86.arch.msegoff = bs(l=16, cls=(bs_msegoff,), fname="mseg")

Definition at line 3042 of file arch.py.

tuple miasm2.arch.x86.arch.MULT = Suppress("*")

Definition at line 127 of file arch.py.

tuple miasm2.arch.x86.arch.my_var_parser = parse_ast(ast_id2expr, ast_int2expr)

Definition at line 238 of file arch.py.

tuple miasm2.arch.x86.arch.no_xmm_pref = bs(l=0, fname="no_xmm_pref")

Definition at line 2967 of file arch.py.

tuple miasm2.arch.x86.arch.PLUS = Suppress("+")

Definition at line 126 of file arch.py.

tuple miasm2.arch.x86.arch.pref_66 = bs(l=0, fname="prefixed", default="\x66")

Definition at line 2966 of file arch.py.

tuple miasm2.arch.x86.arch.pref_f2 = bs(l=0, fname="prefixed", default="\xf2")

Definition at line 2964 of file arch.py.

tuple miasm2.arch.x86.arch.pref_f3 = bs(l=0, fname="prefixed", default="\xf3")

Definition at line 2965 of file arch.py.

tuple miasm2.arch.x86.arch.PTR = Suppress('PTR')

Definition at line 273 of file arch.py.

tuple miasm2.arch.x86.arch.QWORD = Literal('QWORD')

Definition at line 279 of file arch.py.

tuple miasm2.arch.x86.arch.RBRACK = Suppress("]")

Definition at line 133 of file arch.py.

tuple miasm2.arch.x86.arch.reg = bs(l=3, cls=(x86_reg, ), order =1, fname = "reg")

Definition at line 3048 of file arch.py.

tuple miasm2.arch.x86.arch.regnoarg = bs(l=3, default_val="000", order=1, fname="reg")

Definition at line 3049 of file arch.py.

tuple miasm2.arch.x86.arch.rel_off = bs(l=0, cls=(bs_rel_off,), fname="off", order=-1)

Definition at line 3038 of file arch.py.

tuple miasm2.arch.x86.arch.rel_off08 = bs(l=8, cls=(bs_rel_off08,), fname="off", order=-1)

Definition at line 3040 of file arch.py.

list miasm2.arch.x86.arch.repeat_mn
Initial value:
1 = ["INS", "OUTS",
2  "MOVSB", "MOVSW", "MOVSD", "MOVSQ",
3  "SCASB", "SCASW", "SCASD", "SCASQ",
4  "LODSB", "LODSW", "LODSD", "LODSQ",
5  "STOSB", "STOSW", "STOSD", "STOSQ",
6  "CMPSB", "CMPSW", "CMPSD", "CMPSQ",
7  ]

Definition at line 436 of file arch.py.

dictionary miasm2.arch.x86.arch.replace_regs
Initial value:
1 = {16: replace_regs16,
2  32: replace_regs32,
3  64: replace_regs64}

Definition at line 120 of file arch.py.

dictionary miasm2.arch.x86.arch.replace_regs16
Initial value:
1 = {
2  AL: AX[:8], CL: CX[:8], DL: DX[:8], BL: BX[:8],
3  AH: AX[8:16], CH: CX[8:16], DH: DX[8:16], BH: BX[8:16],
4 
5  AX: AX[:16], CX: CX[:16], DX: DX[:16], BX: BX[:16],
6  SP: SP[:16], BP: BP[:16], SI: SI[:16], DI: DI[:16],
7 
8 
9  ExprId("ST", 64): float_st0,
10  ExprId("ST(0)", 64): float_st0,
11  ExprId("ST(1)", 64): float_st1,
12  ExprId("ST(2)", 64): float_st2,
13  ExprId("ST(3)", 64): float_st3,
14  ExprId("ST(4)", 64): float_st4,
15  ExprId("ST(5)", 64): float_st5,
16  ExprId("ST(6)", 64): float_st6,
17  ExprId("ST(7)", 64): float_st7,
18 
19 }

Definition at line 100 of file arch.py.

dictionary miasm2.arch.x86.arch.replace_regs32
Initial value:
1 = {
2  AL: EAX[:8], CL: ECX[:8], DL: EDX[:8], BL: EBX[:8],
3  AH: EAX[8:16], CH: ECX[8:16], DH: EDX[8:16], BH: EBX[8:16],
4 
5  AX: EAX[:16], CX: ECX[:16], DX: EDX[:16], BX: EBX[:16],
6  SP: ESP[:16], BP: EBP[:16], SI: ESI[:16], DI: EDI[:16],
7 
8  IP: EIP[:16],
9 
10 
11  ExprId("ST", 64): float_st0,
12  ExprId("ST(0)", 64): float_st0,
13  ExprId("ST(1)", 64): float_st1,
14  ExprId("ST(2)", 64): float_st2,
15  ExprId("ST(3)", 64): float_st3,
16  ExprId("ST(4)", 64): float_st4,
17  ExprId("ST(5)", 64): float_st5,
18  ExprId("ST(6)", 64): float_st6,
19  ExprId("ST(7)", 64): float_st7,
20 
21 }

Definition at line 78 of file arch.py.

dictionary miasm2.arch.x86.arch.replace_regs64
Initial value:
1 = {
2  AL: RAX[:8], CL: RCX[:8], DL: RDX[:8], BL: RBX[:8],
3  AH: RAX[8:16], CH: RCX[8:16], DH: RDX[8:16], BH: RBX[8:16],
4  SPL: RSP[0:8], BPL: RBP[0:8], SIL: RSI[0:8], DIL: RDI[0:8],
5  R8B: R8[0:8], R9B: R9[0:8], R10B: R10[0:8], R11B: R11[0:8],
6  R12B: R12[0:8], R13B: R13[0:8], R14B: R14[0:8], R15B: R15[0:8],
7 
8  AX: RAX[:16], CX: RCX[:16], DX: RDX[:16], BX: RBX[:16],
9  SP: RSP[:16], BP: RBP[:16], SI: RSI[:16], DI: RDI[:16],
10  R8W: R8[:16], R9W: R9[:16], R10W: R10[:16], R11W: R11[:16],
11  R12W: R12[:16], R13W: R13[:16], R14W: R14[:16], R15W: R15[:16],
12 
13  EAX: RAX[:32], ECX: RCX[:32], EDX: RDX[:32], EBX: RBX[:32],
14  ESP: RSP[:32], EBP: RBP[:32], ESI: RSI[:32], EDI: RDI[:32],
15  R8D: R8[:32], R9D: R9[:32], R10D: R10[:32], R11D: R11[:32],
16  R12D: R12[:32], R13D: R13[:32], R14D: R14[:32], R15D: R15[:32],
17 
18  IP: RIP[:16], EIP: RIP[:32],
19 
20  ExprId("ST", 64): float_st0,
21  ExprId("ST(0)", 64): float_st0,
22  ExprId("ST(1)", 64): float_st1,
23  ExprId("ST(2)", 64): float_st2,
24  ExprId("ST(3)", 64): float_st3,
25  ExprId("ST(4)", 64): float_st4,
26  ExprId("ST(5)", 64): float_st5,
27  ExprId("ST(6)", 64): float_st6,
28  ExprId("ST(7)", 64): float_st7,
29 
30 }

Definition at line 47 of file arch.py.

tuple miasm2.arch.x86.arch.rm = bs(l=3, fname="rm")

Definition at line 3061 of file arch.py.

tuple miasm2.arch.x86.arch.rm_arg = bs(l=0, cls=(x86_rm_arg,), fname='rmarg')

Definition at line 3063 of file arch.py.

tuple miasm2.arch.x86.arch.rm_arg_m08 = bs(l=0, cls=(x86_rm_m08,), fname='rmarg')

Definition at line 3071 of file arch.py.

tuple miasm2.arch.x86.arch.rm_arg_m16 = bs(l=0, cls=(x86_rm_m16,), fname='rmarg')

Definition at line 3072 of file arch.py.

tuple miasm2.arch.x86.arch.rm_arg_m64 = bs(l=0, cls=(x86_rm_m64,), fname='rmarg')

Definition at line 3069 of file arch.py.

tuple miasm2.arch.x86.arch.rm_arg_m80 = bs(l=0, cls=(x86_rm_m80,), fname='rmarg')

Definition at line 3070 of file arch.py.

tuple miasm2.arch.x86.arch.rm_arg_mm = bs(l=0, cls=(x86_rm_mm,), fname='rmarg')

Definition at line 3074 of file arch.py.

tuple miasm2.arch.x86.arch.rm_arg_mm_m64 = bs(l=0, cls=(x86_rm_mm_m64,), fname='rmarg')

Definition at line 3075 of file arch.py.

tuple miasm2.arch.x86.arch.rm_arg_sd = bs(l=0, cls=(x86_rm_sd,), fname='rmarg')

Definition at line 3067 of file arch.py.

tuple miasm2.arch.x86.arch.rm_arg_sx = bs(l=0, cls=(x86_rm_sx,), fname='rmarg')

Definition at line 3065 of file arch.py.

tuple miasm2.arch.x86.arch.rm_arg_sxd = bs(l=0, cls=(x86_rm_sxd,), fname='rmarg')

Definition at line 3066 of file arch.py.

tuple miasm2.arch.x86.arch.rm_arg_w8 = bs(l=0, cls=(x86_rm_w8,), fname='rmarg')

Definition at line 3064 of file arch.py.

tuple miasm2.arch.x86.arch.rm_arg_wd = bs(l=0, cls=(x86_rm_wd,), fname='rmarg')

Definition at line 3068 of file arch.py.

tuple miasm2.arch.x86.arch.rm_arg_xmm = bs(l=0, cls=(x86_rm_xmm,), fname='rmarg')

Definition at line 3077 of file arch.py.

tuple miasm2.arch.x86.arch.rm_arg_xmm_m32 = bs(l=0, cls=(x86_rm_xmm_m32,), fname='rmarg')

Definition at line 3078 of file arch.py.

tuple miasm2.arch.x86.arch.rm_arg_xmm_m64 = bs(l=0, cls=(x86_rm_xmm_m64,), fname='rmarg')

Definition at line 3079 of file arch.py.

tuple miasm2.arch.x86.arch.rmarg
Initial value:
1 = Group(gpregs08.parser |
2  gpregs08_64.parser |
3  gpregs16.parser |
4  gpregs32.parser |
5  gpregs64.parser |
6  gpregs_mm.parser |
7  gpregs_xmm.parser
8  )

Definition at line 304 of file arch.py.

tuple miasm2.arch.x86.arch.rmreg = bs(l=3, cls=(x86_rm_reg, ), order =1, fname = "reg")

Definition at line 3047 of file arch.py.

tuple miasm2.arch.x86.arch.s08 = bs(l=8, cls=(bs_s08, ))

Definition at line 2975 of file arch.py.

tuple miasm2.arch.x86.arch.s3264 = bs(l=32, cls=(x86_s32to64, m_arg))

Definition at line 2981 of file arch.py.

tuple miasm2.arch.x86.arch.sd = bs(l=1, fname="sd")

Definition at line 2994 of file arch.py.

tuple miasm2.arch.x86.arch.se = bs(l=1, fname="se")

Definition at line 2955 of file arch.py.

tuple miasm2.arch.x86.arch.segm = bs(l=3, cls=(x86_rm_segm, ), order =1, fname = "reg")

Definition at line 3050 of file arch.py.

dictionary miasm2.arch.x86.arch.segm2enc = {CS: 1, SS: 2, DS: 3, ES: 4, FS: 5, GS: 6}

Definition at line 444 of file arch.py.

list miasm2.arch.x86.arch.sib_64_s08_ebp = []

Definition at line 1418 of file arch.py.

tuple miasm2.arch.x86.arch.sib_base = bs(l=3, cls=(bs_cond_index,), fname = "sib_base")

Definition at line 2971 of file arch.py.

tuple miasm2.arch.x86.arch.sib_index = bs(l=3, cls=(bs_cond_index,), fname = "sib_index")

Definition at line 2970 of file arch.py.

tuple miasm2.arch.x86.arch.sib_scale = bs(l=2, cls=(bs_cond_scale,), fname = "sib_scale")

Definition at line 2969 of file arch.py.

dictionary miasm2.arch.x86.arch.size2gpregs
Initial value:
1 = {8: gpregs08, 16: gpregs16,
2  32: gpregs32, 64: gpregs64}

Definition at line 43 of file arch.py.

tuple miasm2.arch.x86.arch.SIZE2MEMPREFIX = dict((x[1], x[0]) for x in MEMPREFIX2SIZE.items())

Definition at line 286 of file arch.py.

dictionary miasm2.arch.x86.arch.SIZE2XMMREG
Initial value:
1 = {64:gpregs_mm,
2  128:gpregs_xmm}

Definition at line 1696 of file arch.py.

tuple miasm2.arch.x86.arch.stk = bs(l=0, fname="stk")

Definition at line 2997 of file arch.py.

tuple miasm2.arch.x86.arch.swapargs = bs_swapargs(l=1, fname="swap", mn_mod=range(1 << 1))

Definition at line 3081 of file arch.py.

tuple miasm2.arch.x86.arch.sx = bs(l=0, fname="sx")

Definition at line 2957 of file arch.py.

tuple miasm2.arch.x86.arch.sxd = bs(l=0, fname="sx")

Definition at line 2958 of file arch.py.

tuple miasm2.arch.x86.arch.TBYTE = Literal('TBYTE')

Definition at line 280 of file arch.py.

tuple miasm2.arch.x86.arch.u07 = bs(l=7, cls=(x86_08, m_arg))

Definition at line 2978 of file arch.py.

tuple miasm2.arch.x86.arch.u08 = bs(l=8, cls=(x86_08, m_arg))

Definition at line 2977 of file arch.py.

tuple miasm2.arch.x86.arch.u08_3 = bs(l=0, cls=(x86_imm_fix, m_arg), ival = 3)

Definition at line 2983 of file arch.py.

tuple miasm2.arch.x86.arch.u16 = bs(l=16, cls=(x86_16, m_arg))

Definition at line 2979 of file arch.py.

tuple miasm2.arch.x86.arch.u32 = bs(l=32, cls=(x86_32, m_arg))

Definition at line 2980 of file arch.py.

list miasm2.arch.x86.arch.unconditional_branch = ['JMP', 'JMPF']

Definition at line 26 of file arch.py.

tuple miasm2.arch.x86.arch.w8 = bs(l=1, fname="w8")

Definition at line 2954 of file arch.py.

tuple miasm2.arch.x86.arch.wd = bs(l=1, fname="wd")

Definition at line 2995 of file arch.py.

tuple miasm2.arch.x86.arch.WORD = Literal('WORD')

Definition at line 277 of file arch.py.

tuple miasm2.arch.x86.arch.xmm_reg = bs(l=3, cls=(x86_rm_reg_xmm, ), order =1, fname = "reg")

Definition at line 3056 of file arch.py.

tuple miasm2.arch.x86.arch.xmmreg = bs(l=0, fname="xmmreg")

Definition at line 2961 of file arch.py.

tuple miasm2.arch.x86.arch.XMMWORD = Literal('XMMWORD')

Definition at line 281 of file arch.py.