intel/compiler: Move disassemble functions to own header file
Acked-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27579>
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
#include "compiler/nir/nir.h"
|
||||
#include "compiler/nir/nir_builder.h"
|
||||
#include "intel/compiler/brw_compiler.h"
|
||||
#include "intel/compiler/brw_eu.h"
|
||||
#include "intel/compiler/brw_disasm.h"
|
||||
#include "intel/compiler/brw_nir.h"
|
||||
#include "crocus_context.h"
|
||||
#include "crocus_resource.h"
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "compiler/brw_inst.h"
|
||||
#include "compiler/brw_disasm.h"
|
||||
#include "compiler/brw_eu.h"
|
||||
#include "compiler/brw_isa_info.h"
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
*/
|
||||
|
||||
#include "brw_clip.h"
|
||||
#include "brw_disasm.h"
|
||||
|
||||
#include "dev/intel_debug.h"
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
*/
|
||||
|
||||
#include "brw_compiler.h"
|
||||
#include "brw_disasm.h"
|
||||
#include "brw_eu.h"
|
||||
#include "brw_prim.h"
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
*/
|
||||
|
||||
#include "brw_compiler.h"
|
||||
#include "brw_disasm.h"
|
||||
#include "brw_eu.h"
|
||||
#include "brw_prim.h"
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "brw_disasm.h"
|
||||
#include "brw_eu_defines.h"
|
||||
#include "brw_inst.h"
|
||||
#include "brw_shader.h"
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2024 Intel Corporation
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#ifndef BRW_DISASM_H
|
||||
#define BRW_DISASM_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct brw_isa_info;
|
||||
struct brw_inst;
|
||||
|
||||
const struct brw_label *brw_find_label(const struct brw_label *root, int offset);
|
||||
void brw_create_label(struct brw_label **labels, int offset, void *mem_ctx);
|
||||
int brw_disassemble_inst(FILE *file, const struct brw_isa_info *isa,
|
||||
const struct brw_inst *inst, bool is_compacted,
|
||||
int offset, const struct brw_label *root_label);
|
||||
const struct
|
||||
brw_label *brw_label_assembly(const struct brw_isa_info *isa,
|
||||
const void *assembly, int start, int end,
|
||||
void *mem_ctx);
|
||||
void brw_disassemble_with_labels(const struct brw_isa_info *isa,
|
||||
const void *assembly, int start, int end, FILE *out);
|
||||
void brw_disassemble(const struct brw_isa_info *isa,
|
||||
const void *assembly, int start, int end,
|
||||
const struct brw_label *root_label, FILE *out);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* BRW_DISASM_H */
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#include "brw_cfg.h"
|
||||
#include "brw_eu.h"
|
||||
#include "brw_disasm.h"
|
||||
#include "brw_disasm_info.h"
|
||||
#include "dev/intel_debug.h"
|
||||
#include "compiler/nir/nir.h"
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "brw_disasm.h"
|
||||
#include "brw_eu_defines.h"
|
||||
#include "brw_eu.h"
|
||||
#include "brw_shader.h"
|
||||
|
||||
@@ -179,20 +179,6 @@ void brw_init_codegen(const struct brw_isa_info *isa,
|
||||
struct brw_codegen *p, void *mem_ctx);
|
||||
bool brw_has_jip(const struct intel_device_info *devinfo, enum opcode opcode);
|
||||
bool brw_has_uip(const struct intel_device_info *devinfo, enum opcode opcode);
|
||||
const struct brw_label *brw_find_label(const struct brw_label *root, int offset);
|
||||
void brw_create_label(struct brw_label **labels, int offset, void *mem_ctx);
|
||||
int brw_disassemble_inst(FILE *file, const struct brw_isa_info *isa,
|
||||
const struct brw_inst *inst, bool is_compacted,
|
||||
int offset, const struct brw_label *root_label);
|
||||
const struct
|
||||
brw_label *brw_label_assembly(const struct brw_isa_info *isa,
|
||||
const void *assembly, int start, int end,
|
||||
void *mem_ctx);
|
||||
void brw_disassemble_with_labels(const struct brw_isa_info *isa,
|
||||
const void *assembly, int start, int end, FILE *out);
|
||||
void brw_disassemble(const struct brw_isa_info *isa,
|
||||
const void *assembly, int start, int end,
|
||||
const struct brw_label *root_label, FILE *out);
|
||||
const struct brw_shader_reloc *brw_get_shader_relocs(struct brw_codegen *p,
|
||||
unsigned *num_relocs);
|
||||
const unsigned *brw_get_program( struct brw_codegen *p, unsigned *sz );
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
*/
|
||||
|
||||
#include "brw_eu.h"
|
||||
#include "brw_disasm.h"
|
||||
#include "brw_shader.h"
|
||||
#include "brw_disasm_info.h"
|
||||
#include "dev/intel_debug.h"
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include "util/ralloc.h"
|
||||
#include "brw_disasm.h"
|
||||
#include "brw_eu.h"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
#include <string.h>
|
||||
#include <getopt.h>
|
||||
|
||||
#include "compiler/brw_eu.h"
|
||||
#include "compiler/brw_disasm.h"
|
||||
#include "compiler/brw_isa_info.h"
|
||||
#include "dev/intel_device_info.h"
|
||||
#include "util/u_dynarray.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user