4 #ifdef CAPSTONE_HAS_POWERPC
9 #include "../../utils.h"
13 #define GET_INSTRINFO_ENUM
17 static const name_map reg_name_maps[] = {
236 #ifndef CAPSTONE_DIET
240 return reg_name_maps[
reg].
name;
250 #ifndef CAPSTONE_DIET
251 { 0 }, { 0 }, { 0 }, 0, 0
265 insn->id =
insns[
i].mapid;
268 #ifndef CAPSTONE_DIET
283 insn->detail->groups[insn->detail->groups_count] =
PPC_GRP_JUMP;
284 insn->detail->groups_count++;
293 #ifndef CAPSTONE_DIET
294 static const name_map insn_name_maps[] = {
1413 static const name_map alias_insn_names[] = {
1420 #ifndef CAPSTONE_DIET
1427 for (
i = 0;
i <
ARR_SIZE(alias_insn_names);
i++) {
1428 if (alias_insn_names[
i].
id ==
id)
1429 return alias_insn_names[
i].
name;
1432 return insn_name_maps[
id].
name;
1444 if (!strcmp(
name, insn_name_maps[
i].
name))
1452 #ifndef CAPSTONE_DIET
1478 #ifndef CAPSTONE_DIET
1488 static unsigned int map[] = { 0,
1559 static const struct ppc_alias alias_insn_name_maps[] = {
1655 for(
i = 0;
i <
ARR_SIZE(alias_insn_name_maps);
i++) {
1656 if (!strcmp(
name, alias_insn_name_maps[
i].
mnem)) {
1657 alias->
id = alias_insn_name_maps[
i].
id;
1658 alias->
cc = alias_insn_name_maps[
i].
cc;
1672 static const unsigned int insn_abs[] = {
1694 for (
i = 0; insn_abs[
i];
i++) {
1695 if (
id == insn_abs[
i]) {
static name_map group_name_maps[]
const char * PPC_insn_name(csh handle, unsigned int id)
ppc_reg PPC_map_register(unsigned int r)
bool PPC_alias_insn(const char *name, struct ppc_alias *alias)
void PPC_get_insn_id(cs_struct *h, cs_insn *insn, unsigned int id)
bool PPC_abs_branch(cs_struct *h, unsigned int id)
const char * PPC_reg_name(csh handle, unsigned int reg)
const char * PPC_group_name(csh handle, unsigned int id)
ppc_insn PPC_map_insn(const char *name)
static mcore_handle handle
CAPSTONE_EXPORT bool CAPSTONE_API cs_reg_write(csh ud, const cs_insn *insn, unsigned int reg_id)
size_t map(int syms, int left, int len)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
@ PPC_BC_SO
summary overflow
@ PPC_BC_NS
not summary overflow
@ PPC_GRP_INVALID
= CS_GRP_INVALID
@ PPC_GRP_JUMP
= CS_GRP_JUMP
unsigned int count_positive(const uint16_t *list)
unsigned int count_positive8(const unsigned char *list)
unsigned short insn_find(const insn_map *insns, unsigned int max, unsigned int id, unsigned short **cache)
const char * id2name(const name_map *map, int max, const unsigned int id)
static struct insnlist * insns[64]