From 5e5861183df1326f74f66886c3f580d43d470d60 Mon Sep 17 00:00:00 2001 From: Damien Lespiau Date: Mon, 21 Jan 2013 15:10:01 +0000 Subject: assembler: Make print_instruction() take an instruction No need to use a brw_program_instruction there as a brw_instruction is what you really dump anyway, espcially when the plan is to use brw_compile from Mesa sooner rather than later. Signed-off-by: Damien Lespiau --- assembler/main.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'assembler/main.c') diff --git a/assembler/main.c b/assembler/main.c index 1b411c73..28daf3e2 100644 --- a/assembler/main.c +++ b/assembler/main.c @@ -239,35 +239,35 @@ static void free_entry_point_table(struct entry_point_item *p) { } static void -print_instruction(FILE *output, struct brw_program_instruction *entry) +print_instruction(FILE *output, struct brw_instruction *instruction) { if (binary_like_output) { fprintf(output, "\t0x%02x, 0x%02x, 0x%02x, 0x%02x, " "0x%02x, 0x%02x, 0x%02x, 0x%02x,\n" "\t0x%02x, 0x%02x, 0x%02x, 0x%02x, " "0x%02x, 0x%02x, 0x%02x, 0x%02x,\n", - ((unsigned char *)(&entry->instruction))[0], - ((unsigned char *)(&entry->instruction))[1], - ((unsigned char *)(&entry->instruction))[2], - ((unsigned char *)(&entry->instruction))[3], - ((unsigned char *)(&entry->instruction))[4], - ((unsigned char *)(&entry->instruction))[5], - ((unsigned char *)(&entry->instruction))[6], - ((unsigned char *)(&entry->instruction))[7], - ((unsigned char *)(&entry->instruction))[8], - ((unsigned char *)(&entry->instruction))[9], - ((unsigned char *)(&entry->instruction))[10], - ((unsigned char *)(&entry->instruction))[11], - ((unsigned char *)(&entry->instruction))[12], - ((unsigned char *)(&entry->instruction))[13], - ((unsigned char *)(&entry->instruction))[14], - ((unsigned char *)(&entry->instruction))[15]); + ((unsigned char *)instruction)[0], + ((unsigned char *)instruction)[1], + ((unsigned char *)instruction)[2], + ((unsigned char *)instruction)[3], + ((unsigned char *)instruction)[4], + ((unsigned char *)instruction)[5], + ((unsigned char *)instruction)[6], + ((unsigned char *)instruction)[7], + ((unsigned char *)instruction)[8], + ((unsigned char *)instruction)[9], + ((unsigned char *)instruction)[10], + ((unsigned char *)instruction)[11], + ((unsigned char *)instruction)[12], + ((unsigned char *)instruction)[13], + ((unsigned char *)instruction)[14], + ((unsigned char *)instruction)[15]); } else { fprintf(output, " { 0x%08x, 0x%08x, 0x%08x, 0x%08x },\n", - ((int *)(&entry->instruction))[0], - ((int *)(&entry->instruction))[1], - ((int *)(&entry->instruction))[2], - ((int *)(&entry->instruction))[3]); + ((int *)instruction)[0], + ((int *)instruction)[1], + ((int *)instruction)[2], + ((int *)instruction)[3]); } } int main(int argc, char **argv) @@ -470,7 +470,7 @@ int main(int argc, char **argv) entry = entry1) { entry1 = entry->next; if (!entry->islabel) - print_instruction(output, entry); + print_instruction(output, &entry->instruction); else free(entry->string); free(entry); -- cgit v1.2.3