diff options
author | Kenneth Graunke <[email protected]> | 2018-07-11 10:30:12 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2018-07-24 11:04:56 -0700 |
commit | 9b3474249513267bb4e50d450c70e688bffbc082 (patch) | |
tree | 79d44d26f40f8129fd2871c4d08a0623aa88eaa4 /src/intel/common/gen_disasm.c | |
parent | 3647b16675f98577e19674ff25a9136ad3af8f73 (diff) |
intel: Make the disassembler take a const pointer to the assembly.
Disassembling doesn't modify the assembly.
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/common/gen_disasm.c')
-rw-r--r-- | src/intel/common/gen_disasm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/intel/common/gen_disasm.c b/src/intel/common/gen_disasm.c index 1de20f576d4..4f835c19883 100644 --- a/src/intel/common/gen_disasm.c +++ b/src/intel/common/gen_disasm.c @@ -44,14 +44,15 @@ is_send(uint32_t opcode) } static int -gen_disasm_find_end(struct gen_disasm *disasm, void *assembly, int start) +gen_disasm_find_end(struct gen_disasm *disasm, + const void *assembly, int start) { struct gen_device_info *devinfo = &disasm->devinfo; int offset = start; /* This loop exits when send-with-EOT or when opcode is 0 */ while (true) { - brw_inst *insn = assembly + offset; + const brw_inst *insn = assembly + offset; if (brw_inst_cmpt_control(devinfo, insn)) { offset += 8; @@ -70,7 +71,7 @@ gen_disasm_find_end(struct gen_disasm *disasm, void *assembly, int start) } void -gen_disasm_disassemble(struct gen_disasm *disasm, void *assembly, +gen_disasm_disassemble(struct gen_disasm *disasm, const void *assembly, int start, FILE *out) { struct gen_device_info *devinfo = &disasm->devinfo; |