const struct gl_program *prog = fp ? &fp->Base : NULL;
- dump_assembly(p->store, annotation.ann_count, annotation.ann,
- brw, prog, brw_disassemble);
+ dump_assembly(p->store, annotation.ann_count, annotation.ann, brw, prog);
ralloc_free(annotation.ann);
}
}
before_size / 16, before_size, after_size,
100.0f * (before_size - after_size) / before_size);
- dump_assembly(p->store, annotation.ann_count, annotation.ann,
- brw, prog, brw_disassemble);
+ dump_assembly(p->store, annotation.ann_count, annotation.ann, brw, prog);
ralloc_free(annotation.ann);
}
}
fprintf(stderr, "SIMD%d shader: %d instructions.\n",
dispatch_width, before_size / 16);
- dump_assembly(store, annotation.ann_count, annotation.ann, brw, prog,
- gen8_disassemble);
+ dump_assembly(store, annotation.ann_count, annotation.ann, brw, prog);
ralloc_free(annotation.ann);
}
}
gen8_set_mask_control(inst, BRW_MASK_DISABLE);
return inst;
}
-
-extern "C" void
-gen8_disassemble(struct brw_context *brw, void *assembly,
- int start, int end, FILE *out)
-{
- bool dump_hex = false;
-
- for (int offset = start; offset < end; offset += 16) {
- gen8_instruction *inst = &((gen8_instruction *)assembly)[offset / 16];
- fprintf(stderr, "0x%08x: ", offset);
-
- if (dump_hex) {
- fprintf(stderr, "0x%08x 0x%08x 0x%08x 0x%08x ",
- ((uint32_t *) inst)[3],
- ((uint32_t *) inst)[2],
- ((uint32_t *) inst)[1],
- ((uint32_t *) inst)[0]);
- }
-
- gen8_disassemble_inst(stderr, inst, brw->gen);
- }
-}
void *mem_ctx;
};
-
-extern "C" void
-gen8_disassemble(struct brw_context *brw, void *assembly,
- int start, int end, FILE *out);
}
fprintf(stderr, "vec4 shader: %d instructions.\n", before_size / 16);
- dump_assembly(store, annotation.ann_count, annotation.ann,
- brw, prog, gen8_disassemble);
+ dump_assembly(store, annotation.ann_count, annotation.ann, brw, prog);
ralloc_free(annotation.ann);
}
}
*/
#include "brw_cfg.h"
+#include "brw_eu.h"
#include "intel_asm_printer.h"
#include "program/prog_print.h"
#include "program/prog_instruction.h"
void
dump_assembly(void *assembly, int num_annotations, struct annotation *annotation,
- struct brw_context *brw, const struct gl_program *prog,
- disassemble_func disassemble)
+ struct brw_context *brw, const struct gl_program *prog)
{
const char *last_annotation_string = NULL;
const void *last_annotation_ir = NULL;
fprintf(stderr, " %s\n", last_annotation_string);
}
- disassemble(brw, assembly, start_offset, end_offset, stderr);
+ brw_disassemble(brw, assembly, start_offset, end_offset, stderr);
if (annotation[i].block_end) {
fprintf(stderr, " END B%d", annotation[i].block_end->block_num);
int cur_block;
};
-typedef void (*disassemble_func)(struct brw_context *brw, void *assembly,
- int start, int end, FILE *out);
-
void
dump_assembly(void *assembly, int num_annotations, struct annotation *annotation,
- struct brw_context *brw, const struct gl_program *prog,
- disassemble_func disassemble);
+ struct brw_context *brw, const struct gl_program *prog);
#ifdef __cplusplus
} /* extern "C" */