miasm
Reverse engineering framework
miasm.arch.arm.arch Namespace Reference

Classes

class  additional_info
 
class  arm_arg
 
class  arm_cpreg
 
class  arm_deref_reg_imm
 
class  arm_derefl
 
class  arm_gpreg
 
class  arm_gpreg_h
 
class  arm_gpreg_l
 
class  arm_gpreg_l_noarg
 
class  arm_gpreg_noarg
 
class  arm_gpreg_nopc
 
class  arm_gpreg_nosp
 
class  arm_gpreg_nosppc
 
class  arm_imm
 
class  arm_imm8_12
 
class  arm_imm_12_4
 
class  arm_imm_4_12
 
class  arm_immed
 
class  arm_mem_rn_imm
 
class  arm_off
 
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_rm_rot2
 
class  arm_rm_rot5_asr
 
class  arm_rm_rot5_lsl
 
class  arm_sp
 
class  arm_sppc
 
class  arm_widthm1
 
class  armt2_imm10l
 
class  armt2_imm11l
 
class  armt2_imm12
 
class  armt2_imm16
 
class  armt2_imm6_11l
 
class  armt2_lsb5
 
class  armt2_off20
 
class  armt2_rot_rm
 
class  armt4_imm12
 
class  armt_aif
 
class  armt_barrier_option
 
class  armt_cond_arg
 
class  armt_cond_lsb
 
class  armt_deref_reg
 
class  armt_deref_reg_reg
 
class  armt_deref_reg_reg_lsl_1
 
class  armt_gpreg_rm_shift_off
 
class  armt_imm5_1
 
class  armt_it_arg
 
class  armt_itmask
 
class  armt_op2imm
 
class  armt_op2imm00
 
class  armt_reg_wb
 
class  armt_rlist
 
class  armt_rlist13
 
class  armt_rlist13_pc_lr
 
class  armt_rlist_pclr
 
class  armt_rm_cp
 
class  armt_widthm1
 
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 cb_tok_reg_duo (tokens)
 
def check_bounds (left_bound, right_bound, value)
 
def check_values (values, value)
 
def cb_reglistparse (tokens)
 
def op_shift2expr (tokens)
 
def cb_shift (tokens)
 
def cb_deref_reg_reg (tokens)
 
def cb_deref_reg_reg_lsl_1 (tokens)
 
def deref2expr_nooff (tokens)
 
def cb_deref_preinc (tokens)
 
def cb_deref_pre_mem (tokens)
 
def cb_deref_post (tokens)
 
def cb_deref_wb (tokens)
 
def cb_gpreb_wb (tokens)
 
def permut_args (order, args)
 
def reglist2str (rlist)
 
def armop (name, fields, args=None, alias=False)
 
def armtop (name, fields, args=None, alias=False)
 

Variables

 log = logging.getLogger("armdis")
 
 console_handler = logging.StreamHandler()
 
 reg_dum = ExprId('DumReg', 32)
 
 PC
 
list regs_str = ['R%d' % r for r in range(0x10)]
 
list regs_expr = [ExprId(x, 32) for x in regs_str]
 
 gpregs = reg_info(regs_str, regs_expr)
 
 gpregs_pc = reg_info(regs_str[-1:], regs_expr[-1:])
 
 gpregs_sp = reg_info(regs_str[13:14], regs_expr[13:14])
 
 gpregs_nosppc
 
 gpregs_nopc
 
 gpregs_nosp
 
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]
 
 cpsr_regs = reg_info(cpsr_regs_str, cpsr_regs_expr)
 
 spsr_regs = reg_info(spsr_regs_str, spsr_regs_expr)
 
list cpregs_str = ['c%d' % r for r in range(0x10)]
 
list cpregs_expr = [ExprId(x, 32) for x in cpregs_str]
 
 cp_regs = reg_info(cpregs_str, cpregs_expr)
 
list pregs_str = ['p%d' % r for r in range(0x10)]
 
list pregs_expr = [ExprId(x, 32) for x in pregs_str]
 
 p_regs = reg_info(pregs_str, pregs_expr)
 
list conditional_branch
 
list unconditional_branch = ["B", "BX", "BL", "BLX"]
 
dictionary barrier_expr
 
 barrier_info = reg_info_dct(barrier_expr)
 
 LPARENTHESIS = Literal("(")
 
 RPARENTHESIS = Literal(")")
 
 LACC = Suppress(Literal("{"))
 
 RACC = Suppress(Literal("}"))
 
 MINUS = Suppress(Literal("-"))
 
 CIRCUNFLEX = Literal("^")
 
 int_1_31 = str_int.copy().setParseAction(lambda v: check_bounds(1, 31, v[0]))
 
 int_1_32 = str_int.copy().setParseAction(lambda v: check_bounds(1, 32, v[0]))
 
 int_8_16_24 = str_int.copy().setParseAction(lambda v: check_values([8, 16, 24], v[0]))
 
list allshifts = ['<<', '>>', 'a>>', '>>>', 'rrx']
 
list allshifts_armt = ['<<', '>>', 'a>>', '>>>', 'rrx']
 
dictionary shift2expr_dct
 
 expr2shift_dct = dict((value, key) for key, value in viewitems(shift2expr_dct))
 
 reg_duo
 
 reg_or_duo = reg_duo | gpregs.parser
 
 gpreg_list
 
 LBRACK = Suppress("[")
 
 RBRACK = Suppress("]")
 
 COMMA = Suppress(",")
 
 all_binaryop_1_31_shifts_t
 
 all_binaryop_1_32_shifts_t
 
 all_unaryop_shifts_t = literal_list(['RRX']).setParseAction(op_shift2expr)
 
 ror_shifts_t = literal_list(['ROR']).setParseAction(op_shift2expr)
 
 shl_shifts_t = literal_list(['SHL']).setParseAction(op_shift2expr)
 
 allshifts_t_armt
 
 gpreg_p = gpregs.parser
 
 psr_p = cpsr_regs.parser | spsr_regs.parser
 
tuple shift_off
 
tuple rot2_expr
 
