2014-05-27 10:45:58 +08:00
|
|
|
/* Capstone Disassembly Engine */
|
|
|
|
/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
|
2014-01-05 00:00:05 +08:00
|
|
|
|
|
|
|
#ifndef CS_PPC_MAP_H
|
|
|
|
#define CS_PPC_MAP_H
|
|
|
|
|
|
|
|
#include "../../include/capstone.h"
|
|
|
|
|
|
|
|
// return name of regiser in friendly string
|
|
|
|
const char *PPC_reg_name(csh handle, unsigned int reg);
|
|
|
|
|
|
|
|
// given internal insn id, return public instruction info
|
2014-01-06 10:56:59 +08:00
|
|
|
void PPC_get_insn_id(cs_struct *h, cs_insn *insn, unsigned int id);
|
2014-01-05 00:00:05 +08:00
|
|
|
|
|
|
|
const char *PPC_insn_name(csh handle, unsigned int id);
|
2014-07-08 08:59:27 +08:00
|
|
|
const char *PPC_group_name(csh handle, unsigned int id);
|
2014-01-05 00:00:05 +08:00
|
|
|
|
|
|
|
// map internal raw register to 'public' register
|
|
|
|
ppc_reg PPC_map_register(unsigned int r);
|
|
|
|
|
2014-09-21 13:04:50 +08:00
|
|
|
struct ppc_alias {
|
|
|
|
unsigned int id; // instruction id
|
|
|
|
int cc; // code condition
|
|
|
|
const char *mnem;
|
|
|
|
};
|
|
|
|
|
|
|
|
// given alias mnemonic, return instruction ID & CC
|
|
|
|
bool PPC_alias_insn(const char *name, struct ppc_alias *alias);
|
2014-09-04 12:03:31 +08:00
|
|
|
|
2014-10-01 17:39:15 +08:00
|
|
|
// check if this insn is relative branch
|
|
|
|
bool PPC_abs_branch(cs_struct *h, unsigned int id);
|
|
|
|
|
2014-01-05 00:00:05 +08:00
|
|
|
#endif
|
|
|
|
|