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

Classes

class  additional_info
 
class  arm_cpreg
 
class  arm_deref
 
class  arm_gpreg
 
class  arm_gpreg_h
 
class  arm_gpreg_l
 
class  arm_gpreg_l_noarg
 
class  arm_gpreg_noarg
 
class  arm_gpreg_nosppc
 
class  arm_imm
 
class  arm_imm8_12
 
class  arm_imm_4_12
 
class  arm_immed
 
class  arm_off7
 
class  arm_off8sppc
 
class  arm_offbw
 
class  arm_offh
 
class  arm_offpc
 
class  arm_offreg
 
class  arm_offs
 
class  arm_offs_blx
 
class  arm_offsp
 
class  arm_offspc
 
class  arm_op2
 
class  arm_op2imm
 
class  arm_preg
 
class  arm_psr
 
class  arm_reg
 
class  arm_reg_wb
 
class  arm_reg_wb_nosp
 
class  arm_rlist
 
class  arm_sp
 
class  arm_sppc
 
class  arm_widthm1
 
class  armt2_imm10l
 
class  armt2_imm11l
 
class  armt2_imm12
 
class  armt2_rot_rm
 
class  armt_gpreg_rm_shift_off
 
class  armt_imm5_1
 
class  armt_reg_wb
 
class  armt_rlist
 
class  armt_rlist_pclr
 
class  bs_lnk
 
class  instruction_arm
 
class  instruction_armt
 
class  mn_arm
 
class  mn_armt
 
class  mul_part_x
 
class  mul_part_y
 
class  ppi_b_nosp_mn
 
class  ppi_b_sp_mn
 
class  updown_b_nosp_mn
 
class  updown_b_sp_mn
 

Functions

def tok_reg_duo
 
def check_bounds
 
def reglistparse
 
def op_shift2expr
 
def shift2expr
 
def ast_id2expr
 
def ast_int2expr
 
def deref2expr_nooff
 
def deref2expr_pre
 
def deref2expr_pre_mem
 
def deref2expr_post
 
def deref_wb
 
def parsegpreg_wb
 
def permut_args
 
def reglist2str
 
def armop
 
def armtop
 

Variables

tuple log = logging.getLogger("armdis")
 
tuple console_handler = logging.StreamHandler()
 
tuple reg_dum = ExprId('DumReg')
 
list regs_str = ['R%d' % r for r in xrange(0x10)]
 
list regs_expr = [ExprId(x, 32) for x in regs_str]
 
tuple gpregs = reg_info(regs_str, regs_expr)
 
tuple gpregs_pc = reg_info(regs_str[-1:], regs_expr[-1:])
 
tuple gpregs_sp = reg_info(regs_str[13:14], regs_expr[13:14])
 
tuple gpregs_nosppc
 
string sr_flags = "cxsf"
 
list cpsr_regs_str = []
 
list spsr_regs_str = []
 
string o = ""
 
list cpsr_regs_expr = [ExprId(x, 32) for x in cpsr_regs_str]
 
list spsr_regs_expr = [ExprId(x, 32) for x in spsr_regs_str]
 
tuple cpsr_regs = reg_info(cpsr_regs_str, cpsr_regs_expr)
 
tuple spsr_regs = reg_info(spsr_regs_str, spsr_regs_expr)
 
list cpregs_str = ['c%d' % r for r in xrange(0x10)]
 
list cpregs_expr = [ExprId(x) for x in cpregs_str]
 
tuple cp_regs = reg_info(cpregs_str, cpregs_expr)
 
list pregs_str = ['p%d' % r for r in xrange(0x10)]
 
list pregs_expr = [ExprId(x) for x in pregs_str]
 
tuple p_regs = reg_info(pregs_str, pregs_expr)
 
list conditional_branch
 
list unconditional_branch = ["B", "BX", "BL", "BLX"]
 
tuple LPARENTHESIS = Literal("(")
 
tuple RPARENTHESIS = Literal(")")
 
tuple LACC = Suppress(Literal("{"))
 
tuple RACC = Suppress(Literal("}"))
 
tuple MINUS = Suppress(Literal("-"))
 
tuple CIRCUNFLEX = Literal("^")
 
tuple int_1_31 = str_int.copy()
 
tuple int_1_32 = str_int.copy()
 
list allshifts = ['<<', '>>', 'a>>', '>>>', 'rrx']
 
list allshifts_armt = ['<<', '>>', 'a>>', '>>>', 'rrx']
 
dictionary shift2expr_dct
 
tuple expr2shift_dct = dict([(x[1], x[0]) for x in shift2expr_dct.items()])
 
tuple reg_duo
 
 reg_or_duo = reg_duo|gpregs.parser
 
tuple gpreg_list
 
tuple LBRACK = Suppress("[")
 
tuple RBRACK = Suppress("]")
 
tuple COMMA = Suppress(",")
 
tuple all_binaryop_1_31_shifts_t
 
tuple all_binaryop_1_32_shifts_t
 
tuple all_unaryop_shifts_t = literal_list(['RRX'])
 
tuple allshifts_t_armt
 
 gpreg_p = gpregs.parser
 
 psr_p = cpsr_regs.parser|spsr_regs.parser
 
 int_or_expr = base_expr
 
tuple my_var_parser = parse_ast(ast_id2expr, ast_int2expr)
 
tuple shift_off
 
tuple deref_nooff
 
tuple deref_pre
 
tuple deref_post
 
tuple deref
 
tuple gpregs_wb = Group(gpregs.parser + Optional('!'))
 
list cond_list
 
tuple cond_dct = dict([(x[1], x[0]) for x in enumerate(cond_list)])
 
tuple bm_cond = bs_mod_name(l=4, fname='cond', mn_mod=cond_list)
 
tuple accum = bs(l=1)
 
tuple scc = bs_mod_name(l=1, fname='scc', mn_mod=['', 'S'])
 
tuple dumscc = bs("1")
 
tuple rd = bs(l=4, cls=(arm_gpreg,))
 
tuple rdl = bs(l=4, cls=(arm_gpreg,))
 
tuple rn = bs(l=4, cls=(arm_gpreg,), fname="rn")
 
tuple rs = bs(l=4, cls=(arm_gpreg,))
 
tuple rm = bs(l=4, cls=(arm_gpreg,))
 
tuple op2 = bs(l=12, cls=(arm_op2,))
 
tuple lnk = bs_lnk(l=1, fname='lnk', mn_mod=['', 'L'])
 
tuple offs = bs(l=24, cls=(arm_offs,), fname="offs")
 
tuple rn_noarg = bs(l=4, cls=(arm_gpreg_noarg,), fname="rn")
 
tuple rm_noarg = bs(l=4, cls=(arm_gpreg_noarg,), fname="rm", order = -1)
 
tuple immop = bs(l=1, fname='immop')
 
tuple dumr = bs(l=4, default_val="0000", fname="dumr")
 
tuple psr = bs(l=1, fname="psr")
 
tuple psr_field = bs(l=4, cls=(arm_psr,))
 
tuple ppi = bs(l=1, fname='ppi')
 
tuple updown = bs(l=1, fname='updown')
 
tuple trb = bs_mod_name(l=1, fname='trb', mn_mod=['', 'B'])
 
tuple wback = bs_mod_name(l=1, fname="wback", mn_mod=['', 'T'])
 
tuple wback_no_t = bs(l=1, fname="wback")
 
tuple op2imm = bs(l=12, cls=(arm_op2imm,))
 
tuple updown_b_nosp = updown_b_nosp_mn(l=1, mn_mod=['D', 'I'], fname='updown')
 