tuple rot5_expr = shift_off
 
 OP_LSL = Suppress("LSL")
 
tuple deref_reg_reg = (LBRACK + gpregs.parser + COMMA + gpregs.parser + RBRACK).setParseAction(cb_deref_reg_reg)
 
tuple deref_reg_reg_lsl_1 = (LBRACK + gpregs.parser + COMMA + gpregs.parser + OP_LSL + base_expr + RBRACK).setParseAction(cb_deref_reg_reg_lsl_1)
 
 reg_or_base = gpregs.parser | base_expr
 
 deref_nooff
 
 deref_pre
 
 deref_post
 
 deref
 
 gpregs_wb = Group(gpregs.parser + Optional('!')).setParseAction(cb_gpreb_wb)
 
list cond_list_full
 
list cond_list
 
 cond_dct = dict([(x[1], x[0]) for x in enumerate(cond_list)])
 
 bm_cond = bs_mod_name(l=4, fname='cond', mn_mod=cond_list)
 
 cond_dct_barmt = dict([(x[0], x[1]) for x in enumerate(cond_list) if x[0] & 0b1110 != 0b1110])
 
 bm_cond_barmt = bs_mod_name(l=4, fname='cond', mn_mod=cond_dct_barmt)
 
 accum = bs(l=1)
 
 scc = bs_mod_name(l=1, fname='scc', mn_mod=['', 'S'])
 
 dumscc = bs("1")
 
 rd = bs(l=4, cls=(arm_gpreg,))
 
 rdl = bs(l=4, cls=(arm_gpreg,))
 
 rn = bs(l=4, cls=(arm_gpreg,), fname="rn")
 
 rs = bs(l=4, cls=(arm_gpreg,))
 
 rm = bs(l=4, cls=(arm_gpreg,), fname='rm')
 
 ra = bs(l=4, cls=(arm_gpreg,))
 
 rt = bs(l=4, cls=(arm_gpreg,), fname='rt')
 
 rt2 = bs(l=4, cls=(arm_gpreg,))
 
 rm_cp = bs(l=4, cls=(armt_rm_cp,))
 
 op2 = bs(l=12, cls=(arm_op2,))
 
 lnk = bs_lnk(l=1, fname='lnk', mn_mod=['', 'L'])
 
 offs = bs(l=24, cls=(arm_offs,), fname="offs")
 
 rn_noarg = bs(l=4, cls=(arm_gpreg_noarg,), fname="rn")
 
 rm_noarg = bs(l=4, cls=(arm_gpreg_noarg,), fname="rm", order = -1)
 
 immop = bs(l=1, fname='immop')
 
 dumr = bs(l=4, default_val="0000", fname="dumr")
 
 psr = bs(l=1, fname="psr")
 
 psr_field = bs(l=4, cls=(arm_psr,))
 
 ppi = bs(l=1, fname='ppi')
 
 updown = bs(l=1, fname='updown')
 
 trb = bs_mod_name(l=1, fname='trb', mn_mod=['', 'B'])
 
 wback = bs_mod_name(l=1, fname="wback", mn_mod=['', 'T'])
 
 wback_no_t = bs(l=1, fname="wback")
 
 op2imm = bs(l=12, cls=(arm_op2imm,))
 
 updown_b_nosp = updown_b_nosp_mn(l=1, mn_mod=['D', 'I'], fname='updown')
 
 ppi_b_nosp = ppi_b_nosp_mn(l=1, mn_mod=['A', 'B'], fname='ppi')
 
 updown_b_sp = updown_b_sp_mn(l=1, mn_mod=['A', 'D'], fname='updown')
 
 ppi_b_sp = ppi_b_sp_mn(l=1, mn_mod=['F', 'E'], fname='ppi')
 
 sbit = bs(l=1, fname="sbit")
 
 rn_sp = bs("1101", cls=(arm_reg_wb,), fname='rnsp')
 
 rn_wb = bs(l=4, cls=(arm_reg_wb_nosp,), fname='rn')
 
 rlist = bs(l=16, cls=(arm_rlist,), fname='rlist')
 
 swi_i = bs(l=24, cls=(arm_imm,), fname="swi_i")
 
 opc = bs(l=4, cls=(arm_imm, m_arg), fname='opc')
 
 crn = bs(l=4, cls=(arm_cpreg,), fname='crn')
 
 crd = bs(l=4, cls=(arm_cpreg,), fname='crd')
 
 crm = bs(l=4, cls=(arm_cpreg,), fname='crm')
 
 cpnum = bs(l=4, cls=(arm_preg,), fname='cpnum')
 
 cp = bs(l=3, cls=(arm_imm, m_arg), fname='cp')
 
 imm8_12 = bs(l=8, cls=(arm_imm8_12, m_arg), fname='imm')
 
 tl = bs_mod_name(l=1, fname="tl", mn_mod=['', 'L'])
 
 cpopc = bs(l=3, cls=(arm_imm, m_arg), fname='cpopc')
 
 imm20 = bs(l=20, cls=(arm_imm, m_arg))
 
 imm4 = bs(l=4, cls=(arm_imm, m_arg))
 
 imm12 = bs(l=12, cls=(arm_imm, m_arg))
 
 imm16 = bs(l=16, cls=(arm_imm, m_arg))
 
 imm12_off = bs(l=12, fname="imm")
 
 imm2_noarg = bs(l=2, fname="imm")
 
 imm4_noarg = bs(l=4, fname="imm4")
 
 imm_4_12 = bs(l=12, cls=(arm_imm_4_12,))
 
 imm12_noarg = bs(l=12, fname="imm")
 
 imm_12_4 = bs(l=4, cls=(arm_imm_12_4,))
 
 lowb = bs(l=1, fname='lowb')
 
 offs_blx = bs(l=24, cls=(arm_offs_blx,), fname="offs")
 
 fix_cond = bs("1111", fname="cond")
 
 mul_x = mul_part_x(l=1, fname='x', mn_mod=['B', 'T'])
 
 mul_y = mul_part_y(l=1, fname='y', mn_mod=['B', 'T'])
 
 immedH = bs(l=4, fname='immedH')
 
 immedL = bs(l=4, cls=(arm_immed, m_arg), fname='immedL')
 
 hb = bs(l=1)
 
 rot_rm = bs(l=2, cls=(armt2_rot_rm,), fname="rot_rm")
 
 mem_rn_imm = bs(l=4, cls=(arm_mem_rn_imm,), order=1)
 
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 = {}
 
 bs_data_name = bs_name(l=4, name=data_name)
 
 bs_data_mov_name = bs_name(l=4, name=data_mov_name)
 
 bs_data_test_name = bs_name(l=4, name=data_test_name)
 
