Path: blob/21.2-virgl/src/intel/compiler/brw_disasm_info.h
4550 views
/*1* Copyright © 2014 Intel Corporation2*3* Permission is hereby granted, free of charge, to any person obtaining a4* copy of this software and associated documentation files (the "Software"),5* to deal in the Software without restriction, including without limitation6* the rights to use, copy, modify, merge, publish, distribute, sublicense,7* and/or sell copies of the Software, and to permit persons to whom the8* Software is furnished to do so, subject to the following conditions:9*10* The above copyright notice and this permission notice (including the next11* paragraph) shall be included in all copies or substantial portions of the12* Software.13*14* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR15* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,16* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL17* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER18* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING19* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS20* IN THE SOFTWARE.21*/2223#ifndef _INTEL_ASM_ANNOTATION_H24#define _INTEL_ASM_ANNOTATION_H2526#include "compiler/glsl/list.h"2728#ifdef __cplusplus29extern "C" {30#endif3132struct cfg_t;33struct backend_instruction;34struct intel_device_info;3536struct inst_group {37struct exec_node link;3839int offset;4041size_t error_length;42char *error;4344/* Pointers to the basic block in the CFG if the instruction group starts45* or ends a basic block.46*/47struct bblock_t *block_start;48struct bblock_t *block_end;4950/* Annotation for the generated IR. One of the two can be set. */51const void *ir;52const char *annotation;53};5455struct disasm_info {56struct exec_list group_list;5758const struct intel_device_info *devinfo;59const struct cfg_t *cfg;6061/** Block index in the cfg. */62int cur_block;63bool use_tail;64};6566void67dump_assembly(void *assembly, int start_offset, int end_offset,68struct disasm_info *disasm, const unsigned *block_latency);6970struct disasm_info *71disasm_initialize(const struct intel_device_info *devinfo,72const struct cfg_t *cfg);7374struct inst_group *75disasm_new_inst_group(struct disasm_info *disasm, unsigned offset);7677void78disasm_annotate(struct disasm_info *disasm,79struct backend_instruction *inst, unsigned offset);8081void82disasm_insert_error(struct disasm_info *disasm, unsigned offset,83const char *error);8485#ifdef __cplusplus86} /* extern "C" */87#endif8889#endif /* _INTEL_ASM_ANNOTATION_H */909192