tuple ppi_b_nosp = ppi_b_nosp_mn(l=1, mn_mod=['A', 'B'], fname='ppi')
 
tuple updown_b_sp = updown_b_sp_mn(l=1, mn_mod=['A', 'D'], fname='updown')
 
tuple ppi_b_sp = ppi_b_sp_mn(l=1, mn_mod=['F', 'E'], fname='ppi')
 
tuple sbit = bs(l=1, fname="sbit")
 
tuple rn_sp = bs("1101", cls=(arm_reg_wb,), fname='rnsp')
 
tuple rn_wb = bs(l=4, cls=(arm_reg_wb_nosp,), fname='rn')
 
tuple rlist = bs(l=16, cls=(arm_rlist,), fname='rlist')
 
tuple swi_i = bs(l=24, cls=(arm_imm,), fname="swi_i")
 
tuple opc = bs(l=4, cls=(arm_imm, m_arg), fname='opc')
 
tuple crn = bs(l=4, cls=(arm_cpreg,), fname='crn')
 
tuple crd = bs(l=4, cls=(arm_cpreg,), fname='crd')
 
tuple crm = bs(l=4, cls=(arm_cpreg,), fname='crm')
 
tuple cpnum = bs(l=4, cls=(arm_preg,), fname='cpnum')
 
tuple cp = bs(l=3, cls=(arm_imm, m_arg), fname='cp')
 
tuple imm8_12 = bs(l=8, cls=(arm_imm8_12, m_arg), fname='imm')
 
tuple tl = bs_mod_name(l=1, fname="tl", mn_mod=['', 'L'])
 
tuple cpopc = bs(l=3, cls=(arm_imm, m_arg), fname='cpopc')
 
tuple imm20 = bs(l=20, cls=(arm_imm, m_arg))
 
tuple imm4 = bs(l=4, cls=(arm_imm, m_arg))
 
tuple imm12 = bs(l=12, cls=(arm_imm, m_arg))
 
tuple imm16 = bs(l=16, cls=(arm_imm, m_arg))
 
tuple imm4_noarg = bs(l=4, fname="imm4")
 
tuple imm_4_12 = bs(l=12, cls=(arm_imm_4_12,))
 
tuple lowb = bs(l=1, fname='lowb')
 
tuple offs_blx = bs(l=24, cls=(arm_offs_blx,), fname="offs")
 
tuple fix_cond = bs("1111", fname="cond")
 
tuple mul_x = mul_part_x(l=1, fname='x', mn_mod=['B', 'T'])
 
tuple mul_y = mul_part_y(l=1, fname='y', mn_mod=['B', 'T'])
 
tuple immedH = bs(l=4, fname='immedH')
 
tuple immedL = bs(l=4, cls=(arm_immed, m_arg), fname='immedL')
 
tuple hb = bs(l=1)
 
tuple rot_rm = bs(l=2, cls=(armt2_rot_rm,), fname="rot_rm")
 
list op_list
 
dictionary data_mov_name = {'MOV': 13, 'MVN': 15}
 
dictionary data_test_name = {'TST': 8, 'TEQ': 9, 'CMP': 10, 'CMN': 11}
 
dictionary data_name = {}
 
tuple bs_data_name = bs_name(l=4, name=data_name)
 
tuple bs_data_mov_name = bs_name(l=4, name=data_mov_name)
 
tuple bs_data_test_name = bs_name(l=4, name=data_test_name)
 
dictionary transfer_name = {'STR': 0, 'LDR': 1}
 
tuple bs_transfer_name = bs_name(l=1, name=transfer_name)
 
dictionary transferh_name = {'STRH': 0, 'LDRH': 1}
 
tuple bs_transferh_name = bs_name(l=1, name=transferh_name)
 
dictionary transfer_ldr_name = {'LDRD': 0, 'LDRSB': 1}
 
tuple bs_transfer_ldr_name = bs_name(l=1, name=transfer_ldr_name)
 
dictionary btransfer_name = {'STM': 0, 'LDM': 1}
 
tuple bs_btransfer_name = bs_name(l=1, name=btransfer_name)
 
dictionary ctransfer_name = {'STC': 0, 'LDC': 1}
 
tuple bs_ctransfer_name = bs_name(l=1, name=ctransfer_name)
 
dictionary mr_name = {'MCR': 0, 'MRC': 1}
 
tuple bs_mr_name = bs_name(l=1, name=mr_name)
 
tuple widthm1 = bs(l=5, cls=(arm_widthm1, m_arg))
 
tuple lsb = bs(l=5, cls=(arm_imm, m_arg))
 
tuple gpregs_l = reg_info(regs_str[:8], regs_expr[:8])
 
tuple gpregs_h = reg_info(regs_str[8:], regs_expr[8:])
 
tuple gpregs_sppc
 
tuple deref_low
 
tuple deref_pc
 
tuple deref_sp
 
tuple gpregs_l_wb
 
tuple off5 = bs(l=5, cls=(arm_imm,), fname="off")
 
tuple off3 = bs(l=3, cls=(arm_imm,), fname="off")
 
tuple off8 = bs(l=8, cls=(arm_imm,), fname="off")
 
tuple off7 = bs(l=7, cls=(arm_off7,), fname="off")
 
tuple rnl = bs(l=3, cls=(arm_gpreg_l,), fname="rn")
 
tuple rsl = bs(l=3, cls=(arm_gpreg_l,), fname="rs")
 
tuple rml = bs(l=3, cls=(arm_gpreg_l,), fname="rm")
 
tuple rol = bs(l=3, cls=(arm_gpreg_l,), fname="ro")
 
tuple rbl = bs(l=3, cls=(arm_gpreg_l,), fname="rb")
 
tuple rbl_deref = bs(l=3, cls=(arm_deref,), fname="rb")
 
tuple dumrh = bs(l=3, default_val="000")
 
tuple rdh = bs(l=3, cls=(arm_gpreg_h,), fname="rd")
 
tuple rsh = bs(l=3, cls=(arm_gpreg_h,), fname="rs")
 
tuple offpc8 = bs(l=8, cls=(arm_offpc,), fname="offs")
 
tuple offsp8 = bs(l=8, cls=(arm_offsp,), fname="offs")
 
tuple rol_noarg = bs(l=3, cls=(arm_gpreg_l_noarg,), fname="off")
 
tuple off5bw = bs(l=5, cls=(arm_offbw,), fname="off")
 
tuple off5h = bs(l=5, cls=(arm_offh,), fname="off")
 
tuple sppc = bs(l=1, cls=(arm_sppc,))
 
tuple pclr = bs(l=1, fname='pclr')
 
tuple sp = bs(l=0, cls=(arm_sp,))
 
tuple off8s = bs(l=8, cls=(arm_offs,), fname="offs")
 
tuple trlistpclr = bs(l=8, cls=(armt_rlist_pclr,))
 
tuple trlist = bs(l=8, cls=(armt_rlist,), fname="trlist", order = -1)
 
tuple rbl_wb = bs(l=3, cls=(armt_reg_wb,), fname='rb')
 
tuple offs8 = bs(l=8, cls=(arm_offspc,), fname="offs")
 
tuple offs11 = bs(l=11, cls=(arm_offspc,), fname="offs")
 
tuple hl = bs(l=1, prio=default_prio + 1, fname='hl')
 
tuple off8sppc = bs(l=8, cls=(arm_off8sppc,), fname="off")
 
tuple imm8_d1 = bs(l=8, default_val="00000001")
 
tuple imm8 = bs(l=8, cls=(arm_imm,), default_val = "00000001")
 
dictionary mshift_name = {'LSLS': 0, 'LSRS': 1, 'ASRS': 2}
 
