miasm
Reverse engineering framework
miasm.arch.mep.jit.mep_CGen Class Reference
Inheritance diagram for miasm.arch.mep.jit.mep_CGen:
Collaboration diagram for miasm.arch.mep.jit.mep_CGen:

Public Member Functions

def __init__ (self, ir_arch)
 
def gen_pre_code (self, attrib)
 
def gen_post_code (self, attrib, pc_value)
 
- Public Member Functions inherited from miasm.jitter.codegen.CGen
def init_arch_C (self)
 
def dst_to_c (self, src)
 
def patch_c_id (self, expr)
 
def id_to_c (self, expr)
 
def add_label_index (self, dst2index, loc_key)
 
def assignblk_to_irbloc (self, instr, assignblk)
 
def block2assignblks (self, block)
 
def add_local_var (self, dst_var, dst_index, expr)
 
def get_mem_prefetch (self, assignblk)
 
def gen_c_assignments (self, assignblk)
 
def gen_check_memory_exception (self, address)
 
def gen_check_cpu_exception (self, address)
 
def traverse_expr_dst (self, expr, dst2index)
 
def gen_assignblk_dst (self, dst)
 
def gen_post_instr_checks (self, attrib)
 
def gen_goto_code (self, attrib, instr_offsets, dst)
 
def gen_dst_goto (self, attrib, instr_offsets, dst2index)
 
def gen_c_code (self, attrib, c_dst, c_assignmnts)
 
def get_caracteristics (self, assignblk, attrib)
 
def get_attributes (self, instr, irblocks, log_mn=False, log_regs=False)
 
def gen_bad_block (self)
 
def get_block_post_label (self, block)
 
def gen_init (self, block)
 
def gen_irblock (self, instr_attrib, attributes, instr_offsets, irblock)
 
def gen_finalize (self, block)
 
def gen_c (self, block, log_mn=False, log_regs=False)
 

Public Attributes

 ir_arch
 
 PC
 
 translator
 
- Public Attributes inherited from miasm.jitter.codegen.CGen
 ir_arch
 
 PC
 
 translator
 
 id_to_c_id
 
 C_PC
 

Additional Inherited Members

- Static Public Attributes inherited from miasm.jitter.codegen.CGen
string CODE_EXCEPTION_MEM_AT_INSTR
 
string CODE_EXCEPTION_AT_INSTR
 
string CODE_RETURN_EXCEPTION
 
string CODE_RETURN_NO_EXCEPTION
 
string CODE_CPU_EXCEPTION_POST_INSTR
 
string CODE_VM_EXCEPTION_POST_INSTR
 
string CODE_INIT
 
string CODE_BAD_BLOCK
 

Detailed Description

Translate a block containing MeP instructions to C

Note: it is used to emulate the *REPEAT instructions

Constructor & Destructor Documentation

◆ __init__()

def miasm.arch.mep.jit.mep_CGen.__init__ (   self,
  ir_arch 
)

Reimplemented from miasm.jitter.codegen.CGen.

Member Function Documentation

◆ gen_post_code()

def miasm.arch.mep.jit.mep_CGen.gen_post_code (   self,
  attrib,
  pc_value 
)
Generate C code inserted after the current block

Reimplemented from miasm.jitter.codegen.CGen.

Here is the caller graph for this function:

◆ gen_pre_code()

def miasm.arch.mep.jit.mep_CGen.gen_pre_code (   self,
  attrib 
)
Generate C code inserted before the current block

Reimplemented from miasm.jitter.codegen.CGen.

Here is the caller graph for this function:

Member Data Documentation

◆ ir_arch

miasm.arch.mep.jit.mep_CGen.ir_arch

◆ PC

miasm.arch.mep.jit.mep_CGen.PC

◆ translator

miasm.arch.mep.jit.mep_CGen.translator

The documentation for this class was generated from the following file: