}
insns = (struct brw_instruction *) (gtt + start);
- gen_disasm_disassemble(disasm, insns, 0, 8192, stdout);
+ gen_disasm_disassemble(disasm, insns, 0, stdout);
dump_samplers(spec, descriptors[3] & ~0x1f);
dump_binding_table(spec, descriptors[4] & ~0x1f);
instruction_base, start);
insns = (struct brw_instruction *) (gtt + instruction_base + start);
- gen_disasm_disassemble(disasm, insns, 0, 8192, stdout);
+ gen_disasm_disassemble(disasm, insns, 0, stdout);
}
}
instruction_base, start);
insns = (struct brw_instruction *) (gtt + instruction_base + start);
- gen_disasm_disassemble(disasm, insns, 0, 8192, stdout);
+ gen_disasm_disassemble(disasm, insns, 0, stdout);
}
}
printf(" Kernel[0] %s\n", k0);
if (k0 != unused) {
insns = (struct brw_instruction *) (gtt + start);
- gen_disasm_disassemble(disasm, insns, 0, 8192, stdout);
+ gen_disasm_disassemble(disasm, insns, 0, stdout);
}
start = instruction_base + (p[k1_offset] & mask);
printf(" Kernel[1] %s\n", k1);
if (k1 != unused) {
insns = (struct brw_instruction *) (gtt + start);
- gen_disasm_disassemble(disasm, insns, 0, 8192, stdout);
+ gen_disasm_disassemble(disasm, insns, 0, stdout);
}
start = instruction_base + (p[k2_offset] & mask);
printf(" Kernel[2] %s\n", k2);
if (k2 != unused) {
insns = (struct brw_instruction *) (gtt + start);
- gen_disasm_disassemble(disasm, insns, 0, 8192, stdout);
+ gen_disasm_disassemble(disasm, insns, 0, stdout);
}
}
}
void
-gen_disasm_disassemble(struct gen_disasm *disasm, void *assembly, int start,
- int end, FILE *out)
+gen_disasm_disassemble(struct gen_disasm *disasm, void *assembly,
+ int start, FILE *out)
{
struct gen_device_info *devinfo = &disasm->devinfo;
bool dump_hex = false;
+ int offset = start;
- for (int offset = start; offset < end;) {
+ /* This loop exits when send-with-EOT or when opcode is 0 */
+ while (true) {
brw_inst *insn = assembly + offset;
brw_inst uncompacted;
bool compacted = brw_inst_cmpt_control(devinfo, insn);