tuple bs_mshift_name = bs_name(l=2, name=mshift_name)
 
dictionary addsub_name = {'ADDS': 0, 'SUBS': 1}
 
tuple bs_addsub_name = bs_name(l=1, name=addsub_name)
 
dictionary mov_cmp_add_sub_name = {'MOVS': 0, 'CMP': 1, 'ADDS': 2, 'SUBS': 3}
 
tuple bs_mov_cmp_add_sub_name = bs_name(l=2, name=mov_cmp_add_sub_name)
 
dictionary alu_name
 
tuple bs_alu_name = bs_name(l=4, name=alu_name)
 
dictionary hiregop_name = {'ADDS': 0, 'CMP': 1, 'MOV': 2}
 
tuple bs_hiregop_name = bs_name(l=2, name=hiregop_name)
 
dictionary ldr_str_name = {'STR': 0, 'LDR': 1}
 
tuple bs_ldr_str_name = bs_name(l=1, name=ldr_str_name)
 
dictionary ldrh_strh_name = {'STRH': 0, 'LDRH': 1}
 
tuple bs_ldrh_strh_name = bs_name(l=1, name=ldrh_strh_name)
 
dictionary ldstsp_name = {'STR': 0, 'LDR': 1}
 
tuple bs_ldstsp_name = bs_name(l=1, name=ldstsp_name)
 
dictionary addsubsp_name = {'ADD': 0, 'SUB': 1}
 
tuple bs_addsubsp_name = bs_name(l=1, name=addsubsp_name)
 
dictionary pushpop_name = {'PUSH': 0, 'POP': 1}
 
tuple bs_pushpop_name = bs_name(l=1, name=pushpop_name, fname='pp')
 
dictionary tbtransfer_name = {'STMIA': 0, 'LDMIA': 1}
 
tuple bs_tbtransfer_name = bs_name(l=1, name=tbtransfer_name)
 
dictionary br_name
 
tuple bs_br_name = bs_name(l=4, name=br_name)
 
tuple armt_gpreg_shift_off
 
tuple rn_nosppc = bs(l=4, cls=(arm_gpreg_nosppc,), fname="rn")
 
tuple rd_nosppc = bs(l=4, cls=(arm_gpreg_nosppc,), fname="rd")
 
tuple rm_sh = bs(l=4, cls=(armt_gpreg_rm_shift_off,), fname="rm")
 
tuple imm12_1 = bs(l=1, fname="imm12_1", order=1)
 
tuple imm12_3 = bs(l=3, fname="imm12_3", order=1)
 
tuple imm12_8 = bs(l=8, cls=(armt2_imm12,), fname="imm", order=2)
 
tuple imm5_3 = bs(l=3, fname="imm5_3")
 
tuple imm5_2 = bs(l=2, fname="imm5_2")
 
tuple imm_stype = bs(l=2, fname="stype")
 
tuple imm1 = bs(l=1, fname="imm1")
 
tuple imm5_off = bs(l=5, cls=(armt_imm5_1,), fname="imm5_off")
 
tuple tsign = bs(l=1, fname="sign")
 
tuple tj1 = bs(l=1, fname="j1")
 
tuple tj2 = bs(l=1, fname="j2")
 
tuple timm10H = bs(l=10, fname="imm10h")
 
tuple timm10L = bs(l=10, cls=(armt2_imm10l,), fname="imm10l")
 
tuple timm11L = bs(l=11, cls=(armt2_imm11l,), fname="imm11l")
 

Function Documentation

def miasm2.arch.arm.arch.armop (   name,
  fields,
  args = None,
  alias = False 
)

Definition at line 1405 of file arch.py.

1406 def armop(name, fields, args=None, alias=False):
1407  dct = {"fields": fields}
1408  dct["alias"] = alias
1409  if args is not None:
1410  dct['args'] = args
1411  type(name, (mn_arm,), dct)
1412 
def miasm2.arch.arm.arch.armtop (   name,
  fields,
  args = None,
  alias = False 
)

Definition at line 1413 of file arch.py.

1414 def armtop(name, fields, args=None, alias=False):
1415  dct = {"fields": fields}
1416  dct["alias"] = alias
1417  if args is not None:
1418  dct['args'] = args
1419  type(name, (mn_armt,), dct)
1420 
def miasm2.arch.arm.arch.ast_id2expr (   t)

Definition at line 169 of file arch.py.

170 def ast_id2expr(t):
171  if not t in mn_arm.regs.all_regs_ids_byname:
172  r = ExprId(asm_label(t))
173  else:
174  r = mn_arm.regs.all_regs_ids_byname[t]
175  return r
176 
def miasm2.arch.arm.arch.ast_int2expr (   a)

Definition at line 177 of file arch.py.

178 def ast_int2expr(a):
179  return ExprInt32(a)
180 

+ Here is the call graph for this function:

def miasm2.arch.arm.arch.check_bounds (   left_bound,
  right_bound,
  value 
)

Definition at line 103 of file arch.py.

104 def check_bounds(left_bound, right_bound, value):
105  if left_bound <= value and value <= right_bound:
106  return ExprInt32(value)
107  else:
108  raise ValueError('shift operator immediate value out of bound')

+ Here is the call graph for this function:

def miasm2.arch.arm.arch.deref2expr_nooff (   s,
  l,
  t 
)

Definition at line 193 of file arch.py.

194 def deref2expr_nooff(s, l, t):
195  t = t[0]
196  # XXX default
197  return ExprOp("preinc", t[0], ExprInt32(0))
198 
def deref2expr_nooff
Definition: arch.py:193

+ Here is the call graph for this function:

def miasm2.arch.arm.arch.deref2expr_post (   s,
  l,
  t 
)

Definition at line 219 of file arch.py.

220 def deref2expr_post(s, l, t):
221  t = t[0]
222  return ExprOp("postinc", t[0], t[1])
223 
def miasm2.arch.arm.arch.deref2expr_pre (   s,
  l,
  t 
)

Definition at line 199 of file arch.py.

200 def deref2expr_pre(s, l, t):
201  t = t[0]
202  if len(t) == 1:
203  return ExprOp("preinc", t[0], ExprInt32(0))
204  elif len(t) == 2:
205  return ExprOp("preinc", t[0], t[1])
206  else:
207  raise NotImplementedError('len(t) > 2')
208 

+ Here is the call graph for this function:

def miasm2.arch.arm.arch.deref2expr_pre_mem (   s,
  l,
  t 
)

Definition at line 209 of file arch.py.

210 def deref2expr_pre_mem(s, l, t):
211  t = t[0]
212  if len(t) == 1:
213  return ExprMem(ExprOp("preinc", t[0], ExprInt32(0)))
214  elif len(t) == 2:
215  return ExprMem(ExprOp("preinc", t[0], t[1]))
216  else:
217  raise NotImplementedError('len(t) > 2')
218 
def deref2expr_pre_mem
Definition: arch.py:209

+ Here is the call graph for this function:

def miasm2.arch.arm.arch.deref_wb (   s,
  l,
  t 
)

Definition at line 224 of file arch.py.

225 def deref_wb(s, l, t):
226  t = t[0]
227  if t[-1] == '!':
228  return ExprMem(ExprOp('wback', *t[:-1]))
229  return ExprMem(t[0])
230 
# shift_off.setParseAction(deref_off)
def miasm2.arch.arm.arch.op_shift2expr (   s,
  l,
  t 
)

Definition at line 129 of file arch.py.

130 def op_shift2expr(s, l, t):
131  return shift2expr_dct[t[0]]
def miasm2.arch.arm.arch.parsegpreg_wb (   s,
  l,
  t 
)

