X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;ds=inline;f=src%2Fintel%2Fcompiler%2Fbrw_eu.c;h=87a6145ac2943bfb420e485759d5ee284c57d9cb;hb=f0d52cf2b0ae1db156e4f1e34982c2a388fcfe58;hp=d0e4ea2070426e66f8e63b34fd41374cb4471d1a;hpb=6a9525bf6729a8d2bb9c6a7b10ebdc9925c55463;p=mesa.git diff --git a/src/intel/compiler/brw_eu.c b/src/intel/compiler/brw_eu.c index d0e4ea20704..87a6145ac29 100644 --- a/src/intel/compiler/brw_eu.c +++ b/src/intel/compiler/brw_eu.c @@ -33,7 +33,7 @@ #include "brw_eu_defines.h" #include "brw_eu.h" #include "brw_shader.h" -#include "common/gen_debug.h" +#include "dev/gen_debug.h" #include "util/ralloc.h" @@ -289,7 +289,7 @@ void brw_set_default_acc_write_control(struct brw_codegen *p, unsigned value) void brw_push_insn_state( struct brw_codegen *p ) { assert(p->current != &p->stack[BRW_EU_MAX_INSN_STACK-1]); - memcpy(p->current + 1, p->current, sizeof(brw_inst)); + *(p->current + 1) = *p->current; p->current++; } @@ -364,24 +364,37 @@ brw_disassemble(const struct gen_device_info *devinfo, if (compacted) { brw_compact_inst *compacted = (void *)insn; - if (dump_hex) { - fprintf(out, "0x%08x 0x%08x ", - ((uint32_t *)insn)[1], - ((uint32_t *)insn)[0]); - } - - brw_uncompact_instruction(devinfo, &uncompacted, compacted); - insn = &uncompacted; - offset += 8; + if (dump_hex) { + unsigned char * insn_ptr = ((unsigned char *)&insn[0]); + const unsigned int blank_spaces = 24; + for (int i = 0 ; i < 8; i = i + 4) { + fprintf(out, "%02x %02x %02x %02x ", + insn_ptr[i], + insn_ptr[i + 1], + insn_ptr[i + 2], + insn_ptr[i + 3]); + } + /* Make compacted instructions hex value output vertically aligned + * with uncompacted instructions hex value + */ + fprintf(out, "%*c", blank_spaces, ' '); + } + + brw_uncompact_instruction(devinfo, &uncompacted, compacted); + insn = &uncompacted; + offset += 8; } else { - if (dump_hex) { - fprintf(out, "0x%08x 0x%08x 0x%08x 0x%08x ", - ((uint32_t *)insn)[3], - ((uint32_t *)insn)[2], - ((uint32_t *)insn)[1], - ((uint32_t *)insn)[0]); - } - offset += 16; + if (dump_hex) { + unsigned char * insn_ptr = ((unsigned char *)&insn[0]); + for (int i = 0 ; i < 16; i = i + 4) { + fprintf(out, "%02x %02x %02x %02x ", + insn_ptr[i], + insn_ptr[i + 1], + insn_ptr[i + 2], + insn_ptr[i + 3]); + } + } + offset += 16; } brw_disassemble_inst(out, devinfo, insn, compacted);