Path: blob/21.2-virgl/src/intel/tools/i965_asm.h
4547 views
/*1* Copyright © 2018 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, ARISING FROM,19* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE20* SOFTWARE.21*22*/2324#ifndef __I965_ASM_H__25#define __I965_ASM_H__2627#include <inttypes.h>28#include <stdbool.h>29#include <assert.h>3031#include "compiler/brw_reg.h"32#include "compiler/brw_reg_type.h"33#include "compiler/brw_eu_defines.h"34#include "compiler/brw_inst.h"35#include "compiler/brw_eu.h"36#include "dev/intel_device_info.h"37#include "util/list.h"3839/* glibc < 2.27 defines OVERFLOW in /usr/include/math.h. */40#undef OVERFLOW4142int yyparse(void);43int yylex(void);44char *lex_text(void);4546extern struct brw_codegen *p;47extern int errors;48extern char *input_filename;4950extern struct list_head instr_labels;51extern struct list_head target_labels;5253struct condition {54unsigned cond_modifier:4;55unsigned flag_reg_nr:1;56unsigned flag_subreg_nr:1;57};5859struct predicate {60unsigned pred_control:4;61unsigned pred_inv:1;62unsigned flag_reg_nr:1;63unsigned flag_subreg_nr:1;64};6566struct options {67unsigned access_mode:1;68unsigned compression_control:2;69unsigned thread_control:2;70unsigned no_dd_check:1; // Dependency control71unsigned no_dd_clear:1; // Dependency control72unsigned mask_control:1;73unsigned debug_control:1;74unsigned acc_wr_control:1;75unsigned end_of_thread:1;76unsigned compaction:1;77unsigned qtr_ctrl:2;78unsigned nib_ctrl:1;79unsigned is_compr:1;80};8182enum instr_label_type {83INSTR_LABEL_JIP,84INSTR_LABEL_UIP,85};8687struct instr_label {88struct list_head link;8990char *name;91int offset;92enum instr_label_type type;93};9495struct target_label {96struct list_head link;9798char *name;99int offset;100};101102#endif /* __I965_ASM_H__ */103104105