miasm
Reverse engineering framework
arch.py File Reference

Classes

class  miasm.arch.sh4.arch.sh4_arg
 
class  miasm.arch.sh4.arch.sh4_reg
 
class  miasm.arch.sh4.arch.sh4_gpreg
 
class  miasm.arch.sh4.arch.sh4_dr
 
class  miasm.arch.sh4.arch.sh4_bgpreg
 
class  miasm.arch.sh4.arch.sh4_gpreg_noarg
 
class  miasm.arch.sh4.arch.sh4_freg
 
class  miasm.arch.sh4.arch.sh4_dgpreg
 
class  miasm.arch.sh4.arch.sh4_dgpregpinc
 
class  miasm.arch.sh4.arch.sh4_dgpregpdec
 
class  miasm.arch.sh4.arch.sh4_dgpreg_imm
 
class  miasm.arch.sh4.arch.sh4_imm
 
class  miasm.arch.sh4.arch.sh4_simm
 
class  miasm.arch.sh4.arch.sh4_dpc16imm
 
class  miasm.arch.sh4.arch.sh4_dgbrimm8
 
class  miasm.arch.sh4.arch.sh4_dpc32imm
 
class  miasm.arch.sh4.arch.sh4_pc32imm
 
class  miasm.arch.sh4.arch.additional_info
 
class  miasm.arch.sh4.arch.instruction_sh4
 
class  miasm.arch.sh4.arch.mn_sh4
 
class  miasm.arch.sh4.arch.bs_dr0gbr
 
class  miasm.arch.sh4.arch.bs_dr0gp
 
class  miasm.arch.sh4.arch.bs_dgpreg
 

Namespaces

 miasm.arch.sh4.arch
 

Functions

def miasm.arch.sh4.arch.cb_deref_pcimm (tokens)
 
def miasm.arch.sh4.arch.cb_pcandimmimm (tokens)
 
def miasm.arch.sh4.arch.cb_deref_mem (tokens)
 
def miasm.arch.sh4.arch.cb_predec (tokens)
 
def miasm.arch.sh4.arch.cb_postinc (tokens)
 
def miasm.arch.sh4.arch.cb_regdisp (tokens)
 
def miasm.arch.sh4.arch.cb_regreg (tokens)
 
def miasm.arch.sh4.arch.addop (name, fields, args=None, alias=False)
 

Variables

 miasm.arch.sh4.arch.jra = ExprId('jra', 32)
 
 miasm.arch.sh4.arch.jrb = ExprId('jrb', 32)
 
 miasm.arch.sh4.arch.jrc = ExprId('jrc', 32)
 
 miasm.arch.sh4.arch.PLUS = Suppress("+")
 
 miasm.arch.sh4.arch.MULT = Suppress("*")
 
 miasm.arch.sh4.arch.MINUS = Suppress("-")
 
 miasm.arch.sh4.arch.AND = Suppress("&")
 
 miasm.arch.sh4.arch.LBRACK = Suppress("[")
 
 miasm.arch.sh4.arch.RBRACK = Suppress("]")
 
 miasm.arch.sh4.arch.DEREF = Suppress("@")
 
 miasm.arch.sh4.arch.COMMA = Suppress(",")
 
 miasm.arch.sh4.arch.LPARENT = Suppress("(")
 
 miasm.arch.sh4.arch.RPARENT = Suppress(")")
 
tuple miasm.arch.sh4.arch.ref_pc = (LPARENT + reg_info_pc.parser + COMMA + base_expr + RPARENT).setParseAction(cb_deref_pcimm)
 
tuple miasm.arch.sh4.arch.ref_pcandimm = (LPARENT + reg_info_pc.parser + AND + base_expr + COMMA + base_expr + RPARENT).setParseAction(cb_pcandimmimm)
 
tuple miasm.arch.sh4.arch.pcdisp = (reg_info_pc.parser + AND + base_expr + PLUS + base_expr).setParseAction(cb_pcandimmimm)
 
 miasm.arch.sh4.arch.PTR = Suppress('PTR')
 
tuple miasm.arch.sh4.arch.deref_pc = (DEREF + ref_pc).setParseAction(cb_deref_mem)
 
tuple miasm.arch.sh4.arch.deref_pcimm = (DEREF + ref_pcandimm).setParseAction(cb_deref_mem)
 