dictionary transfer_name = {'STR': 0, 'LDR': 1}
 
 bs_transfer_name = bs_name(l=1, name=transfer_name)
 
dictionary transferh_name = {'STRH': 0, 'LDRH': 1}
 
 bs_transferh_name = bs_name(l=1, name=transferh_name)
 
dictionary transfer_ldr_name = {'LDRD': 0, 'LDRSB': 1}
 
 bs_transfer_ldr_name = bs_name(l=1, name=transfer_ldr_name)
 
dictionary btransfer_name = {'STM': 0, 'LDM': 1}
 
 bs_btransfer_name = bs_name(l=1, name=btransfer_name)
 
dictionary ctransfer_name = {'STC': 0, 'LDC': 1}
 
 bs_ctransfer_name = bs_name(l=1, name=ctransfer_name)
 
dictionary mr_name = {'MCR': 0, 'MRC': 1}
 
 bs_mr_name = bs_name(l=1, name=mr_name)
 
 bs_addi = bs(l=1, fname="add_imm")
 
 bs_rw = bs_mod_name(l=1, fname='rw', mn_mod=['W', ''])
 
 barrier_option = bs(l=4, cls=(armt_barrier_option,))
 
 rm_rot2 = bs(l=4, cls=(arm_rm_rot2,), fname="rm")
 
 rot2 = bs(l=2, fname="rot2")
 
 rm_rot5_lsl = bs(l=4, cls=(arm_rm_rot5_lsl,), fname="rm")
 
 rm_rot5_asr = bs(l=4, cls=(arm_rm_rot5_asr,), fname="rm")
 
 rot5 = bs(l=5, fname="rot5")
 
 widthm1 = bs(l=5, cls=(arm_widthm1, m_arg))
 
 lsb = bs(l=5, cls=(arm_imm, m_arg))
 
 rd_nopc = bs(l=4, cls=(arm_gpreg_nopc, arm_arg), fname="rd")
 
 rn_nopc = bs(l=4, cls=(arm_gpreg_nopc, arm_arg), fname="rn")
 
 ra_nopc = bs(l=4, cls=(arm_gpreg_nopc, arm_arg), fname="ra")
 
 rt_nopc = bs(l=4, cls=(arm_gpreg_nopc, arm_arg), fname="rt")
 
 rn_nosp = bs(l=4, cls=(arm_gpreg_nosp, arm_arg), fname="rn")
 
 rn_nopc_noarg = bs(l=4, cls=(arm_gpreg_nopc,), fname="rn")
 
 gpregs_l = reg_info(regs_str[:8], regs_expr[:8])
 
 gpregs_h = reg_info(regs_str[8:], regs_expr[8:])
 
 gpregs_sppc
 
 deref_reg_imm
 
 deref_low
 
 deref_pc
 
 deref_sp
 
 gpregs_l_wb
 
 gpregs_l_13 = reg_info(regs_str[:13], regs_expr[:13])
 
 off5 = bs(l=5, cls=(arm_imm,), fname="off")
 
 off3 = bs(l=3, cls=(arm_imm,), fname="off")
 
 off8 = bs(l=8, cls=(arm_imm,), fname="off")
 
 off7 = bs(l=7, cls=(arm_off7,), fname="off")
 
 rnl = bs(l=3, cls=(arm_gpreg_l,), fname="rn")
 
 rsl = bs(l=3, cls=(arm_gpreg_l,), fname="rs")
 
 rml = bs(l=3, cls=(arm_gpreg_l,), fname="rm")
 
 rol = bs(l=3, cls=(arm_gpreg_l,), fname="ro")
 
 rbl = bs(l=3, cls=(arm_gpreg_l,), fname="rb")
 
 rbl_deref = bs(l=3, cls=(arm_derefl,), fname="rb")
 
 dumrh = bs(l=3, default_val="000")
 
 rdh = bs(l=3, cls=(arm_gpreg_h,), fname="rd")
 
 rsh = bs(l=3, cls=(arm_gpreg_h,), fname="rs")
 
 offpc8 = bs(l=8, cls=(arm_offpc,), fname="offs")
 
 offsp8 = bs(l=8, cls=(arm_offsp,), fname="offs")
 
 rol_noarg = bs(l=3, cls=(arm_gpreg_l_noarg,), fname="off")
 
 off5bw = bs(l=5, cls=(arm_offbw,), fname="off")
 
 off5h = bs(l=5, cls=(arm_offh,), fname="off")
 
 sppc = bs(l=1, cls=(arm_sppc,))
 
 off12 = bs(l=12, cls=(arm_off,), fname="off", order=-1)
 
 rn_deref = bs(l=4, cls=(arm_deref_reg_imm,), fname="rt")
 
 pclr = bs(l=1, fname='pclr', order=-2)
 
 pc_in = bs(l=1, fname='pc_in', order=-2)
 
 lr_in = bs(l=1, fname='lr_in', order=-2)
 
 sp = bs(l=0, cls=(arm_sp,))
 
 off8s = bs(l=8, cls=(arm_offs,), fname="offs")
 
 trlistpclr = bs(l=8, cls=(armt_rlist_pclr,))
 
 trlist = bs(l=8, cls=(armt_rlist,), fname="trlist", order = -1)
 
 trlist13 = bs(l=13, cls=(armt_rlist13,), fname="trlist", order = -1)
 
 trlist13pclr = bs(l=13, cls=(armt_rlist13_pc_lr,), fname="trlist", order = -1)
 
 rbl_wb = bs(l=3, cls=(armt_reg_wb,), fname='rb')
 
 offs8 = bs(l=8, cls=(arm_offspc,), fname="offs")
 
 offs11 = bs(l=11, cls=(arm_offspc,), fname="offs")
 
 hl = bs(l=1, prio=default_prio + 1, fname='hl')
 
 off8sppc = bs(l=8, cls=(arm_off8sppc,), fname="off")
 
 imm8_d1 = bs(l=8, default_val="00000001")
 
 imm8 = bs(l=8, cls=(arm_imm,), default_val = "00000001")
 