Definition at line 241 of file arch.py.

242 def parsegpreg_wb(s, l, t):
243  t = t[0]
244  if t[-1] == '!':
245  return ExprOp('wback', *t[:-1])
246  return t[0]
def miasm2.arch.arm.arch.permut_args (   order,
  args 
)

Definition at line 261 of file arch.py.

262 def permut_args(order, args):
263  l = []
264  for i, x in enumerate(order):
265  l.append((x.__class__, i))
266  l = dict(l)
267  out = [None for x in xrange(len(args))]
268  for a in args:
269  out[l[a.__class__]] = a
270  return out
271 
def miasm2.arch.arm.arch.reglist2str (   rlist)

Definition at line 1112 of file arch.py.

1113 def reglist2str(rlist):
1114  out = []
1115  i = 0
1116  while i < len(rlist):
1117  j = i + 1
1118  while j < len(rlist) and rlist[j] < 13 and rlist[j] == rlist[j - 1] + 1:
1119  j += 1
1120  j -= 1
1121  if j < i + 2:
1122  out.append(regs_str[rlist[i]])
1123  i += 1
1124  else:
1125  out.append(regs_str[rlist[i]] + '-' + regs_str[rlist[j]])
1126  i = j + 1
1127  return "{" + ", ".join(out) + '}'
1128 

+ Here is the caller graph for this function:

def miasm2.arch.arm.arch.reglistparse (   s,
  l,
  t 
)

Definition at line 113 of file arch.py.

114 def reglistparse(s, l, t):
115  t = t[0]
116  if t[-1] == "^":
117  return ExprOp('sbit', ExprOp('reglist', *t[:-1]))
118  return ExprOp('reglist', *t)
119 
def miasm2.arch.arm.arch.shift2expr (   t)

Definition at line 156 of file arch.py.

157 def shift2expr(t):
158  if len(t) == 1:
159  return t[0]
160  elif len(t) == 2:
161  return ExprOp(t[1], t[0])
162  elif len(t) == 3:
163  return ExprOp(t[1], t[0], t[2])
164 
165 variable, operand, base_expr = gen_base_expr()
def gen_base_expr
Definition: cpu.py:309

+ Here is the call graph for this function:

def miasm2.arch.arm.arch.tok_reg_duo (   s,
  l,
  t 
)

Definition at line 85 of file arch.py.

85 
86 def tok_reg_duo(s, l, t):
87  t = t[0]
88  i1 = gpregs.expr.index(t[0])
89  i2 = gpregs.expr.index(t[1])
90  o = []
91  for i in xrange(i1, i2 + 1):
92  o.append(gpregs.expr[i])
93  return o

Variable Documentation

tuple miasm2.arch.arm.arch.accum = bs(l=1)

Definition at line 1232 of file arch.py.

dictionary miasm2.arch.arm.arch.addsub_name = {'ADDS': 0, 'SUBS': 1}

Definition at line 1918 of file arch.py.

dictionary miasm2.arch.arm.arch.addsubsp_name = {'ADD': 0, 'SUB': 1}

Definition at line 1942 of file arch.py.

tuple miasm2.arch.arm.arch.all_binaryop_1_31_shifts_t
Initial value:
2  ['LSL', 'ROR'])
def literal_list
Definition: cpu.py:80

Definition at line 142 of file arch.py.

tuple miasm2.arch.arm.arch.all_binaryop_1_32_shifts_t
Initial value:
2  ['LSR', 'ASR'])
def literal_list
Definition: cpu.py:80

Definition at line 144 of file arch.py.

tuple miasm2.arch.arm.arch.all_unaryop_shifts_t = literal_list(['RRX'])

Definition at line 146 of file arch.py.

list miasm2.arch.arm.arch.allshifts = ['<<', '>>', 'a>>', '>>>', 'rrx']

Definition at line 120 of file arch.py.

list miasm2.arch.arm.arch.allshifts_armt = ['<<', '>>', 'a>>', '>>>', 'rrx']

Definition at line 121 of file arch.py.

tuple miasm2.arch.arm.arch.allshifts_t_armt
Initial value:
2  ['LSL', 'LSR', 'ASR', 'ROR', 'RRX'])
def literal_list
Definition: cpu.py:80

Definition at line 148 of file arch.py.

dictionary miasm2.arch.arm.arch.alu_name
Initial value:
1 = {'ANDS': 0, 'EORS': 1, 'LSLS': 2, 'LSRS': 3,
2  'ASRS': 4, 'ADCS': 5, 'SBCS': 6, 'RORS': 7,
3  'TST': 8, 'NEGS': 9, 'CMP': 10, 'CMN': 11,
4  'ORRS': 12, 'MULS': 13, 'BICS': 14, 'MVNS': 15}

Definition at line 1924 of file arch.py.

tuple miasm2.arch.arm.arch.armt_gpreg_shift_off
Initial value:
1 = Group(
2  gpregs_nosppc.parser + allshifts_t_armt + base_expr
3 )

Definition at line 2013 of file arch.py.

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

Definition at line 258 of file arch.py.

dictionary miasm2.arch.arm.arch.br_name
Initial value:
1 = {'BEQ': 0, 'BNE': 1, 'BCS': 2, 'BCC': 3, 'BMI': 4,
2  'BPL': 5, 'BVS': 6, 'BVC': 7, 'BHI': 8, 'BLS': 9,
3  'BGE': 10, 'BLT': 11, 'BGT': 12, 'BLE': 13}

Definition at line 1951 of file arch.py.

tuple miasm2.arch.arm.arch.bs_addsub_name = bs_name(l=1, name=addsub_name)

Definition at line 1919 of file arch.py.

tuple miasm2.arch.arm.arch.bs_addsubsp_name = bs_name(l=1, name=addsubsp_name)

Definition at line 1943 of file arch.py.

tuple miasm2.arch.arm.arch.bs_alu_name = bs_name(l=4, name=alu_name)

Definition at line 1928 of file arch.py.

tuple miasm2.arch.arm.arch.bs_br_name = bs_name(l=4, name=br_name)

Definition at line 1954 of file arch.py.

tuple miasm2.arch.arm.arch.bs_btransfer_name = bs_name(l=1, name=btransfer_name)

Definition at line 1449 of file arch.py.

tuple miasm2.arch.arm.arch.bs_ctransfer_name = bs_name(l=1, name=ctransfer_name)

Definition at line 1452 of file arch.py.

tuple miasm2.arch.arm.arch.bs_data_mov_name = bs_name(l=4, name=data_mov_name)

Definition at line 1433 of file arch.py.

tuple miasm2.arch.arm.arch.bs_data_name = bs_name(l=4, name=data_name)

Definition at line 1431 of file arch.py.

tuple miasm2.arch.arm.arch.bs_data_test_name = bs_name(l=4, name=data_test_name)

Definition at line 1435 of file arch.py.

tuple miasm2.arch.arm.arch.bs_hiregop_name = bs_name(l=2, name=hiregop_name)

Definition at line 1931 of file arch.py.

tuple miasm2.arch.arm.arch.bs_ldr_str_name = bs_name(l=1, name=ldr_str_name)

Definition at line 1934 of file arch.py.

tuple miasm2.arch.arm.arch.bs_ldrh_strh_name = bs_name(l=1, name=ldrh_strh_name)

Definition at line 1937 of file arch.py.

tuple miasm2.arch.arm.arch.bs_ldstsp_name = bs_name(l=1, name=ldstsp_name)

Definition at line 1940 of file arch.py.

tuple miasm2.arch.arm.arch.bs_mov_cmp_add_sub_name = bs_name(l=2, name=mov_cmp_add_sub_name)

