Lines Matching refs:desc

152 static void read_instructions(struct gen_opcode *desc)  in read_instructions()  argument
167 desc->nr++; in read_instructions()
168 desc->insn = realloc(desc->insn, desc->nr * sizeof(*desc->insn)); in read_instructions()
169 if (!desc->insn) in read_instructions()
171 desc->insn[desc->nr - 1] = insn; in read_instructions()
180 static void print_formats(struct gen_opcode *desc) in print_formats() argument
185 qsort(desc->insn, desc->nr, sizeof(*desc->insn), cmpformat); in print_formats()
189 for (i = 0; i < desc->nr; i++) { in print_formats()
190 if (!strcmp(format, desc->insn[i].format)) in print_formats()
193 format = desc->insn[i].format; in print_formats()
204 static void print_long_insn(struct gen_opcode *desc) in print_long_insn() argument
209 qsort(desc->insn, desc->nr, sizeof(*desc->insn), cmp_long_insn); in print_long_insn()
212 for (i = 0; i < desc->nr; i++) { in print_long_insn()
213 insn = &desc->insn[i]; in print_long_insn()
222 for (i = 0; i < desc->nr; i++) { in print_long_insn()
223 insn = &desc->insn[i]; in print_long_insn()
246 static void add_to_group(struct gen_opcode *desc, struct insn *insn, int offset) in add_to_group() argument
250 group = desc->group ? &desc->group[desc->nr_groups - 1] : NULL; in add_to_group()
255 desc->nr_groups++; in add_to_group()
256 desc->group = realloc(desc->group, desc->nr_groups * sizeof(*desc->group)); in add_to_group()
257 if (!desc->group) in add_to_group()
259 group = &desc->group[desc->nr_groups - 1]; in add_to_group()
271 static void print_opcode_table(struct gen_opcode *desc) in print_opcode_table() argument
277 qsort(desc->insn, desc->nr, sizeof(*desc->insn), cmpopcode); in print_opcode_table()
280 for (i = 0; i < desc->nr; i++) { in print_opcode_table()
281 insn = &desc->insn[i]; in print_opcode_table()
284 add_to_group(desc, insn, offset); in print_opcode_table()
293 for (i = 0; i < desc->nr; i++) { in print_opcode_table()
294 insn = &desc->insn[i]; in print_opcode_table()
297 add_to_group(desc, insn, offset); in print_opcode_table()
304 static void print_opcode_table_offsets(struct gen_opcode *desc) in print_opcode_table_offsets() argument
310 for (i = 0; i < desc->nr_groups; i++) { in print_opcode_table_offsets()
311 group = &desc->group[i]; in print_opcode_table_offsets()
321 struct gen_opcode *desc = &_desc; in main() local
323 read_instructions(desc); in main()
331 print_formats(desc); in main()
332 print_long_insn(desc); in main()
333 print_opcode_table(desc); in main()
334 print_opcode_table_offsets(desc); in main()