dictionary mshift_name = {'LSLS': 0, 'LSRS': 1, 'ASRS': 2}
 
 bs_mshift_name = bs_name(l=2, name=mshift_name)
 
dictionary addsub_name = {'ADDS': 0, 'SUBS': 1}
 
 bs_addsub_name = bs_name(l=1, name=addsub_name)
 
dictionary mov_cmp_add_sub_name = {'MOVS': 0, 'CMP': 1, 'ADDS': 2, 'SUBS': 3}
 
 bs_mov_cmp_add_sub_name = bs_name(l=2, name=mov_cmp_add_sub_name)
 
dictionary alu_name
 
 bs_alu_name = bs_name(l=4, name=alu_name)
 
dictionary hiregop_name = {'ADDS': 0, 'CMP': 1, 'MOV': 2}
 
 bs_hiregop_name = bs_name(l=2, name=hiregop_name)
 
dictionary ldr_str_name = {'STR': 0, 'LDR': 1}
 
 bs_ldr_str_name = bs_name(l=1, name=ldr_str_name)
 
dictionary ldrh_strh_name = {'STRH': 0, 'LDRH': 1}
 
 bs_ldrh_strh_name = bs_name(l=1, name=ldrh_strh_name)
 
dictionary ldstsp_name = {'STR': 0, 'LDR': 1}
 
 bs_ldstsp_name = bs_name(l=1, name=ldstsp_name)
 
dictionary addsubsp_name = {'ADD': 0, 'SUB': 1}
 
 bs_addsubsp_name = bs_name(l=1, name=addsubsp_name)
 
dictionary pushpop_name = {'PUSH': 0, 'POP': 1}
 
 bs_pushpop_name = bs_name(l=1, name=pushpop_name, fname='pp')
 
dictionary tbtransfer_name = {'STMIA': 0, 'LDMIA': 1}
 
 bs_tbtransfer_name = bs_name(l=1, name=tbtransfer_name)
 
dictionary br_name
 
 bs_br_name = bs_name(l=4, name=br_name)
 
tuple armt_gpreg_shift_off = (gpregs_nosppc.parser + allshifts_t_armt + (gpregs.parser | int_1_31)).setParseAction(cb_shift)
 
 rn_nosppc = bs(l=4, cls=(arm_gpreg_nosppc,), fname="rn")
 
 rd_nosppc = bs(l=4, cls=(arm_gpreg_nosppc,), fname="rd")
 
 rm_sh = bs(l=4, cls=(armt_gpreg_rm_shift_off,), fname="rm")
 
 imm12_1 = bs(l=1, fname="imm12_1", order=1)
 
 imm12_3 = bs(l=3, fname="imm12_3", order=1)
 
 imm12_8 = bs(l=8, cls=(armt2_imm12,), fname="imm", order=2)
 
 imm12_8_t4 = bs(l=8, cls=(armt4_imm12,), fname="imm", order=2)
 
 imm16_1 = bs(l=1, fname="imm16_1", order=1)
 
 imm16_3 = bs(l=3, fname="imm16_3", order=1)
 
 imm16_4 = bs(l=4, fname="imm16_4", order=1)
 
 imm16_8 = bs(l=8, cls=(armt2_imm16,), fname="imm", order=2)
 
 imm5_3 = bs(l=3, fname="imm5_3")
 
 imm5_2 = bs(l=2, fname="imm5_2")
 
 imm_stype = bs(l=2, fname="stype")
 
 imm_stype_00 = bs('00', fname="stype")
 
 imm_stype_01 = bs('01', fname="stype")
 
 imm_stype_11 = bs('11', fname="stype")
 
 imm1 = bs(l=1, fname="imm1")
 
 off20_6 = bs(l=6, fname="off20_6", order=1)
 
 off20_11 = bs(l=11, cls=(armt2_off20,), fname="imm", order=2)
 
 lsb5_3 = bs(l=3, fname="lsb5_3", order=1)
 
 lsb5_2 = bs(l=2, cls=(armt2_lsb5,), fname="imm", order=2)
 
list aif_str = ["X", "F", "I", "IF", "A", "AF", "AI", "AIF"]
 
list aif_expr = [ExprId(x, 32) if x != None else None for x in aif_str]
 
 aif_reg = reg_info(aif_str, aif_expr)
 
list cond_expr = [ExprId(x, 32) for x in cond_list_full]
 
 cond_info = reg_info(cond_list_full, cond_expr)
 
 aif = bs(l=3, cls=(armt_aif,))
 
 imm5_off = bs(l=5, cls=(armt_imm5_1,), fname="imm5_off")
 
 tsign = bs(l=1, fname="sign")
 
 tj1 = bs(l=1, fname="j1")
 
 tj2 = bs(l=1, fname="j2")
 
 timm6h = bs(l=6, fname="imm6h")
 
 timm10H = bs(l=10, fname="imm10h")
 
 timm10L = bs(l=10, cls=(armt2_imm10l,), fname="imm10l")
 
 timm11L = bs(l=11, cls=(armt2_imm11l,), fname="imm11l")
 
 timm6h11l = bs(l=11, cls=(armt2_imm6_11l,), fname="imm6h11l")
 
 itcond = bs(l=4, fname="itcond")
 
 itmask = armt_itmask(l=4, fname="itmask")
 
 bs_cond_arg_msb = bs(l=3, cls=(armt_cond_arg,))
 
 condlsb = armt_cond_lsb(l=1, fname="condlsb")
 
 deref_immpuw = bs(l=8, cls=(armt_op2imm,))
 
 deref_immpuw00 = bs(l=8, cls=(armt_op2imm00,))
 
 rm_deref_reg = bs(l=4, cls=(armt_deref_reg,))
 
 bs_deref_reg_reg = bs(l=4, cls=(armt_deref_reg_reg,))
 
 bs_deref_reg_reg_lsl_1 = bs(l=4, cls=(armt_deref_reg_reg_lsl_1,))
 