tuple miasm.arch.sh4.arch.dgpregs_base = (DEREF + gpregs.parser).setParseAction(cb_deref_mem)
 
tuple miasm.arch.sh4.arch.dgpregs_predec = (DEREF + MINUS + gpregs.parser).setParseAction(cb_predec)
 
tuple miasm.arch.sh4.arch.dgpregs_postinc = (DEREF + gpregs.parser + PLUS).setParseAction(cb_postinc)
 
tuple miasm.arch.sh4.arch.dgpregs = dgpregs_base | dgpregs_predec | dgpregs_postinc
 
tuple miasm.arch.sh4.arch.d_gpreg_gpreg = (DEREF + LPARENT + gpregs.parser + COMMA + gpregs.parser + RPARENT).setParseAction(cb_regdisp)
 
tuple miasm.arch.sh4.arch.dgpregs_p = dgpregs_predec | dgpregs_postinc
 
tuple miasm.arch.sh4.arch.dgpregs_ir = (DEREF + LPARENT + gpregs.parser + COMMA + base_expr + RPARENT).setParseAction(cb_regdisp)
 
tuple miasm.arch.sh4.arch.dgbr_imm = (DEREF + LPARENT + reg_info_gbr.parser + COMMA + base_expr + RPARENT).setParseAction(cb_regdisp)
 
