34 int main(
int argc,
char *argv[])
39 memset(names, 0,
sizeof(names));
41 while (!feof(stdin)) {
44 fgets(tmps,
sizeof(tmps), stdin);
47 for (i=0; i<
strlen(tmps); i++) {
48 if (tmps[i] >=
'A' && tmps[i] <=
'Z')
50 if (tmps[i] ==
' ' || tmps[i] ==
'\t') {
52 while (tmps[i]==
' ' || tmps[i]==
'\t')
54 n = strtol(tmps + i, NULL, 0);
56 names[n] = strdup(tmps);
62 printf(
"/*\n * AUTOMATICALLY GENERATED from ppc_spr.h! Do " 63 "not edit.\n */\n\nstatic const char *ppc_spr_names[1024] = {\n");
65 for (i=0; i<1024; i++)
66 printf(
" \"%s\"%s%s", names[i]? names[i] :
"(unknown)",
68 (i & 3) == 3?
"\n" :
"");
int main(int argc, char *argv[])
void COMBINE() strlen(struct cpu *cpu, struct arm_instr_call *ic, int low_addr)