Function Documentation

◆ armop()

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

◆ armtop()

def miasm.arch.arm.arch.armtop (   name,
  fields,
  args = None,
  alias = False 
)

◆ cb_deref_post()

def miasm.arch.arm.arch.cb_deref_post (   tokens)

◆ cb_deref_pre_mem()

def miasm.arch.arm.arch.cb_deref_pre_mem (   tokens)

◆ cb_deref_preinc()

def miasm.arch.arm.arch.cb_deref_preinc (   tokens)

◆ cb_deref_reg_reg()

def miasm.arch.arm.arch.cb_deref_reg_reg (   tokens)

◆ cb_deref_reg_reg_lsl_1()

def miasm.arch.arm.arch.cb_deref_reg_reg_lsl_1 (   tokens)

◆ cb_deref_wb()

def miasm.arch.arm.arch.cb_deref_wb (   tokens)

◆ cb_gpreb_wb()

def miasm.arch.arm.arch.cb_gpreb_wb (   tokens)

◆ cb_reglistparse()

def miasm.arch.arm.arch.cb_reglistparse (   tokens)

◆ cb_shift()

def miasm.arch.arm.arch.cb_shift (   tokens)

◆ cb_tok_reg_duo()

def miasm.arch.arm.arch.cb_tok_reg_duo (   tokens)

◆ check_bounds()

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

◆ check_values()

def miasm.arch.arm.arch.check_values (   values,
  value 
)

◆ deref2expr_nooff()

def miasm.arch.arm.arch.deref2expr_nooff (   tokens)

◆ op_shift2expr()

def miasm.arch.arm.arch.op_shift2expr (   tokens)

◆ permut_args()

def miasm.arch.arm.arch.permut_args (   order,
  args 
)

◆ reglist2str()

def miasm.arch.arm.arch.reglist2str (   rlist)
Here is the caller graph for this function:

Variable Documentation

◆ accum

miasm.arch.arm.arch.accum = bs(l=1)

◆ addsub_name

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

◆ addsubsp_name

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

◆ aif

miasm.arch.arm.arch.aif = bs(l=3, cls=(armt_aif,))

◆ aif_expr

list miasm.arch.arm.arch.aif_expr = [ExprId(x, 32) if x != None else None for x in aif_str]

◆ aif_reg

miasm.arch.arm.arch.aif_reg = reg_info(aif_str, aif_expr)

◆ aif_str

list miasm.arch.arm.arch.aif_str = ["X", "F", "I", "IF", "A", "AF", "AI", "AIF"]

◆ all_binaryop_1_31_shifts_t

miasm.arch.arm.arch.all_binaryop_1_31_shifts_t
Initial value:
2  ['LSL', 'ROR']).setParseAction(op_shift2expr)

◆ all_binaryop_1_32_shifts_t

miasm.arch.arm.arch.all_binaryop_1_32_shifts_t
Initial value:
2  ['LSR', 'ASR']).setParseAction(op_shift2expr)

◆ all_unaryop_shifts_t

miasm.arch.arm.arch.all_unaryop_shifts_t = literal_list(['RRX']).setParseAction(op_shift2expr)

◆ allshifts

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

◆ allshifts_armt

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

◆ allshifts_t_armt

miasm.arch.arm.arch.allshifts_t_armt
Initial value:
2  ['LSL', 'LSR', 'ASR', 'ROR', 'RRX']).setParseAction(op_shift2expr)

◆ alu_name

dictionary miasm.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}

◆ armt_gpreg_shift_off

tuple miasm.arch.arm.arch.armt_gpreg_shift_off = (gpregs_nosppc.parser + allshifts_t_armt + (gpregs.parser | int_1_31)).setParseAction(cb_shift)

◆ barrier_expr

dictionary miasm.arch.arm.arch.barrier_expr
Initial value:
1 = {
2  0b1111: ExprId("SY", 32),
3  0b1110: ExprId("ST", 32),
4  0b1101: ExprId("LD", 32),
5  0b1011: ExprId("ISH", 32),
6  0b1010: ExprId("ISHST", 32),
7  0b1001: ExprId("ISHLD", 32),
8  0b0111: ExprId("NSH", 32),
9  0b0110: ExprId("NSHST", 32),
10  0b0011: ExprId("OSH", 32),
11  0b0010: ExprId("OSHST", 32),
12  0b0001: ExprId("OSHLD", 32),
13 }

◆ barrier_info

miasm.arch.arm.arch.barrier_info = reg_info_dct(barrier_expr)

◆ barrier_option

miasm.arch.arm.arch.barrier_option = bs(l=4, cls=(armt_barrier_option,))

◆ bm_cond

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

◆ bm_cond_barmt

miasm.arch.arm.arch.bm_cond_barmt = bs_mod_name(l=4, fname='cond', mn_mod=cond_dct_barmt)

◆ br_name

dictionary miasm.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}

◆ bs_addi

miasm.arch.arm.arch.bs_addi = bs(l=1, fname="add_imm")

◆ bs_addsub_name

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

◆ bs_addsubsp_name

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

◆ bs_alu_name

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

◆ bs_br_name

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

◆ bs_btransfer_name

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

◆ bs_cond_arg_msb

miasm.arch.arm.arch.bs_cond_arg_msb = bs(l=3, cls=(armt_cond_arg,))

◆ bs_ctransfer_name

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

◆ bs_data_mov_name

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

◆ bs_data_name

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

◆ bs_data_test_name

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

◆ bs_deref_reg_reg

miasm.arch.arm.arch.bs_deref_reg_reg = bs(l=4, cls=(armt_deref_reg_reg,))

