1 /* 2 * Copyright 2024 Intel Corporation 3 * SPDX-License-Identifier: MIT 4 */ 5 6 #ifndef BRW_DISASM_H 7 #define BRW_DISASM_H 8 9 #include <stdio.h> 10 #include <stdbool.h> 11 12 #ifdef __cplusplus 13 extern "C" { 14 #endif 15 16 struct brw_isa_info; 17 struct brw_inst; 18 19 const struct brw_label *brw_find_label(const struct brw_label *root, int offset); 20 void brw_create_label(struct brw_label **labels, int offset, void *mem_ctx); 21 int brw_disassemble_inst(FILE *file, const struct brw_isa_info *isa, 22 const struct brw_inst *inst, bool is_compacted, 23 int offset, const struct brw_label *root_label); 24 const struct 25 brw_label *brw_label_assembly(const struct brw_isa_info *isa, 26 const void *assembly, int start, int end, 27 void *mem_ctx); 28 void brw_disassemble_with_labels(const struct brw_isa_info *isa, 29 const void *assembly, int start, int end, FILE *out); 30 void brw_disassemble(const struct brw_isa_info *isa, 31 const void *assembly, int start, int end, 32 const struct brw_label *root_label, FILE *out); 33 int brw_disassemble_find_end(const struct brw_isa_info *isa, 34 const void *assembly, int start); 35 void brw_disassemble_with_errors(const struct brw_isa_info *isa, 36 const void *assembly, int start, FILE *out); 37 38 const char *brw_lsc_op_to_string(unsigned op); 39 const char *brw_lsc_addr_surftype_to_string(unsigned t); 40 const char *brw_lsc_data_size_to_string(unsigned s); 41 42 #ifdef __cplusplus 43 } /* extern "C" */ 44 #endif 45 46 #endif /* BRW_DISASM_H */ 47