tuple miasm.arch.sh4.arch.dgbr_reg = (DEREF + LPARENT + reg_info_gbr.parser + COMMA + gpregs.parser + RPARENT).setParseAction(cb_regreg)
 
 miasm.arch.sh4.arch.rn = bs(l=4, cls=(sh4_gpreg,), fname="rn")
 
 miasm.arch.sh4.arch.rm = bs(l=4, cls=(sh4_gpreg,), fname="rm")
 
 miasm.arch.sh4.arch.d08_rn = bs(l=4, cls=(sh4_dgpreg,), fname="rn", sz = 8)
 
 miasm.arch.sh4.arch.d16_rn = bs(l=4, cls=(sh4_dgpreg,), fname="rn", sz = 16)
 
 miasm.arch.sh4.arch.d32_rn = bs(l=4, cls=(sh4_dgpreg,), fname="rn", sz = 32)
 
 miasm.arch.sh4.arch.d08_rm = bs(l=4, cls=(sh4_dgpreg,), fname="rm", sz = 8)
 
 miasm.arch.sh4.arch.d16_rm = bs(l=4, cls=(sh4_dgpreg,), fname="rm", sz = 16)
 
 miasm.arch.sh4.arch.d32_rm = bs(l=4, cls=(sh4_dgpreg,), fname="rm", sz = 32)
 
 miasm.arch.sh4.arch.brm = bs(l=3, cls=(sh4_bgpreg,), fname="brm")
 
 miasm.arch.sh4.arch.brn = bs(l=3, cls=(sh4_bgpreg,), fname="brn")
 
 miasm.arch.sh4.arch.d08rnimm = bs(l=4, fname="rn", cls=(sh4_dgpreg_imm,), sz = 8)
 
 miasm.arch.sh4.arch.d16rnimm = bs(l=4, fname="rn", cls=(sh4_dgpreg_imm,), sz = 16)
 
 miasm.arch.sh4.arch.d32rnimm = bs(l=4, fname="rn", cls=(sh4_dgpreg_imm,), sz = 32)
 
 miasm.arch.sh4.arch.d08rmimm = bs(l=4, fname="rm", cls=(sh4_dgpreg_imm,), sz = 8)
 
 miasm.arch.sh4.arch.d16rmimm = bs(l=4, fname="rm", cls=(sh4_dgpreg_imm,), sz = 16)
 
 miasm.arch.sh4.arch.d32rmimm = bs(l=4, fname="rm", cls=(sh4_dgpreg_imm,), sz = 32)
 
 miasm.arch.sh4.arch.btype = bs(l=4, fname="btype", order=-1)
 
 miasm.arch.sh4.arch.s08imm = bs(l=8, cls=(sh4_simm,), fname="imm")
 
 miasm.arch.sh4.arch.s12imm = bs(l=12, cls=(sh4_simm,), fname="imm")
 
 miasm.arch.sh4.arch.dpc16imm = bs(l=8, cls=(sh4_dpc16imm,), fname="pcimm", sz=16)
 
 miasm.arch.sh4.arch.dpc32imm = bs(l=8, cls=(sh4_dpc32imm,), fname="pcimm", sz=32)
 
 miasm.arch.sh4.arch.dimm4 = bs(l=4, fname='disp', order=-1)
 
 miasm.arch.sh4.arch.d08gbrimm8 = bs(l=8, cls=(sh4_dgbrimm8,), fname='disp', sz=8)
 
 miasm.arch.sh4.arch.d16gbrimm8 = bs(l=8, cls=(sh4_dgbrimm8,), fname='disp', sz=16)
 
 miasm.arch.sh4.arch.d32gbrimm8 = bs(l=8, cls=(sh4_dgbrimm8,), fname='disp', sz=32)
 
 miasm.arch.sh4.arch.pc32imm = bs(l=8, cls=(sh4_pc32imm,), fname="pcimm")
 
 miasm.arch.sh4.arch.d08rnpinc = bs(l=4, cls=(sh4_dgpregpinc,), op='postinc', sz=8, fname="rn")
 
 miasm.arch.sh4.arch.d08rmpinc = bs(l=4, cls=(sh4_dgpregpinc,), op='postinc', sz=8, fname="rm")
 
 miasm.arch.sh4.arch.d16rnpinc = bs(l=4, cls=(sh4_dgpregpinc,), op='postinc', sz=16, fname="rn")
 
 miasm.arch.sh4.arch.d16rmpinc = bs(l=4, cls=(sh4_dgpregpinc,), op='postinc', sz=16, fname="rm")
 
 miasm.arch.sh4.arch.d32rnpinc = bs(l=4, cls=(sh4_dgpregpinc,), op='postinc', sz=32, fname="rn")
 
 miasm.arch.sh4.arch.d32rmpinc = bs(l=4, cls=(sh4_dgpregpinc,), op='postinc', sz=32, fname="rm")
 
 miasm.arch.sh4.arch.d08rnpdec = bs(l=4, cls=(sh4_dgpregpinc,), op='predec', sz=8, fname="rn")
 
 miasm.arch.sh4.arch.d08rmpdec = bs(l=4, cls=(sh4_dgpregpinc,), op='predec', sz=8, fname="rm")
 
 miasm.arch.sh4.arch.d16rnpdec = bs(l=4, cls=(sh4_dgpregpinc,), op='predec', sz=16, fname="rn")
 
 miasm.arch.sh4.arch.d16rmpdec = bs(l=4, cls=(sh4_dgpregpinc,), op='predec', sz=16, fname="rm")
 
 miasm.arch.sh4.arch.d32rnpdec = bs(l=4, cls=(sh4_dgpregpinc,), op='predec', sz=32, fname="rn")
 
 miasm.arch.sh4.arch.d32rmpdec = bs(l=4, cls=(sh4_dgpregpinc,), op='predec', sz=32, fname="rm")
 
 miasm.arch.sh4.arch.u08imm = bs(l=8, cls=(sh4_imm,), fname="imm")
 
 miasm.arch.sh4.arch.dr0gbr = bs(l=0, cls=(bs_dr0gbr,), sz=8)
 
 miasm.arch.sh4.arch.d08gpreg = bs(l=4, cls=(bs_dgpreg,), sz=8)
 
 miasm.arch.sh4.arch.d32gpreg = bs(l=4, cls=(bs_dgpreg,), sz=32)
 
 miasm.arch.sh4.arch.frn = bs(l=4, cls=(sh4_freg,), fname="frn")
 
 miasm.arch.sh4.arch.frm = bs(l=4, cls=(sh4_freg,), fname="frm")
 
 miasm.arch.sh4.arch.bd08r0gp = bs(l=4, cls=(bs_dr0gp,), sz=8)
 
 miasm.arch.sh4.arch.bd16r0gp = bs(l=4, cls=(bs_dr0gp,), sz=16)
 
 miasm.arch.sh4.arch.bd32r0gp = bs(l=4, cls=(bs_dr0gp,), sz=32)
 
 miasm.arch.sh4.arch.drn = bs(l=3, cls=(sh4_dr,), fname="drn")
 
 miasm.arch.sh4.arch.drm = bs(l=3, cls=(sh4_dr,), fname="drm")