◆ bs_deref_reg_reg_lsl_1

miasm.arch.arm.arch.bs_deref_reg_reg_lsl_1 = bs(l=4, cls=(armt_deref_reg_reg_lsl_1,))

◆ bs_hiregop_name

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

◆ bs_ldr_str_name

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

◆ bs_ldrh_strh_name

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

◆ bs_ldstsp_name

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

◆ bs_mov_cmp_add_sub_name

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

◆ bs_mr_name

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

◆ bs_mshift_name

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

◆ bs_pushpop_name

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

◆ bs_rw

miasm.arch.arm.arch.bs_rw = bs_mod_name(l=1, fname='rw', mn_mod=['W', ''])

◆ bs_tbtransfer_name

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

◆ bs_transfer_ldr_name

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

◆ bs_transfer_name

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

◆ bs_transferh_name

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

◆ btransfer_name

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

◆ CIRCUNFLEX

miasm.arch.arm.arch.CIRCUNFLEX = Literal("^")

◆ COMMA

miasm.arch.arm.arch.COMMA = Suppress(",")

◆ cond_dct

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

◆ cond_dct_barmt

miasm.arch.arm.arch.cond_dct_barmt = dict([(x[0], x[1]) for x in enumerate(cond_list) if x[0] & 0b1110 != 0b1110])

◆ cond_expr

list miasm.arch.arm.arch.cond_expr = [ExprId(x, 32) for x in cond_list_full]

◆ cond_info

miasm.arch.arm.arch.cond_info = reg_info(cond_list_full, cond_expr)

◆ cond_list

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

◆ cond_list_full

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

◆ conditional_branch

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

◆ condlsb

miasm.arch.arm.arch.condlsb = armt_cond_lsb(l=1, fname="condlsb")

◆ console_handler

miasm.arch.arm.arch.console_handler = logging.StreamHandler()

◆ cp

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

◆ cp_regs

miasm.arch.arm.arch.cp_regs = reg_info(cpregs_str, cpregs_expr)

◆ cpnum

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

◆ cpopc

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

◆ cpregs_expr

list miasm.arch.arm.arch.cpregs_expr = [ExprId(x, 32) for x in cpregs_str]

◆ cpregs_str

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

◆ cpsr_regs

miasm.arch.arm.arch.cpsr_regs = reg_info(cpsr_regs_str, cpsr_regs_expr)

◆ cpsr_regs_expr

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

◆ cpsr_regs_str

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

◆ crd

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

◆ crm

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

◆ crn

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

◆ ctransfer_name

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

◆ data_mov_name

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

◆ data_name

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

◆ data_test_name

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

◆ deref

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

◆ deref_immpuw

miasm.arch.arm.arch.deref_immpuw = bs(l=8, cls=(armt_op2imm,))

◆ deref_immpuw00

miasm.arch.arm.arch.deref_immpuw00 = bs(l=8, cls=(armt_op2imm00,))

◆ deref_low

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

◆ deref_nooff

miasm.arch.arm.arch.deref_nooff
Initial value:
1 = Group(
2  LBRACK + gpregs.parser + RBRACK).setParseAction(deref2expr_nooff)

◆ deref_pc

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

◆ deref_post

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

◆ deref_pre

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

◆ deref_reg_imm

miasm.arch.arm.arch.deref_reg_imm
Initial value:
1 = Group(LBRACK + gpregs.parser + Optional(
2  COMMA + shift_off) + RBRACK).setParseAction(cb_deref_pre_mem)

◆ deref_reg_reg

tuple miasm.arch.arm.arch.deref_reg_reg = (LBRACK + gpregs.parser + COMMA + gpregs.parser + RBRACK).setParseAction(cb_deref_reg_reg)

◆ deref_reg_reg_lsl_1

tuple miasm.arch.arm.arch.deref_reg_reg_lsl_1 = (LBRACK + gpregs.parser + COMMA + gpregs.parser + OP_LSL + base_expr + RBRACK).setParseAction(cb_deref_reg_reg_lsl_1)

◆ deref_sp

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

◆ dumr

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

◆ dumrh

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

◆ dumscc

miasm.arch.arm.arch.dumscc = bs("1")

◆ expr2shift_dct

miasm.arch.arm.arch.expr2shift_dct = dict((value, key) for key, value in viewitems(shift2expr_dct))

◆ fix_cond

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

◆ gpreg_list

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

◆ gpreg_p

miasm.arch.arm.arch.gpreg_p = gpregs.parser

◆ gpregs

miasm.arch.arm.arch.gpregs = reg_info(regs_str, regs_expr)

◆ gpregs_h

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

◆ gpregs_l

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

◆ gpregs_l_13

miasm.arch.arm.arch.gpregs_l_13 = reg_info(regs_str[:13], regs_expr[:13])

◆ gpregs_l_wb

miasm.arch.arm.arch.gpregs_l_wb
Initial value:
1 = Group(
2  gpregs_l.parser + Optional('!')).setParseAction(cb_gpreb_wb)

◆ gpregs_nopc

miasm.arch.arm.arch.gpregs_nopc
Initial value:
1 = reg_info(regs_str[:14],
2  regs_expr[:14])

◆ gpregs_nosp

miasm.arch.arm.arch.gpregs_nosp
Initial value:
1 = reg_info(regs_str[:13] + [str(reg_dum), regs_str[14], regs_str[15]],
2  regs_expr[:13] + [reg_dum, regs_expr[14], regs_expr[15]])

◆ gpregs_nosppc

miasm.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]])

◆ gpregs_pc

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

◆ gpregs_sp

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

◆ gpregs_sppc

miasm.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])

◆ gpregs_wb

miasm.arch.arm.arch.gpregs_wb = Group(gpregs.parser + Optional('!')).setParseAction(cb_gpreb_wb)

◆ hb

miasm.arch.arm.arch.hb = bs(l=1)

◆ hiregop_name

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

◆ hl

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

◆ imm1

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

◆ imm12

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

◆ imm12_1

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

◆ imm12_3

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

◆ imm12_8

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

◆ imm12_8_t4

miasm.arch.arm.arch.imm12_8_t4 = bs(l=8, cls=(armt4_imm12,), fname="imm", order=2)

◆ imm12_noarg

miasm.arch.arm.arch.imm12_noarg = bs(l=12, fname="imm")

◆ imm12_off

miasm.arch.arm.arch.imm12_off = bs(l=12, fname="imm")

◆ imm16

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

◆ imm16_1

miasm.arch.arm.arch.imm16_1 = bs(l=1, fname="imm16_1", order=1)

◆ imm16_3

miasm.arch.arm.arch.imm16_3 = bs(l=3, fname="imm16_3", order=1)

◆ imm16_4

miasm.arch.arm.arch.imm16_4 = bs(l=4, fname="imm16_4", order=1)

◆ imm16_8

miasm.arch.arm.arch.imm16_8 = bs(l=8, cls=(armt2_imm16,), fname="imm", order=2)

◆ imm20

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

◆ imm2_noarg

miasm.arch.arm.arch.imm2_noarg = bs(l=2, fname="imm")

◆ imm4

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

◆ imm4_noarg

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

◆ imm5_2

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

◆ imm5_3

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

◆ imm5_off

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

◆ imm8

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

◆ imm8_12

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

◆ imm8_d1

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

◆ imm_12_4

miasm.arch.arm.arch.imm_12_4 = bs(l=4, cls=(arm_imm_12_4,))

◆ imm_4_12

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

◆ imm_stype

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

◆ imm_stype_00

miasm.arch.arm.arch.imm_stype_00 = bs('00', fname="stype")

◆ imm_stype_01

miasm.arch.arm.arch.imm_stype_01 = bs('01', fname="stype")

◆ imm_stype_11

miasm.arch.arm.arch.imm_stype_11 = bs('11', fname="stype")

◆ immedH

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

◆ immedL

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

◆ immop

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

◆ int_1_31

miasm.arch.arm.arch.int_1_31 = str_int.copy().setParseAction(lambda v: check_bounds(1, 31, v[0]))

◆ int_1_32

miasm.arch.arm.arch.int_1_32 = str_int.copy().setParseAction(lambda v: check_bounds(1, 32, v[0]))

◆ int_8_16_24

miasm.arch.arm.arch.int_8_16_24 = str_int.copy().setParseAction(lambda v: check_values([8, 16, 24], v[0]))

◆ itcond

miasm.arch.arm.arch.itcond = bs(l=4, fname="itcond")

◆ itmask

miasm.arch.arm.arch.itmask = armt_itmask(l=4, fname="itmask")

◆ LACC

miasm.arch.arm.arch.LACC = Suppress(Literal("{"))

◆ LBRACK

miasm.arch.arm.arch.LBRACK = Suppress("[")

◆ ldr_str_name

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

◆ ldrh_strh_name

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

◆ ldstsp_name

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

◆ lnk

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

◆ log

miasm.arch.arm.arch.log = logging.getLogger("armdis")

◆ lowb

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

◆ LPARENTHESIS

miasm.arch.arm.arch.LPARENTHESIS = Literal("(")

◆ lr_in

miasm.arch.arm.arch.lr_in = bs(l=1, fname='lr_in', order=-2)

◆ lsb

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

◆ lsb5_2

miasm.arch.arm.arch.lsb5_2 = bs(l=2, cls=(armt2_lsb5,), fname="imm", order=2)

◆ lsb5_3

miasm.arch.arm.arch.lsb5_3 = bs(l=3, fname="lsb5_3", order=1)

◆ mem_rn_imm

miasm.arch.arm.arch.mem_rn_imm = bs(l=4, cls=(arm_mem_rn_imm,), order=1)

◆ MINUS

miasm.arch.arm.arch.MINUS = Suppress(Literal("-"))

◆ mov_cmp_add_sub_name

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

◆ mr_name

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

◆ mshift_name

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

◆ mul_x

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

◆ mul_y

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

◆ o

string miasm.arch.arm.arch.o = ""

◆ off12

miasm.arch.arm.arch.off12 = bs(l=12, cls=(arm_off,), fname="off", order=-1)

◆ off20_11

miasm.arch.arm.arch.off20_11 = bs(l=11, cls=(armt2_off20,), fname="imm", order=2)

◆ off20_6

miasm.arch.arm.arch.off20_6 = bs(l=6, fname="off20_6", order=1)

◆ off3

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

◆ off5

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

◆ off5bw

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

◆ off5h

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

◆ off7

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

◆ off8

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

◆ off8s

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

◆ off8sppc

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

◆ offpc8

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

◆ offs

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

◆ offs11

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

◆ offs8

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

◆ offs_blx

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

◆ offsp8

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

◆ op2

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

◆ op2imm

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

◆ op_list

list miasm.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']

◆ OP_LSL

miasm.arch.arm.arch.OP_LSL = Suppress("LSL")

◆ opc

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

◆ p_regs

miasm.arch.arm.arch.p_regs = reg_info(pregs_str, pregs_expr)

◆ PC

miasm.arch.arm.arch.PC

◆ pc_in

miasm.arch.arm.arch.pc_in = bs(l=1, fname='pc_in', order=-2)

◆ pclr

miasm.arch.arm.arch.pclr = bs(l=1, fname='pclr', order=-2)

◆ ppi

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

◆ ppi_b_nosp

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

◆ ppi_b_sp

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

◆ pregs_expr

list miasm.arch.arm.arch.pregs_expr = [ExprId(x, 32) for x in pregs_str]

◆ pregs_str

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

◆ psr

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

◆ psr_field

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

◆ psr_p

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

◆ pushpop_name

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

◆ ra

miasm.arch.arm.arch.ra = bs(l=4, cls=(arm_gpreg,))

◆ ra_nopc

miasm.arch.arm.arch.ra_nopc = bs(l=4, cls=(arm_gpreg_nopc, arm_arg), fname="ra")

◆ RACC

miasm.arch.arm.arch.RACC = Suppress(Literal("}"))

◆ rbl

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

◆ rbl_deref

