remove now redundant insn_reverse_id() after alias handling simplifications
This commit is contained in:
parent
74c41ebb1d
commit
7f6db24a8f
13
utils.c
13
utils.c
|
@ -63,19 +63,6 @@ int name2id(name_map* map, int max, const char *name)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int insn_reverse_id(insn_map *insns, unsigned int max, unsigned int id)
|
|
||||||
{
|
|
||||||
unsigned int i;
|
|
||||||
|
|
||||||
for (i = 0; i < max; i++) {
|
|
||||||
if (id == insns[i].mapid)
|
|
||||||
return insns[i].id;
|
|
||||||
}
|
|
||||||
|
|
||||||
// found nothing
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// count number of positive members in a list.
|
// count number of positive members in a list.
|
||||||
// NOTE: list must be guaranteed to end in 0
|
// NOTE: list must be guaranteed to end in 0
|
||||||
unsigned int count_positive(unsigned char *list)
|
unsigned int count_positive(unsigned char *list)
|
||||||
|
|
4
utils.h
4
utils.h
|
@ -39,10 +39,6 @@ typedef struct name_map {
|
||||||
// return 0 if not found
|
// return 0 if not found
|
||||||
int name2id(name_map* map, int max, const char *name);
|
int name2id(name_map* map, int max, const char *name);
|
||||||
|
|
||||||
// reverse mapid to id
|
|
||||||
// return 0 if not found
|
|
||||||
unsigned int insn_reverse_id(insn_map *insns, unsigned int max, unsigned int id);
|
|
||||||
|
|
||||||
// count number of positive members in a list.
|
// count number of positive members in a list.
|
||||||
// NOTE: list must be guaranteed to end in 0
|
// NOTE: list must be guaranteed to end in 0
|
||||||
unsigned int count_positive(unsigned char *list);
|
unsigned int count_positive(unsigned char *list);
|
||||||
|
|
Loading…
Reference in New Issue