miasm
Reverse engineering framework
miasm.arch.ppc.sem Namespace Reference

Classes

class  ir_ppc32b
 

Functions

def mn_compute_flags (rvalue, overflow_expr=None)
 
def mn_do_add (ir, instr, arg1, arg2, arg3)
 
def mn_do_and (ir, instr, ra, rs, arg2)
 
def mn_do_cntlzw (ir, instr, ra, rs)
 
def crbit_to_reg (bit)
 
def mn_do_cr (ir, instr, crd, cra, crb)
 
def mn_do_div (ir, instr, rd, ra, rb)
 
def mn_do_eqv (ir, instr, ra, rs, rb)
 
def mn_do_exts (ir, instr, ra, rs)
 
def byte_swap (expr)
 
def mn_do_load (ir, instr, arg1, arg2, arg3=None)
 
def mn_do_lmw (ir, instr, rd, src)
 
def mn_do_lswi (ir, instr, rd, ra, nb)
 
def mn_do_lswx (ir, instr, rd, ra, nb)
 
def mn_do_mcrf (ir, instr, crfd, crfs)
 
def mn_do_mcrxr (ir, instr, crfd)
 
def mn_do_mfcr (ir, instr, rd)
 
def mn_mfmsr (rd)
 
def mn_mfspr (ir, instr, arg1, arg2)
 
def mn_mtcrf (ir, instr, crm, rs)
 
def mn_mtmsr (ir, instr, rs)
 
def mn_mtspr (ir, instr, arg1, arg2)
 
def mn_mtsr (ir, instr, sr, rs)
 
def mn_mfsr (ir, instr, rd, sr)
 
def mn_do_mul (ir, instr, rd, ra, arg2)
 
def mn_do_nand (ir, instr, ra, rs, rb)
 
def mn_do_neg (ir, instr, rd, ra)
 
def mn_do_nor (ir, instr, ra, rs, rb)
 
def mn_do_or (ir, instr, ra, rs, arg2)
 
def mn_do_rfi (ir, instr)
 
def mn_do_rotate (ir, instr, ra, rs, shift, mb, me)
 
def mn_do_slw (ir, instr, ra, rs, rb)
 
def mn_do_sraw (ir, instr, ra, rs, rb)
 
def mn_do_srawi (ir, instr, ra, rs, imm)
 
def mn_do_srw (ir, instr, ra, rs, rb)
 
def mn_do_stmw (ir, instr, rs, dest)
 
def mn_do_store (ir, instr, arg1, arg2, arg3=None)
 
def mn_do_sub (ir, instr, arg1, arg2, arg3)
 
def mn_do_xor (ir, instr, ra, rs, rb)
 
def mn_b (ir, instr, arg1, arg2=None)
 
def mn_bl (ir, instr, arg1, arg2=None)
 
def mn_get_condition (instr)
 
def mn_do_cond_branch (ir, instr, dest)
 
def mn_do_nop_warn (ir, instr, *args)
 
def mn_cmp_signed (arg1, arg2, arg3)
 
def mn_cmp_unsigned (arg1, arg2, arg3)
 
def mn_nop (ir, instr, *args)
 
def mn_or (arg1, arg2, arg3)
 
def mn_assign (arg1, arg2)
 
def mn_stb (ir, instr, arg1, arg2)
 
def mn_stwu (arg1, arg2)
 

Variables

dictionary spr_dict
 
dictionary sr_dict
 
dictionary float_dict
 
dictionary vex_dict
 
 crf_dict
 
dictionary ctx
 
 sbuild = SemBuilder(ctx)
 
dictionary sem_dir
 

Function Documentation

◆ byte_swap()

def miasm.arch.ppc.sem.byte_swap (   expr)
Here is the caller graph for this function:

◆ crbit_to_reg()

def miasm.arch.ppc.sem.crbit_to_reg (   bit)
Here is the caller graph for this function:

◆ mn_assign()

def miasm.arch.ppc.sem.mn_assign (   arg1,
  arg2 
)

◆ mn_b()

def miasm.arch.ppc.sem.mn_b (   ir,
  instr,
  arg1,
  arg2 = None 
)

◆ mn_bl()

def miasm.arch.ppc.sem.mn_bl (   ir,
  instr,
  arg1,
  arg2 = None 
)

◆ mn_cmp_signed()

def miasm.arch.ppc.sem.mn_cmp_signed (   arg1,
  arg2,
  arg3 
)

◆ mn_cmp_unsigned()

def miasm.arch.ppc.sem.mn_cmp_unsigned (   arg1,
  arg2,
  arg3 
)

◆ mn_compute_flags()

def miasm.arch.ppc.sem.mn_compute_flags (   rvalue,
  overflow_expr = None 
)
Here is the caller graph for this function:

◆ mn_do_add()

