4 #ifdef CAPSTONE_HAS_SPARC
9 #include "../../utils.h"
13 #define GET_INSTRINFO_ENUM
17 static const name_map reg_name_maps[] = {
114 #ifndef CAPSTONE_DIET
118 return reg_name_maps[
reg].
name;
128 #ifndef CAPSTONE_DIET
129 { 0 }, { 0 }, { 0 }, 0, 0
136 static struct hint_map {
139 }
const insn_hints[] = {
167 insn->id =
insns[
i].mapid;
170 #ifndef CAPSTONE_DIET
182 insn->detail->groups[insn->detail->groups_count] =
SPARC_GRP_JUMP;
183 insn->detail->groups_count++;
188 if (
id == insn_hints[
i].
id) {
189 insn->detail->sparc.hint = insn_hints[
i].hints;
197 static const name_map insn_name_maps[] = {
482 #ifndef CAPSTONE_DIET
484 static const name_map alias_insn_names[] = {
491 #ifndef CAPSTONE_DIET
499 if (alias_insn_names[
i].
id ==
id)
500 return alias_insn_names[
i].
name;
503 return insn_name_maps[
id].
name;
509 #ifndef CAPSTONE_DIET
528 #ifndef CAPSTONE_DIET
538 static const unsigned int map[] = { 0,
585 static const name_map alias_icc_maps[] = {
604 static const name_map alias_fcc_maps[] = {
642 static const name_map hint_maps[] = {
654 l2 = strlen(hint_maps[
i].
name);
657 if (!strcmp(hint_maps[
i].
name,
name + (l1 - l2)))
658 return hint_maps[
i].
id;
static name_map group_name_maps[]
sparc_reg Sparc_map_insn(const char *name)
sparc_hint Sparc_map_hint(const char *name)
const char * Sparc_group_name(csh handle, unsigned int id)
const char * Sparc_reg_name(csh handle, unsigned int reg)
sparc_cc Sparc_map_FCC(const char *name)
const char * Sparc_insn_name(csh handle, unsigned int id)
void Sparc_get_insn_id(cs_struct *h, cs_insn *insn, unsigned int id)
sparc_cc Sparc_map_ICC(const char *name)
sparc_reg Sparc_map_register(unsigned int r)
static mcore_handle handle
size_t map(int syms, int left, int len)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
@ SPARC_HINT_A
annul delay slot instruction
@ SPARC_HINT_PN
branch NOT taken
@ SPARC_HINT_INVALID
no hint
@ SPARC_HINT_PT
branch taken
sparc_reg
SPARC registers.
sparc_cc
Enums corresponding to Sparc condition codes, both icc's and fcc's.
@ SPARC_CC_ICC_NE
Not Equal.
@ SPARC_CC_ICC_LE
Less or Equal.
@ SPARC_CC_FCC_NE
Not Equal.
@ SPARC_CC_ICC_GE
Greater or Equal.
@ SPARC_CC_INVALID
invalid CC (default)
@ SPARC_CC_FCC_UE
Unordered or Equal.
@ SPARC_CC_ICC_CC
Carry Clear/Great or Equal Unsigned.
@ SPARC_CC_ICC_POS
Positive.
@ SPARC_CC_FCC_GE
Greater or Equal.
@ SPARC_CC_FCC_U
Unordered.
@ SPARC_CC_FCC_UG
Unordered or Greater.
@ SPARC_CC_FCC_LG
Less or Greater.
@ SPARC_CC_FCC_ULE
Unordered or Less or Equal.
@ SPARC_CC_FCC_UGE
Unordered or Greater or Equal.
@ SPARC_CC_ICC_CS
Carry Set/Less Unsigned.
@ SPARC_CC_ICC_NEG
Negative.
@ SPARC_CC_FCC_LE
Less or Equal.
@ SPARC_CC_FCC_UL
Unordered or Less.
@ SPARC_CC_ICC_VS
Overflow Set.
@ SPARC_CC_ICC_VC
Overflow Clear.
@ SPARC_CC_ICC_LEU
Less or Equal Unsigned.
@ SPARC_CC_ICC_GU
Greater Unsigned.
@ SPARC_GRP_INVALID
= CS_GRP_INVALID
@ SPARC_GRP_JUMP
= CS_GRP_JUMP
int name2id(const name_map *map, int max, const char *name)
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]