diff options
author | Sirisha Gandikota <[email protected]> | 2016-09-13 16:19:31 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2016-09-13 16:32:42 -0700 |
commit | aa7b410592700bf6253e8695ea208d0448c1610e (patch) | |
tree | baff521be69c317f3abfda8c7d49e43ef1c61945 /src/intel/tools/disasm.c | |
parent | 1ab92d80a8771ac7145d06a9b7983eecc0beaba0 (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.c | 8 |
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); |