def miasm.arch.ppc.sem.mn_do_add (   ir,
  instr,
  arg1,
  arg2,
  arg3 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mn_do_and()

def miasm.arch.ppc.sem.mn_do_and (   ir,
  instr,
  ra,
  rs,
  arg2 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mn_do_cntlzw()

def miasm.arch.ppc.sem.mn_do_cntlzw (   ir,
  instr,
  ra,
  rs 
)
Here is the call graph for this function:

◆ mn_do_cond_branch()

def miasm.arch.ppc.sem.mn_do_cond_branch (   ir,
  instr,
  dest 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mn_do_cr()

def miasm.arch.ppc.sem.mn_do_cr (   ir,
  instr,
  crd,
  cra,
  crb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mn_do_div()

def miasm.arch.ppc.sem.mn_do_div (   ir,
  instr,
  rd,
  ra,
  rb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mn_do_eqv()

def miasm.arch.ppc.sem.mn_do_eqv (   ir,
  instr,
  ra,
  rs,
  rb 
)
Here is the call graph for this function:

◆ mn_do_exts()

def miasm.arch.ppc.sem.mn_do_exts (   ir,
  instr,
  ra,
  rs 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mn_do_lmw()

def miasm.arch.ppc.sem.mn_do_lmw (   ir,
  instr,
  rd,
  src 
)
Here is the caller graph for this function:

◆ mn_do_load()

def miasm.arch.ppc.sem.mn_do_load (   ir,
  instr,
  arg1,
  arg2,
  arg3 = None 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mn_do_lswi()

def miasm.arch.ppc.sem.mn_do_lswi (   ir,
  instr,
  rd,
  ra,
  nb 
)

◆ mn_do_lswx()

def miasm.arch.ppc.sem.mn_do_lswx (   ir,
  instr,
  rd,
  ra,
  nb 
)

◆ mn_do_mcrf()

def miasm.arch.ppc.sem.mn_do_mcrf (   ir,
  instr,
  crfd,
  crfs 
)

◆ mn_do_mcrxr()

def miasm.arch.ppc.sem.mn_do_mcrxr (   ir,
  instr,
  crfd 
)

◆ mn_do_mfcr()

def miasm.arch.ppc.sem.mn_do_mfcr (   ir,
  instr,
  rd 
)

◆ mn_do_mul()

def miasm.arch.ppc.sem.mn_do_mul (   ir,
  instr,
  rd,
  ra,
  arg2 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mn_do_nand()

def miasm.arch.ppc.sem.mn_do_nand (   ir,
  instr,
  ra,
  rs,
  rb 
)
Here is the call graph for this function:

◆ mn_do_neg()

def miasm.arch.ppc.sem.mn_do_neg (   ir,
  instr,
  rd,
  ra 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mn_do_nop_warn()

def miasm.arch.ppc.sem.mn_do_nop_warn (   ir,
  instr,
args 
)
Here is the caller graph for this function:

◆ mn_do_nor()

def miasm.arch.ppc.sem.mn_do_nor (   ir,
  instr,
  ra,
  rs,
  rb 
)
Here is the call graph for this function:

◆ mn_do_or()

def miasm.arch.ppc.sem.mn_do_or (   ir,
  instr,
  ra,
  rs,
  arg2 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mn_do_rfi()

def miasm.arch.ppc.sem.mn_do_rfi (   ir,
  instr 
)

◆ mn_do_rotate()

def miasm.arch.ppc.sem.mn_do_rotate (   ir,
  instr,
  ra,
  rs,
  shift,
  mb,
  me 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mn_do_slw()

def miasm.arch.ppc.sem.mn_do_slw (   ir,
  instr,
  ra,
  rs,
  rb 
)
Here is the call graph for this function:

◆ mn_do_sraw()

def miasm.arch.ppc.sem.mn_do_sraw (   ir,
  instr,
  ra,
  rs,
  rb 
)
Here is the call graph for this function:

◆ mn_do_srawi()

def miasm.arch.ppc.sem.mn_do_srawi (   ir,
  instr,
  ra,
  rs,
  imm 
)
Here is the call graph for this function:

◆ mn_do_srw()

def miasm.arch.ppc.sem.mn_do_srw (   ir,
  instr,
  ra,
  rs,
  rb 
)
Here is the call graph for this function:

◆ mn_do_stmw()

def miasm.arch.ppc.sem.mn_do_stmw (   ir,
  instr,
  rs,
  dest 
)
Here is the caller graph for this function:

◆ mn_do_store()

def miasm.arch.ppc.sem.mn_do_store (   ir,
  instr,
  arg1,
  arg2,
  arg3 = None 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mn_do_sub()

def miasm.arch.ppc.sem.mn_do_sub (   ir,
  instr,
  arg1,
  arg2,
  arg3 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mn_do_xor()

def miasm.arch.ppc.sem.mn_do_xor (   ir,
  instr,
  ra,
  rs,
  rb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mn_get_condition()

def miasm.arch.ppc.sem.mn_get_condition (   instr)
Here is the caller graph for this function:

◆ mn_mfmsr()

def miasm.arch.ppc.sem.mn_mfmsr (   rd)

◆ mn_mfspr()

def miasm.arch.ppc.sem.mn_mfspr (   ir,
  instr,
  arg1,
  arg2 
)

◆ mn_mfsr()

def miasm.arch.ppc.sem.mn_mfsr (   ir,
  instr,
  rd,
  sr 
)

◆ mn_mtcrf()

def miasm.arch.ppc.sem.mn_mtcrf (   ir,
  instr,
  crm,
  rs 
)

◆ mn_mtmsr()

def miasm.arch.ppc.sem.mn_mtmsr (   ir,
  instr,
  rs 
)

◆ mn_mtspr()

def miasm.arch.ppc.sem.mn_mtspr (   ir,
  instr,
  arg1,
  arg2 
)

◆ mn_mtsr()

def miasm.arch.ppc.sem.mn_mtsr (   ir,
  instr,
  sr,
  rs 
)

◆ mn_nop()

def miasm.arch.ppc.sem.mn_nop (   ir,
  instr,
args 
)

◆ mn_or()

def miasm.arch.ppc.sem.mn_or (   arg1,
  arg2,
  arg3 
)

◆ mn_stb()

def miasm.arch.ppc.sem.mn_stb (   ir,
  instr,
  arg1,
  arg2 
)

◆ mn_stwu()

def miasm.arch.ppc.sem.mn_stwu (   arg1,
  arg2 
)

Variable Documentation

◆ crf_dict

miasm.arch.ppc.sem.crf_dict
Initial value:
1 = dict((ExprId("CR%d" % i, 4),
2  dict( (bit, ExprId("CR%d_%s" % (i, bit), 1))
3  for bit in ['LT', 'GT', 'EQ', 'SO' ] ))
4  for i in range(8) )

◆ ctx

dictionary miasm.arch.ppc.sem.ctx
Initial value:
1 = {
2  'crf_dict': crf_dict,
3  'spr_dict': spr_dict,
4  'sr_dict': sr_dict,
5  'float_dict': float_dict,
6  'vex_dict': vex_dict,
7  'expr': expr,
8 }

◆ float_dict

dictionary miasm.arch.ppc.sem.float_dict
Initial value:
1 = {
2  0: FPR0, 1: FPR1, 2: FPR2, 3: FPR3, 4: FPR4, 5: FPR5, 6: FPR6, 7: FPR7, 8: FPR8,
3  9: FPR9, 10: FPR10, 11: FPR11, 12: FPR12, 13: FPR13, 14: FPR14, 15: FPR15, 16: FPR16,
4  17: FPR17, 18: FPR18, 19: FPR19, 20: FPR20, 21: FPR21, 22: FPR22, 23: FPR23, 24: FPR24,
5  25: FPR25, 26: FPR26, 27: FPR27, 28: FPR28, 29: FPR29, 30: FPR30, 31: FPR31
6 }

◆ sbuild

miasm.arch.ppc.sem.sbuild = SemBuilder(ctx)

◆ sem_dir

dictionary miasm.arch.ppc.sem.sem_dir

◆ spr_dict

dictionary miasm.arch.ppc.sem.spr_dict
Initial value:
1 = {
2  8: LR, 9: CTR, 18: DSISR, 19: DAR,
3  22: DEC, 25: SDR1, 26: SRR0, 27: SRR1,
4  272: SPRG0, 273: SPRG0, 274: SPRG1, 275: SPRG2, 276: SPRG3,
5  284: TBL, 285: TBU, 287: PVR,
6  528: IBAT0U, 529: IBAT0L, 530: IBAT1U, 531: IBAT1L, 532: IBAT2U, 533: IBAT2L, 534: IBAT3U, 535: IBAT3L,
7  536: DBAT0U, 537: DBAT0L, 538: DBAT1U, 539: DBAT1L, 540: DBAT2U, 541: DBAT2L, 542: DBAT3U, 543: DBAT3L,
8  1023: PIR
9 }

◆ sr_dict

dictionary miasm.arch.ppc.sem.sr_dict
Initial value:
1 = {
2  0: SR0, 1: SR1, 2: SR2, 3: SR3,
3  4: SR4, 5: SR5, 6: SR6, 7: SR7,
4  8: SR8, 9: SR9, 10: SR10, 11: SR11,
5  12: SR12, 13: SR13, 14: SR14, 15: SR15
6 }

◆ vex_dict

dictionary miasm.arch.ppc.sem.vex_dict
Initial value:
1 = {
2  0: VR0, 1: VR1, 2: VR2, 3: VR3, 4: VR4, 5: VR5, 6: VR6, 7: VR7, 8: VR8,
3  9: VR9, 10: VR10, 11: VR11, 12: VR12, 13: VR13, 14: VR14, 15: VR15, 16: VR16,
4  17: VR17, 18: VR18, 19: VR19, 20: VR20, 21: VR21, 22: VR22, 23: VR23, 24: VR24,
5  25: VR25, 26: VR26, 27: VR27, 28: VR28, 29: VR29, 30: VR30, 31: VR31,
6 }
range
Definition: range.py:1