summaryrefslogtreecommitdiffstats
path: root/src/intel/tools/disasm.c
diff options
context:
space:
mode:
authorSirisha Gandikota <[email protected]>2016-09-13 16:19:31 -0700
committerKenneth Graunke <[email protected]>2016-09-13 16:32:42 -0700
commitaa7b410592700bf6253e8695ea208d0448c1610e (patch)
treebaff521be69c317f3abfda8c7d49e43ef1c61945 /src/intel/tools/disasm.c
parent1ab92d80a8771ac7145d06a9b7983eecc0beaba0 (diff)
aubinator: Remove bogus "end" parameter in gen_disasm_disassemble()
Earlier, the loop pretends to loop over instructions from "start" to "end", but the callers always pass 8192 for end, which is some huge bogus value. The real loop termination condition is send-with-EOT or 0. (Ken) Signed-off-by: Sirisha Gandikota <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/tools/disasm.c')
-rw-r--r--src/intel/tools/disasm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/intel/tools/disasm.c b/src/intel/tools/disasm.c
index 89c711b1d3f..2b51424742d 100644
--- a/src/intel/tools/disasm.c
+++ b/src/intel/tools/disasm.c
@@ -45,13 +45,15 @@ is_send(uint32_t opcode)
}
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);