Definition at line 1922 of file arch.py.

tuple miasm2.arch.arm.arch.bs_mr_name = bs_name(l=1, name=mr_name)

Definition at line 1455 of file arch.py.

tuple miasm2.arch.arm.arch.bs_mshift_name = bs_name(l=2, name=mshift_name)

Definition at line 1915 of file arch.py.

tuple miasm2.arch.arm.arch.bs_pushpop_name = bs_name(l=1, name=pushpop_name, fname='pp')

Definition at line 1946 of file arch.py.

tuple miasm2.arch.arm.arch.bs_tbtransfer_name = bs_name(l=1, name=tbtransfer_name)

Definition at line 1949 of file arch.py.

tuple miasm2.arch.arm.arch.bs_transfer_ldr_name = bs_name(l=1, name=transfer_ldr_name)

Definition at line 1446 of file arch.py.

tuple miasm2.arch.arm.arch.bs_transfer_name = bs_name(l=1, name=transfer_name)

Definition at line 1439 of file arch.py.

tuple miasm2.arch.arm.arch.bs_transferh_name = bs_name(l=1, name=transferh_name)

Definition at line 1442 of file arch.py.

dictionary miasm2.arch.arm.arch.btransfer_name = {'STM': 0, 'LDM': 1}

Definition at line 1448 of file arch.py.

tuple miasm2.arch.arm.arch.CIRCUNFLEX = Literal("^")

Definition at line 100 of file arch.py.

tuple miasm2.arch.arm.arch.COMMA = Suppress(",")

Definition at line 141 of file arch.py.

tuple miasm2.arch.arm.arch.cond_dct = dict([(x[1], x[0]) for x in enumerate(cond_list)])

Definition at line 255 of file arch.py.

list miasm2.arch.arm.arch.cond_list
Initial value:
1 = ['EQ', 'NE', 'CS', 'CC', 'MI', 'PL', 'VS', 'VC',
2  'HI', 'LS', 'GE', 'LT', 'GT', 'LE', '']

Definition at line 253 of file arch.py.

list miasm2.arch.arm.arch.conditional_branch
Initial value:
1 = ["BEQ", "BNE", "BCS", "BCC", "BMI", "BPL", "BVS",
2  "BVC", "BHI", "BLS", "BGE", "BLT", "BGT", "BLE"]

Definition at line 78 of file arch.py.

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

Definition at line 17 of file arch.py.

tuple miasm2.arch.arm.arch.cp = bs(l=3, cls=(arm_imm, m_arg), fname='cp')

Definition at line 1280 of file arch.py.

tuple miasm2.arch.arm.arch.cp_regs = reg_info(cpregs_str, cpregs_expr)

Definition at line 70 of file arch.py.

tuple miasm2.arch.arm.arch.cpnum = bs(l=4, cls=(arm_preg,), fname='cpnum')

Definition at line 1279 of file arch.py.

tuple miasm2.arch.arm.arch.cpopc = bs(l=3, cls=(arm_imm, m_arg), fname='cpopc')

Definition at line 1285 of file arch.py.

list miasm2.arch.arm.arch.cpregs_expr = [ExprId(x) for x in cpregs_str]

Definition at line 68 of file arch.py.

list miasm2.arch.arm.arch.cpregs_str = ['c%d' % r for r in xrange(0x10)]

Definition at line 67 of file arch.py.

tuple miasm2.arch.arm.arch.cpsr_regs = reg_info(cpsr_regs_str, cpsr_regs_expr)

Definition at line 63 of file arch.py.

list miasm2.arch.arm.arch.cpsr_regs_expr = [ExprId(x, 32) for x in cpsr_regs_str]

Definition at line 60 of file arch.py.

list miasm2.arch.arm.arch.cpsr_regs_str = []

Definition at line 45 of file arch.py.

tuple miasm2.arch.arm.arch.crd = bs(l=4, cls=(arm_cpreg,), fname='crd')

Definition at line 1277 of file arch.py.

tuple miasm2.arch.arm.arch.crm = bs(l=4, cls=(arm_cpreg,), fname='crm')

Definition at line 1278 of file arch.py.

tuple miasm2.arch.arm.arch.crn = bs(l=4, cls=(arm_cpreg,), fname='crn')

Definition at line 1276 of file arch.py.

dictionary miasm2.arch.arm.arch.ctransfer_name = {'STC': 0, 'LDC': 1}

Definition at line 1451 of file arch.py.

dictionary miasm2.arch.arm.arch.data_mov_name = {'MOV': 13, 'MVN': 15}

Definition at line 1423 of file arch.py.

dictionary miasm2.arch.arm.arch.data_name = {}

Definition at line 1426 of file arch.py.

dictionary miasm2.arch.arm.arch.data_test_name = {'TST': 8, 'TEQ': 9, 'CMP': 10, 'CMN': 11}

Definition at line 1424 of file arch.py.

tuple miasm2.arch.arm.arch.deref
Initial value:
1 = Group((deref_post | deref_pre | deref_nooff)
2  + Optional('!'))

Definition at line 237 of file arch.py.

tuple miasm2.arch.arm.arch.deref_low
Initial value:
1 = Group(LBRACK + gpregs_l.parser + Optional(
2  COMMA + shift_off) + RBRACK)

Definition at line 1554 of file arch.py.

tuple miasm2.arch.arm.arch.deref_nooff
Initial value:
1 = Group(
2  LBRACK + gpregs.parser + RBRACK)

Definition at line 231 of file arch.py.

tuple miasm2.arch.arm.arch.deref_pc
Initial value:
1 = Group(LBRACK + gpregs_pc.parser + Optional(
2  COMMA + shift_off) + RBRACK)

Definition at line 1556 of file arch.py.

tuple miasm2.arch.arm.arch.deref_post
Initial value:
1 = Group(LBRACK + gpregs.parser + RBRACK +
2  COMMA + shift_off)

Definition at line 235 of file arch.py.

tuple miasm2.arch.arm.arch.deref_pre
Initial value:
1 = Group(LBRACK + gpregs.parser + Optional(
2  COMMA + shift_off) + RBRACK)

Definition at line 233 of file arch.py.

tuple miasm2.arch.arm.arch.deref_sp
Initial value:
1 = Group(LBRACK + gpregs_sp.parser + COMMA +
2  shift_off + RBRACK)

Definition at line 1558 of file arch.py.

tuple miasm2.arch.arm.arch.dumr = bs(l=4, default_val="0000", fname="dumr")

Definition at line 1249 of file arch.py.

tuple miasm2.arch.arm.arch.dumrh = bs(l=3, default_val="000")

Definition at line 1878 of file arch.py.

tuple miasm2.arch.arm.arch.dumscc = bs("1")

Definition at line 1234 of file arch.py.

tuple miasm2.arch.arm.arch.expr2shift_dct = dict([(x[1], x[0]) for x in shift2expr_dct.items()])

Definition at line 126 of file arch.py.

tuple miasm2.arch.arm.arch.fix_cond = bs("1111", fname="cond")

Definition at line 1298 of file arch.py.

tuple miasm2.arch.arm.arch.gpreg_list
Initial value:
1 = Group(LACC + delimitedList(
2  reg_or_duo, delim=',') + RACC + Optional(CIRCUNFLEX))

Definition at line 135 of file arch.py.

miasm2.arch.arm.arch.gpreg_p = gpregs.parser

Definition at line 151 of file arch.py.

tuple miasm2.arch.arm.arch.gpregs = reg_info(regs_str, regs_expr)

Definition at line 34 of file arch.py.