miasm.arch.arm.arch.rbl_deref = bs(l=3, cls=(arm_derefl,), fname="rb")

◆ rbl_wb

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

◆ RBRACK

miasm.arch.arm.arch.RBRACK = Suppress("]")

◆ rd

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

◆ rd_nopc

miasm.arch.arm.arch.rd_nopc = bs(l=4, cls=(arm_gpreg_nopc, arm_arg), fname="rd")

◆ rd_nosppc

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

◆ rdh

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

◆ rdl

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

◆ reg_dum

miasm.arch.arm.arch.reg_dum = ExprId('DumReg', 32)

◆ reg_duo

miasm.arch.arm.arch.reg_duo
Initial value:
1 = Group(gpregs.parser + MINUS +
2  gpregs.parser).setParseAction(cb_tok_reg_duo)

◆ reg_or_base

miasm.arch.arm.arch.reg_or_base = gpregs.parser | base_expr

◆ reg_or_duo

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

◆ regs_expr

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

◆ regs_str

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

◆ rlist

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

◆ rm

miasm.arch.arm.arch.rm = bs(l=4, cls=(arm_gpreg,), fname='rm')

◆ rm_cp

miasm.arch.arm.arch.rm_cp = bs(l=4, cls=(armt_rm_cp,))

◆ rm_deref_reg

miasm.arch.arm.arch.rm_deref_reg = bs(l=4, cls=(armt_deref_reg,))

◆ rm_noarg

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

◆ rm_rot2

miasm.arch.arm.arch.rm_rot2 = bs(l=4, cls=(arm_rm_rot2,), fname="rm")

◆ rm_rot5_asr

miasm.arch.arm.arch.rm_rot5_asr = bs(l=4, cls=(arm_rm_rot5_asr,), fname="rm")

◆ rm_rot5_lsl

miasm.arch.arm.arch.rm_rot5_lsl = bs(l=4, cls=(arm_rm_rot5_lsl,), fname="rm")

◆ rm_sh

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

◆ rml

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

◆ rn

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

◆ rn_deref

miasm.arch.arm.arch.rn_deref = bs(l=4, cls=(arm_deref_reg_imm,), fname="rt")

◆ rn_noarg

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

◆ rn_nopc

miasm.arch.arm.arch.rn_nopc = bs(l=4, cls=(arm_gpreg_nopc, arm_arg), fname="rn")

◆ rn_nopc_noarg

miasm.arch.arm.arch.rn_nopc_noarg = bs(l=4, cls=(arm_gpreg_nopc,), fname="rn")

◆ rn_nosp

miasm.arch.arm.arch.rn_nosp = bs(l=4, cls=(arm_gpreg_nosp, arm_arg), fname="rn")

◆ rn_nosppc

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

◆ rn_sp

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

◆ rn_wb

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

◆ rnl

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

◆ rol

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

◆ rol_noarg

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

◆ ror_shifts_t

miasm.arch.arm.arch.ror_shifts_t = literal_list(['ROR']).setParseAction(op_shift2expr)

◆ rot2

miasm.arch.arm.arch.rot2 = bs(l=2, fname="rot2")

◆ rot2_expr

tuple miasm.arch.arm.arch.rot2_expr
Initial value:
1 = (gpregs.parser + Optional(
2  (ror_shifts_t + (int_8_16_24))
3 )).setParseAction(cb_shift)

◆ rot5

miasm.arch.arm.arch.rot5 = bs(l=5, fname="rot5")

◆ rot5_expr

tuple miasm.arch.arm.arch.rot5_expr = shift_off

◆ rot_rm

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

◆ RPARENTHESIS

miasm.arch.arm.arch.RPARENTHESIS = Literal(")")

◆ rs

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

◆ rsh

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

◆ rsl

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

◆ rt

miasm.arch.arm.arch.rt = bs(l=4, cls=(arm_gpreg,), fname='rt')

◆ rt2

miasm.arch.arm.arch.rt2 = bs(l=4, cls=(arm_gpreg,))

◆ rt_nopc

miasm.arch.arm.arch.rt_nopc = bs(l=4, cls=(arm_gpreg_nopc, arm_arg), fname="rt")

◆ sbit

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

◆ scc

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

◆ shift2expr_dct

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

◆ shift_off

tuple miasm.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 )).setParseAction(cb_shift)

◆ shl_shifts_t

miasm.arch.arm.arch.shl_shifts_t = literal_list(['SHL']).setParseAction(op_shift2expr)

◆ sp

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

◆ sppc

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

◆ spsr_regs

miasm.arch.arm.arch.spsr_regs = reg_info(spsr_regs_str, spsr_regs_expr)

◆ spsr_regs_expr

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

◆ spsr_regs_str

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

◆ sr_flags

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

◆ swi_i

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

◆ tbtransfer_name

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

◆ timm10H

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

◆ timm10L

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

◆ timm11L

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

◆ timm6h

miasm.arch.arm.arch.timm6h = bs(l=6, fname="imm6h")

◆ timm6h11l

miasm.arch.arm.arch.timm6h11l = bs(l=11, cls=(armt2_imm6_11l,), fname="imm6h11l")

◆ tj1

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

◆ tj2

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

◆ tl

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

◆ transfer_ldr_name

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

◆ transfer_name

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

◆ transferh_name

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

◆ trb

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

◆ trlist

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

◆ trlist13

miasm.arch.arm.arch.trlist13 = bs(l=13, cls=(armt_rlist13,), fname="trlist", order = -1)

◆ trlist13pclr

miasm.arch.arm.arch.trlist13pclr = bs(l=13, cls=(armt_rlist13_pc_lr,), fname="trlist", order = -1)

◆ trlistpclr

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

◆ tsign

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

◆ unconditional_branch

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

◆ updown

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

◆ updown_b_nosp

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

◆ updown_b_sp

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

◆ wback

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

◆ wback_no_t

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

◆ widthm1

miasm.arch.arm.arch.widthm1 = bs(l=5, cls=(arm_widthm1, m_arg))
miasm.core.cpu.literal_list
def literal_list(l)
Definition: cpu.py:85