}
if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
- disassemble(stderr, last_native_inst_offset, next_inst_offset);
+ gen8_dump_compile(brw, store, last_native_inst_offset, next_inst_offset, stderr);
foreach_list(node, &cfg->block_list) {
bblock_link *link = (bblock_link *)node;
* case you're doing that.
*/
if (0 && unlikely(INTEL_DEBUG & DEBUG_WM)) {
- disassemble(stderr, 0, next_inst_offset);
+ gen8_dump_compile(brw, store, 0, next_inst_offset, stderr);
}
}
return inst;
}
-void
-gen8_generator::disassemble(FILE *out, int start, int end)
+extern "C" void
+gen8_dump_compile(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 = &store[offset / 16];
+ gen8_instruction *inst = &((gen8_instruction *)assembly)[offset / 16];
fprintf(stderr, "0x%08x: ", offset);
if (dump_hex) {
gen8_instruction *NOP();
/** @} */
- void disassemble(FILE *out, int start, int end);
-
protected:
gen8_instruction *alu3(unsigned opcode,
struct brw_reg dst,
void *mem_ctx;
};
+
+extern "C" void
+gen8_dump_compile(struct brw_context *brw, void *assembly,
+ int start,int end, FILE *out);
}
if (unlikely(debug_flag)) {
- disassemble(stderr, last_native_inst_offset, next_inst_offset);
+ gen8_dump_compile(brw, store, last_native_inst_offset, next_inst_offset, stderr);
}
last_native_inst_offset = next_inst_offset;
* case you're doing that.
*/
if (0 && unlikely(debug_flag)) {
- disassemble(stderr, 0, next_inst_offset);
+ gen8_dump_compile(brw, store, 0, next_inst_offset, stderr);
}
}