tuple miasm2.arch.arm.arch.gpregs_h = reg_info(regs_str[8:], regs_expr[8:])

Definition at line 1549 of file arch.py.

tuple miasm2.arch.arm.arch.gpregs_l = reg_info(regs_str[:8], regs_expr[:8])

Definition at line 1548 of file arch.py.

tuple miasm2.arch.arm.arch.gpregs_l_wb
Initial value:
1 = Group(
2  gpregs_l.parser + Optional('!'))

Definition at line 1561 of file arch.py.

tuple miasm2.arch.arm.arch.gpregs_nosppc
Initial value:
1 = reg_info(regs_str[:13] + [str(reg_dum), regs_str[14]],
2  regs_expr[:13] + [reg_dum, regs_expr[14]])

Definition at line 39 of file arch.py.

tuple miasm2.arch.arm.arch.gpregs_pc = reg_info(regs_str[-1:], regs_expr[-1:])

Definition at line 36 of file arch.py.

tuple miasm2.arch.arm.arch.gpregs_sp = reg_info(regs_str[13:14], regs_expr[13:14])

Definition at line 37 of file arch.py.

tuple miasm2.arch.arm.arch.gpregs_sppc
Initial value:
1 = reg_info(regs_str[-1:] + regs_str[13:14],
2  regs_expr[-1:] + regs_expr[13:14])

Definition at line 1551 of file arch.py.

tuple miasm2.arch.arm.arch.gpregs_wb = Group(gpregs.parser + Optional('!'))

Definition at line 247 of file arch.py.

tuple miasm2.arch.arm.arch.hb = bs(l=1)

Definition at line 1381 of file arch.py.

dictionary miasm2.arch.arm.arch.hiregop_name = {'ADDS': 0, 'CMP': 1, 'MOV': 2}

Definition at line 1930 of file arch.py.

tuple miasm2.arch.arm.arch.hl = bs(l=1, prio=default_prio + 1, fname='hl')

Definition at line 1907 of file arch.py.

tuple miasm2.arch.arm.arch.imm1 = bs(l=1, fname="imm1")

Definition at line 2224 of file arch.py.

tuple miasm2.arch.arm.arch.imm12 = bs(l=12, cls=(arm_imm, m_arg))

Definition at line 1288 of file arch.py.

tuple miasm2.arch.arm.arch.imm12_1 = bs(l=1, fname="imm12_1", order=1)

Definition at line 2215 of file arch.py.

tuple miasm2.arch.arm.arch.imm12_3 = bs(l=3, fname="imm12_3", order=1)

Definition at line 2216 of file arch.py.

tuple miasm2.arch.arm.arch.imm12_8 = bs(l=8, cls=(armt2_imm12,), fname="imm", order=2)

Definition at line 2217 of file arch.py.

tuple miasm2.arch.arm.arch.imm16 = bs(l=16, cls=(arm_imm, m_arg))

Definition at line 1289 of file arch.py.

tuple miasm2.arch.arm.arch.imm20 = bs(l=20, cls=(arm_imm, m_arg))

Definition at line 1286 of file arch.py.

tuple miasm2.arch.arm.arch.imm4 = bs(l=4, cls=(arm_imm, m_arg))

Definition at line 1287 of file arch.py.

tuple miasm2.arch.arm.arch.imm4_noarg = bs(l=4, fname="imm4")

Definition at line 1291 of file arch.py.

tuple miasm2.arch.arm.arch.imm5_2 = bs(l=2, fname="imm5_2")

Definition at line 2221 of file arch.py.

tuple miasm2.arch.arm.arch.imm5_3 = bs(l=3, fname="imm5_3")

Definition at line 2220 of file arch.py.

tuple miasm2.arch.arm.arch.imm5_off = bs(l=5, cls=(armt_imm5_1,), fname="imm5_off")

Definition at line 2244 of file arch.py.

tuple miasm2.arch.arm.arch.imm8 = bs(l=8, cls=(arm_imm,), default_val = "00000001")

Definition at line 1911 of file arch.py.

tuple miasm2.arch.arm.arch.imm8_12 = bs(l=8, cls=(arm_imm8_12, m_arg), fname='imm')

Definition at line 1282 of file arch.py.

tuple miasm2.arch.arm.arch.imm8_d1 = bs(l=8, default_val="00000001")

Definition at line 1910 of file arch.py.

tuple miasm2.arch.arm.arch.imm_4_12 = bs(l=12, cls=(arm_imm_4_12,))

Definition at line 1293 of file arch.py.

tuple miasm2.arch.arm.arch.imm_stype = bs(l=2, fname="stype")

Definition at line 2222 of file arch.py.

tuple miasm2.arch.arm.arch.immedH = bs(l=4, fname='immedH')

Definition at line 1379 of file arch.py.

tuple miasm2.arch.arm.arch.immedL = bs(l=4, cls=(arm_immed, m_arg), fname='immedL')

Definition at line 1380 of file arch.py.

tuple miasm2.arch.arm.arch.immop = bs(l=1, fname='immop')

Definition at line 1248 of file arch.py.

tuple miasm2.arch.arm.arch.int_1_31 = str_int.copy()

Definition at line 109 of file arch.py.

tuple miasm2.arch.arm.arch.int_1_32 = str_int.copy()

Definition at line 110 of file arch.py.

miasm2.arch.arm.arch.int_or_expr = base_expr

Definition at line 166 of file arch.py.

tuple miasm2.arch.arm.arch.LACC = Suppress(Literal("{"))

Definition at line 97 of file arch.py.

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

Definition at line 139 of file arch.py.

dictionary miasm2.arch.arm.arch.ldr_str_name = {'STR': 0, 'LDR': 1}

Definition at line 1933 of file arch.py.

dictionary miasm2.arch.arm.arch.ldrh_strh_name = {'STRH': 0, 'LDRH': 1}

Definition at line 1936 of file arch.py.

dictionary miasm2.arch.arm.arch.ldstsp_name = {'STR': 0, 'LDR': 1}

Definition at line 1939 of file arch.py.

tuple miasm2.arch.arm.arch.lnk = bs_lnk(l=1, fname='lnk', mn_mod=['', 'L'])

Definition at line 1242 of file arch.py.

tuple miasm2.arch.arm.arch.log = logging.getLogger("armdis")

Definition at line 16 of file arch.py.

tuple miasm2.arch.arm.arch.lowb = bs(l=1, fname='lowb')

Definition at line 1295 of file arch.py.

tuple miasm2.arch.arm.arch.LPARENTHESIS = Literal("(")

Definition at line 94 of file arch.py.

tuple miasm2.arch.arm.arch.lsb = bs(l=5, cls=(arm_imm, m_arg))

Definition at line 1539 of file arch.py.

tuple miasm2.arch.arm.arch.MINUS = Suppress(Literal("-"))

Definition at line 99 of file arch.py.

dictionary miasm2.arch.arm.arch.mov_cmp_add_sub_name = {'MOVS': 0, 'CMP': 1, 'ADDS': 2, 'SUBS': 3}

Definition at line 1921 of file arch.py.

dictionary miasm2.arch.arm.arch.mr_name = {'MCR': 0, 'MRC': 1}

Definition at line 1454 of file arch.py.

dictionary miasm2.arch.arm.arch.mshift_name = {'LSLS': 0, 'LSRS': 1, 'ASRS': 2}

Definition at line 1914 of file arch.py.

tuple miasm2.arch.arm.arch.mul_x = mul_part_x(l=1, fname='x', mn_mod=['B', 'T'])

Definition at line 1308 of file arch.py.

tuple miasm2.arch.arm.arch.mul_y = mul_part_y(l=1, fname='y', mn_mod=['B', 'T'])

