Go to the documentation of this file.
4 #ifdef CAPSTONE_HAS_POWERPC
9 #include "../../utils.h"
13 #define GET_INSTRINFO_ENUM
14 #include "PPCGenInstrInfo.inc"
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
255 #include "PPCMappingInsn.inc"
265 insn->id = insns[
i].
mapid;
268 #ifndef CAPSTONE_DIET
272 memcpy(insn->detail->regs_read, insns[
i].regs_use,
sizeof(insns[
i].regs_use));
275 memcpy(insn->detail->regs_write, insns[
i].regs_mod,
sizeof(insns[
i].regs_mod));
278 memcpy(insn->detail->groups, insns[
i].groups,
sizeof(insns[
i].groups));
281 if (insns[
i].
branch || insns[
i].indirect_branch) {
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;
1438 #ifndef CAPSTONE_DIET
1464 #ifndef CAPSTONE_DIET
1474 static unsigned int map[] = { 0,
1545 static const struct ppc_alias alias_insn_name_maps[] = {
1640 #ifndef CAPSTONE_DIET
1644 for(
i = 0;
i <
ARR_SIZE(alias_insn_name_maps);
i++) {
1645 if (!strcmp(
name, alias_insn_name_maps[
i].
mnem)) {
1646 alias->
id = alias_insn_name_maps[
i].
id;
1647 alias->
cc = alias_insn_name_maps[
i].
cc;
1652 #ifndef CAPSTONE_DIET
1656 alias->
id = insn_name_maps[
x].
id;
1667 static const unsigned int insn_abs[] = {
1693 for (
i = 0; insn_abs[
i];
i++) {
1694 if (
id == insn_abs[
i]) {
unsigned short insn_find(const insn_map *insns, unsigned int max, unsigned int id, unsigned short **cache)
const char * PPC_group_name(csh handle, unsigned int id)
@ PPC_GRP_JUMP
= CS_GRP_JUMP
int name2id(const name_map *map, int max, const char *name)
unsigned int count_positive(const uint16_t *list)
CAPSTONE_EXPORT bool CAPSTONE_API cs_reg_write(csh ud, const cs_insn *insn, unsigned int reg_id)
ppc_reg PPC_map_register(unsigned int r)
bool PPC_alias_insn(const char *name, struct ppc_alias *alias)
bool PPC_abs_branch(cs_struct *h, unsigned int id)
const char * id2name(const name_map *map, int max, const unsigned int id)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
@ PPC_GRP_INVALID
= CS_GRP_INVALID
@ PPC_BC_NS
not summary overflow
const char * PPC_insn_name(csh handle, unsigned int id)
unsigned int count_positive8(const unsigned char *list)
void PPC_get_insn_id(cs_struct *h, cs_insn *insn, unsigned int id)
const char * PPC_reg_name(csh handle, unsigned int reg)
static name_map group_name_maps[]
@ PPC_BC_SO
summary overflow
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:54