miasm
Reverse engineering framework
JitCore_ppc32.c File Reference
#include <Python.h>
#include "structmember.h"
#include <stdint.h>
#include <inttypes.h>
#include "../compat_py23.h"
#include "../queue.h"
#include "../vm_mngr.h"
#include "../bn.h"
#include "../vm_mngr_py.h"
#include "../JitCore.h"
#include "JitCore_ppc32.h"
#include "JitCore_ppc32_regs.h"
Include dependency graph for JitCore_ppc32.c:

Macros

#define JITCORE_PPC_REG_EXPAND(_name, _size)    { .name = #_name, .offset = offsetof(struct vm_cpu, _name), .size = _size },
 
#define JITCORE_PPC_REG_EXPAND(_name, _size)    get_reg(_name);
 
#define JITCORE_PPC_REG_EXPAND(_name, _size)    dump_gpreg(#_name, vmcpu->_name, &reg_num);
 
#define JITCORE_PPC_REG_EXPAND(_name, _size)   getset_reg_u32(_name);
 
#define JITCORE_PPC_REG_EXPAND(_name, _size)    get_reg_off(_name);
 
#define JITCORE_PPC_REG_EXPAND(_name, _size)
 

Functions

PyObject * cpu_get_gpreg (JitCpu *self)
 
PyObject * cpu_set_gpreg (JitCpu *self, PyObject *args)
 
PyObject * cpu_init_regs (JitCpu *self)
 
void dump_gpregs (struct vm_cpu *vmcpu)
 
PyObject * cpu_dump_gpregs (JitCpu *self, PyObject *args)
 
PyObject * cpu_dump_gpregs_with_attrib (JitCpu *self, PyObject *args)
 
PyObject * cpu_set_exception (JitCpu *self, PyObject *args)
 
PyObject * cpu_get_exception (JitCpu *self, PyObject *args)
 
void MEM_WRITE_08 (JitCpu *jitcpu, uint64_t addr, uint8_t src)
 
void MEM_WRITE_16 (JitCpu *jitcpu, uint64_t addr, uint16_t src)
 
void MEM_WRITE_32 (JitCpu *jitcpu, uint64_t addr, uint32_t src)
 
void MEM_WRITE_64 (JitCpu *jitcpu, uint64_t addr, uint64_t src)
 
PyObject * get_gpreg_offset_all (void)
 
 MOD_INIT (JitCore_ppc32)
 

Variables

reg_dict gpreg_dict []
 

Macro Definition Documentation

◆ JITCORE_PPC_REG_EXPAND [1/6]

#define JITCORE_PPC_REG_EXPAND (   _name,
  _size 
)     { .name = #_name, .offset = offsetof(struct vm_cpu, _name), .size = _size },

◆ JITCORE_PPC_REG_EXPAND [2/6]

#define JITCORE_PPC_REG_EXPAND (   _name,
  _size 
)     get_reg(_name);

◆ JITCORE_PPC_REG_EXPAND [3/6]

#define JITCORE_PPC_REG_EXPAND (   _name,
  _size 
)     dump_gpreg(#_name, vmcpu->_name, &reg_num);

◆ JITCORE_PPC_REG_EXPAND [4/6]

#define JITCORE_PPC_REG_EXPAND (   _name,
  _size 
)    getset_reg_u32(_name);

◆ JITCORE_PPC_REG_EXPAND [5/6]

#define JITCORE_PPC_REG_EXPAND (   _name,
  _size 
)     get_reg_off(_name);

◆ JITCORE_PPC_REG_EXPAND [6/6]

#define JITCORE_PPC_REG_EXPAND (   _name,
  _size 
)
Value:
{ #_name, (getter) JitCpu_get_ ## _name , \
(setter) JitCpu_set_ ## _name , #_name , NULL},

Function Documentation

◆ cpu_dump_gpregs()

PyObject* cpu_dump_gpregs ( JitCpu self,
PyObject *  args 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cpu_dump_gpregs_with_attrib()

PyObject* cpu_dump_gpregs_with_attrib ( JitCpu self,
PyObject *  args 
)
Here is the call graph for this function:

◆ cpu_get_exception()

PyObject* cpu_get_exception ( JitCpu self,
PyObject *  args 
)

◆ cpu_get_gpreg()

PyObject* cpu_get_gpreg ( JitCpu self)

◆ cpu_init_regs()

PyObject* cpu_init_regs ( JitCpu self)

◆ cpu_set_exception()

PyObject* cpu_set_exception ( JitCpu self,
PyObject *  args 
)

◆ cpu_set_gpreg()

PyObject* cpu_set_gpreg ( JitCpu self,
PyObject *  args 
)

◆ dump_gpregs()

void dump_gpregs ( struct vm_cpu vmcpu)
Here is the caller graph for this function:

◆ get_gpreg_offset_all()

PyObject* get_gpreg_offset_all ( void  )

◆ MEM_WRITE_08()

void MEM_WRITE_08 ( JitCpu jitcpu,
uint64_t  addr,
uint8_t  src 
)
Here is the call graph for this function:

◆ MEM_WRITE_16()

void MEM_WRITE_16 ( JitCpu jitcpu,
uint64_t  addr,
uint16_t  src 
)
Here is the call graph for this function:

◆ MEM_WRITE_32()

void MEM_WRITE_32 ( JitCpu jitcpu,
uint64_t  addr,
uint32_t  src 
)
Here is the call graph for this function:

◆ MEM_WRITE_64()

void MEM_WRITE_64 ( JitCpu jitcpu,
uint64_t  addr,
uint64_t  src 
)
Here is the call graph for this function:

◆ MOD_INIT()

MOD_INIT ( JitCore_ppc32  )

Variable Documentation

◆ gpreg_dict

reg_dict gpreg_dict[]
Initial value:
= {
#define JITCORE_PPC_REG_EXPAND(_name, _size)
}