Definition at line 1309 of file arch.py.

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

Definition at line 181 of file arch.py.

string miasm2.arch.arm.arch.o = ""

Definition at line 48 of file arch.py.

tuple miasm2.arch.arm.arch.off3 = bs(l=3, cls=(arm_imm,), fname="off")

Definition at line 1867 of file arch.py.

tuple miasm2.arch.arm.arch.off5 = bs(l=5, cls=(arm_imm,), fname="off")

Definition at line 1866 of file arch.py.

tuple miasm2.arch.arm.arch.off5bw = bs(l=5, cls=(arm_offbw,), fname="off")

Definition at line 1887 of file arch.py.

tuple miasm2.arch.arm.arch.off5h = bs(l=5, cls=(arm_offh,), fname="off")

Definition at line 1888 of file arch.py.

tuple miasm2.arch.arm.arch.off7 = bs(l=7, cls=(arm_off7,), fname="off")

Definition at line 1869 of file arch.py.

tuple miasm2.arch.arm.arch.off8 = bs(l=8, cls=(arm_imm,), fname="off")

Definition at line 1868 of file arch.py.

tuple miasm2.arch.arm.arch.off8s = bs(l=8, cls=(arm_offs,), fname="offs")

Definition at line 1898 of file arch.py.

tuple miasm2.arch.arm.arch.off8sppc = bs(l=8, cls=(arm_off8sppc,), fname="off")

Definition at line 1908 of file arch.py.

tuple miasm2.arch.arm.arch.offpc8 = bs(l=8, cls=(arm_offpc,), fname="offs")

Definition at line 1883 of file arch.py.

tuple miasm2.arch.arm.arch.offs = bs(l=24, cls=(arm_offs,), fname="offs")

Definition at line 1243 of file arch.py.

tuple miasm2.arch.arm.arch.offs11 = bs(l=11, cls=(arm_offspc,), fname="offs")

Definition at line 1905 of file arch.py.

tuple miasm2.arch.arm.arch.offs8 = bs(l=8, cls=(arm_offspc,), fname="offs")

Definition at line 1904 of file arch.py.

tuple miasm2.arch.arm.arch.offs_blx = bs(l=24, cls=(arm_offs_blx,), fname="offs")

Definition at line 1296 of file arch.py.

tuple miasm2.arch.arm.arch.offsp8 = bs(l=8, cls=(arm_offsp,), fname="offs")

Definition at line 1884 of file arch.py.

tuple miasm2.arch.arm.arch.op2 = bs(l=12, cls=(arm_op2,))

Definition at line 1241 of file arch.py.

tuple miasm2.arch.arm.arch.op2imm = bs(l=12, cls=(arm_op2imm,))

Definition at line 1261 of file arch.py.

list miasm2.arch.arm.arch.op_list
Initial value:
1 = ['AND', 'EOR', 'SUB', 'RSB', 'ADD', 'ADC', 'SBC', 'RSC',
2  'TST', 'TEQ', 'CMP', 'CMN', 'ORR', 'MOV', 'BIC', 'MVN']

Definition at line 1421 of file arch.py.

tuple miasm2.arch.arm.arch.opc = bs(l=4, cls=(arm_imm, m_arg), fname='opc')

Definition at line 1275 of file arch.py.

tuple miasm2.arch.arm.arch.p_regs = reg_info(pregs_str, pregs_expr)

Definition at line 76 of file arch.py.

tuple miasm2.arch.arm.arch.pclr = bs(l=1, fname='pclr')

Definition at line 1892 of file arch.py.

tuple miasm2.arch.arm.arch.ppi = bs(l=1, fname='ppi')

Definition at line 1255 of file arch.py.

tuple miasm2.arch.arm.arch.ppi_b_nosp = ppi_b_nosp_mn(l=1, mn_mod=['A', 'B'], fname='ppi')

Definition at line 1264 of file arch.py.

tuple miasm2.arch.arm.arch.ppi_b_sp = ppi_b_sp_mn(l=1, mn_mod=['F', 'E'], fname='ppi')

Definition at line 1266 of file arch.py.

list miasm2.arch.arm.arch.pregs_expr = [ExprId(x) for x in pregs_str]

Definition at line 74 of file arch.py.

list miasm2.arch.arm.arch.pregs_str = ['p%d' % r for r in xrange(0x10)]

Definition at line 73 of file arch.py.

tuple miasm2.arch.arm.arch.psr = bs(l=1, fname="psr")

Definition at line 1252 of file arch.py.

tuple miasm2.arch.arm.arch.psr_field = bs(l=4, cls=(arm_psr,))

Definition at line 1253 of file arch.py.

miasm2.arch.arm.arch.psr_p = cpsr_regs.parser|spsr_regs.parser

Definition at line 153 of file arch.py.

dictionary miasm2.arch.arm.arch.pushpop_name = {'PUSH': 0, 'POP': 1}

Definition at line 1945 of file arch.py.

tuple miasm2.arch.arm.arch.RACC = Suppress(Literal("}"))

Definition at line 98 of file arch.py.

tuple miasm2.arch.arm.arch.rbl = bs(l=3, cls=(arm_gpreg_l,), fname="rb")

Definition at line 1876 of file arch.py.

tuple miasm2.arch.arm.arch.rbl_deref = bs(l=3, cls=(arm_deref,), fname="rb")

Definition at line 1877 of file arch.py.

tuple miasm2.arch.arm.arch.rbl_wb = bs(l=3, cls=(armt_reg_wb,), fname='rb')

Definition at line 1902 of file arch.py.

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

Definition at line 140 of file arch.py.

tuple miasm2.arch.arm.arch.rd = bs(l=4, cls=(arm_gpreg,))

Definition at line 1235 of file arch.py.

tuple miasm2.arch.arm.arch.rd_nosppc = bs(l=4, cls=(arm_gpreg_nosppc,), fname="rd")

Definition at line 2068 of file arch.py.

tuple miasm2.arch.arm.arch.rdh = bs(l=3, cls=(arm_gpreg_h,), fname="rd")

Definition at line 1880 of file arch.py.

tuple miasm2.arch.arm.arch.rdl = bs(l=4, cls=(arm_gpreg,))

Definition at line 1236 of file arch.py.

tuple miasm2.arch.arm.arch.reg_dum = ExprId('DumReg')

Definition at line 23 of file arch.py.

tuple miasm2.arch.arm.arch.reg_duo
Initial value:
1 = Group(gpregs.parser + MINUS +
2  gpregs.parser)

Definition at line 132 of file arch.py.

miasm2.arch.arm.arch.reg_or_duo = reg_duo|gpregs.parser

Definition at line 134 of file arch.py.

list miasm2.arch.arm.arch.regs_expr = [ExprId(x, 32) for x in regs_str]

Definition at line 32 of file arch.py.

list miasm2.arch.arm.arch.regs_str = ['R%d' % r for r in xrange(0x10)]

Definition at line 28 of file arch.py.

tuple miasm2.arch.arm.arch.rlist = bs(l=16, cls=(arm_rlist,), fname='rlist')

Definition at line 1271 of file arch.py.

tuple miasm2.arch.arm.arch.rm = bs(l=4, cls=(arm_gpreg,))

Definition at line 1240 of file arch.py.

tuple miasm2.arch.arm.arch.rm_noarg = bs(l=4, cls=(arm_gpreg_noarg,), fname="rm", order = -1)

Definition at line 1246 of file arch.py.

tuple miasm2.arch.arm.arch.rm_sh = bs(l=4, cls=(armt_gpreg_rm_shift_off,), fname="rm")

Definition at line 2069 of file arch.py.

tuple miasm2.arch.arm.arch.rml = bs(l=3, cls=(arm_gpreg_l,), fname="rm")

Definition at line 1874 of file arch.py.

tuple miasm2.arch.arm.arch.rn = bs(l=4, cls=(arm_gpreg,), fname="rn")

Definition at line 1238 of file arch.py.

tuple miasm2.arch.arm.arch.rn_noarg = bs(l=4, cls=(arm_gpreg_noarg,), fname="rn")

Definition at line 1245 of file arch.py.

tuple miasm2.arch.arm.arch.rn_nosppc = bs(l=4, cls=(arm_gpreg_nosppc,), fname="rn")

Definition at line 2067 of file arch.py.

tuple miasm2.arch.arm.arch.rn_sp = bs("1101", cls=(arm_reg_wb,), fname='rnsp')

Definition at line 1269 of file arch.py.

tuple miasm2.arch.arm.arch.rn_wb = bs(l=4, cls=(arm_reg_wb_nosp,), fname='rn')

Definition at line 1270 of file arch.py.

tuple miasm2.arch.arm.arch.rnl = bs(l=3, cls=(arm_gpreg_l,), fname="rn")

Definition at line 1872 of file arch.py.

tuple miasm2.arch.arm.arch.rol = bs(l=3, cls=(arm_gpreg_l,), fname="ro")

Definition at line 1875 of file arch.py.

tuple miasm2.arch.arm.arch.rol_noarg = bs(l=3, cls=(arm_gpreg_l_noarg,), fname="off")

Definition at line 1885 of file arch.py.

tuple miasm2.arch.arm.arch.rot_rm = bs(l=2, cls=(armt2_rot_rm,), fname="rot_rm")

Definition at line 1402 of file arch.py.

tuple miasm2.arch.arm.arch.RPARENTHESIS = Literal(")")

Definition at line 95 of file arch.py.

tuple miasm2.arch.arm.arch.rs = bs(l=4, cls=(arm_gpreg,))

Definition at line 1239 of file arch.py.

tuple miasm2.arch.arm.arch.rsh = bs(l=3, cls=(arm_gpreg_h,), fname="rs")

Definition at line 1881 of file arch.py.

tuple miasm2.arch.arm.arch.rsl = bs(l=3, cls=(arm_gpreg_l,), fname="rs")

Definition at line 1873 of file arch.py.

tuple miasm2.arch.arm.arch.sbit = bs(l=1, fname="sbit")

Definition at line 1268 of file arch.py.

tuple miasm2.arch.arm.arch.scc = bs_mod_name(l=1, fname='scc', mn_mod=['', 'S'])

Definition at line 1233 of file arch.py.

dictionary miasm2.arch.arm.arch.shift2expr_dct
Initial value:
1 = {'LSL': '<<', 'LSR': '>>', 'ASR': 'a>>',
2  'ROR': ">>>", 'RRX': "rrx"}

Definition at line 123 of file arch.py.

tuple miasm2.arch.arm.arch.shift_off
Initial value:
1 = (gpregs.parser + Optional(
2  (all_unaryop_shifts_t) |
3  (all_binaryop_1_31_shifts_t + (gpregs.parser | int_1_31)) |
4  (all_binaryop_1_32_shifts_t + (gpregs.parser | int_1_32))
5 ))

Definition at line 185 of file arch.py.

tuple miasm2.arch.arm.arch.sp = bs(l=0, cls=(arm_sp,))

Definition at line 1895 of file arch.py.

tuple miasm2.arch.arm.arch.sppc = bs(l=1, cls=(arm_sppc,))

Definition at line 1889 of file arch.py.

tuple miasm2.arch.arm.arch.spsr_regs = reg_info(spsr_regs_str, spsr_regs_expr)

Definition at line 64 of file arch.py.

list miasm2.arch.arm.arch.spsr_regs_expr = [ExprId(x, 32) for x in spsr_regs_str]

Definition at line 61 of file arch.py.

list miasm2.arch.arm.arch.spsr_regs_str = []

Definition at line 46 of file arch.py.

string miasm2.arch.arm.arch.sr_flags = "cxsf"

Definition at line 44 of file arch.py.

tuple miasm2.arch.arm.arch.swi_i = bs(l=24, cls=(arm_imm,), fname="swi_i")

Definition at line 1273 of file arch.py.

dictionary miasm2.arch.arm.arch.tbtransfer_name = {'STMIA': 0, 'LDMIA': 1}

Definition at line 1948 of file arch.py.

tuple miasm2.arch.arm.arch.timm10H = bs(l=10, fname="imm10h")

Definition at line 2250 of file arch.py.

tuple miasm2.arch.arm.arch.timm10L = bs(l=10, cls=(armt2_imm10l,), fname="imm10l")

Definition at line 2251 of file arch.py.

tuple miasm2.arch.arm.arch.timm11L = bs(l=11, cls=(armt2_imm11l,), fname="imm11l")

Definition at line 2252 of file arch.py.

tuple miasm2.arch.arm.arch.tj1 = bs(l=1, fname="j1")

Definition at line 2247 of file arch.py.

tuple miasm2.arch.arm.arch.tj2 = bs(l=1, fname="j2")

Definition at line 2248 of file arch.py.

tuple miasm2.arch.arm.arch.tl = bs_mod_name(l=1, fname="tl", mn_mod=['', 'L'])

Definition at line 1283 of file arch.py.

dictionary miasm2.arch.arm.arch.transfer_ldr_name = {'LDRD': 0, 'LDRSB': 1}

Definition at line 1445 of file arch.py.

dictionary miasm2.arch.arm.arch.transfer_name = {'STR': 0, 'LDR': 1}

Definition at line 1438 of file arch.py.

dictionary miasm2.arch.arm.arch.transferh_name = {'STRH': 0, 'LDRH': 1}

Definition at line 1441 of file arch.py.

tuple miasm2.arch.arm.arch.trb = bs_mod_name(l=1, fname='trb', mn_mod=['', 'B'])

Definition at line 1257 of file arch.py.

tuple miasm2.arch.arm.arch.trlist = bs(l=8, cls=(armt_rlist,), fname="trlist", order = -1)

Definition at line 1900 of file arch.py.

tuple miasm2.arch.arm.arch.trlistpclr = bs(l=8, cls=(armt_rlist_pclr,))

Definition at line 1899 of file arch.py.

tuple miasm2.arch.arm.arch.tsign = bs(l=1, fname="sign")

Definition at line 2246 of file arch.py.

list miasm2.arch.arm.arch.unconditional_branch = ["B", "BX", "BL", "BLX"]

Definition at line 81 of file arch.py.

tuple miasm2.arch.arm.arch.updown = bs(l=1, fname='updown')

Definition at line 1256 of file arch.py.

tuple miasm2.arch.arm.arch.updown_b_nosp = updown_b_nosp_mn(l=1, mn_mod=['D', 'I'], fname='updown')

Definition at line 1263 of file arch.py.

tuple miasm2.arch.arm.arch.updown_b_sp = updown_b_sp_mn(l=1, mn_mod=['A', 'D'], fname='updown')

Definition at line 1265 of file arch.py.

tuple miasm2.arch.arm.arch.wback = bs_mod_name(l=1, fname="wback", mn_mod=['', 'T'])

Definition at line 1258 of file arch.py.

tuple miasm2.arch.arm.arch.wback_no_t = bs(l=1, fname="wback")

Definition at line 1259 of file arch.py.

tuple miasm2.arch.arm.arch.widthm1 = bs(l=5, cls=(arm_widthm1, m_arg))

Definition at line 1538 of file arch.py.