summaryrefslogtreecommitdiff
path: root/assembler/main.c
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2013-01-21 15:10:01 +0000
committerDamien Lespiau <damien.lespiau@intel.com>2013-03-04 15:54:38 +0000
commit5e5861183df1326f74f66886c3f580d43d470d60 (patch)
tree8045df5f3c519238fd672b7b34692aba00c10e5b /assembler/main.c
parentc716e2bdb43023cffb652582aeb21c9af228931e (diff)
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 <damien.lespiau@intel.com>
Diffstat (limited to 'assembler/main.c')
-rw-r--r--assembler/main.c44
1 files changed, 22 insertions, 22 deletions
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);