• Home
  • Raw
  • Download

Lines Matching refs:inst

69       struct string __msg = func(devinfo, inst, ##args); \
80 inst_is_send(const struct gen_device_info *devinfo, const brw_inst *inst) in inst_is_send() argument
82 switch (brw_inst_opcode(devinfo, inst)) { in inst_is_send()
106 inst_is_raw_move(const struct gen_device_info *devinfo, const brw_inst *inst) in inst_is_raw_move() argument
108 unsigned dst_type = signed_type(brw_inst_dst_type(devinfo, inst)); in inst_is_raw_move()
109 unsigned src_type = signed_type(brw_inst_src0_type(devinfo, inst)); in inst_is_raw_move()
111 if (brw_inst_src0_reg_file(devinfo, inst) == BRW_IMMEDIATE_VALUE) { in inst_is_raw_move()
113 if (brw_inst_src0_type(devinfo, inst) == BRW_REGISTER_TYPE_VF || in inst_is_raw_move()
114 brw_inst_src0_type(devinfo, inst) == BRW_REGISTER_TYPE_UV || in inst_is_raw_move()
115 brw_inst_src0_type(devinfo, inst) == BRW_REGISTER_TYPE_V) { in inst_is_raw_move()
118 } else if (brw_inst_src0_negate(devinfo, inst) || in inst_is_raw_move()
119 brw_inst_src0_abs(devinfo, inst)) { in inst_is_raw_move()
123 return brw_inst_opcode(devinfo, inst) == BRW_OPCODE_MOV && in inst_is_raw_move()
124 brw_inst_saturate(devinfo, inst) == 0 && in inst_is_raw_move()
129 dst_is_null(const struct gen_device_info *devinfo, const brw_inst *inst) in dst_is_null() argument
131 return brw_inst_dst_reg_file(devinfo, inst) == BRW_ARCHITECTURE_REGISTER_FILE && in dst_is_null()
132 brw_inst_dst_da_reg_nr(devinfo, inst) == BRW_ARF_NULL; in dst_is_null()
136 src0_is_null(const struct gen_device_info *devinfo, const brw_inst *inst) in src0_is_null() argument
138 return brw_inst_src0_reg_file(devinfo, inst) == BRW_ARCHITECTURE_REGISTER_FILE && in src0_is_null()
139 brw_inst_src0_da_reg_nr(devinfo, inst) == BRW_ARF_NULL; in src0_is_null()
143 src1_is_null(const struct gen_device_info *devinfo, const brw_inst *inst) in src1_is_null() argument
145 return brw_inst_src1_reg_file(devinfo, inst) == BRW_ARCHITECTURE_REGISTER_FILE && in src1_is_null()
146 brw_inst_src1_da_reg_nr(devinfo, inst) == BRW_ARF_NULL; in src1_is_null()
150 src0_is_grf(const struct gen_device_info *devinfo, const brw_inst *inst) in src0_is_grf() argument
152 return brw_inst_src0_reg_file(devinfo, inst) == BRW_GENERAL_REGISTER_FILE; in src0_is_grf()
156 src0_has_scalar_region(const struct gen_device_info *devinfo, const brw_inst *inst) in src0_has_scalar_region() argument
158 return brw_inst_src0_vstride(devinfo, inst) == BRW_VERTICAL_STRIDE_0 && in src0_has_scalar_region()
159 brw_inst_src0_width(devinfo, inst) == BRW_WIDTH_1 && in src0_has_scalar_region()
160 brw_inst_src0_hstride(devinfo, inst) == BRW_HORIZONTAL_STRIDE_0; in src0_has_scalar_region()
164 src1_has_scalar_region(const struct gen_device_info *devinfo, const brw_inst *inst) in src1_has_scalar_region() argument
166 return brw_inst_src1_vstride(devinfo, inst) == BRW_VERTICAL_STRIDE_0 && in src1_has_scalar_region()
167 brw_inst_src1_width(devinfo, inst) == BRW_WIDTH_1 && in src1_has_scalar_region()
168 brw_inst_src1_hstride(devinfo, inst) == BRW_HORIZONTAL_STRIDE_0; in src1_has_scalar_region()
173 const brw_inst *inst) in num_sources_from_inst() argument
176 brw_opcode_desc(devinfo, brw_inst_opcode(devinfo, inst)); in num_sources_from_inst()
179 if (brw_inst_opcode(devinfo, inst) == BRW_OPCODE_MATH) { in num_sources_from_inst()
180 math_function = brw_inst_math_function(devinfo, inst); in num_sources_from_inst()
182 brw_inst_opcode(devinfo, inst) == BRW_OPCODE_SEND) { in num_sources_from_inst()
183 if (brw_inst_sfid(devinfo, inst) == BRW_SFID_MATH) { in num_sources_from_inst()
228 const brw_inst *inst) in sources_not_null() argument
230 unsigned num_sources = num_sources_from_inst(devinfo, inst); in sources_not_null()
240 ERROR_IF(src0_is_null(devinfo, inst), "src0 is null"); in sources_not_null()
243 ERROR_IF(src1_is_null(devinfo, inst), "src1 is null"); in sources_not_null()
250 const brw_inst *inst) in send_restrictions() argument
254 if (brw_inst_opcode(devinfo, inst) == BRW_OPCODE_SEND) { in send_restrictions()
255 ERROR_IF(brw_inst_src0_address_mode(devinfo, inst) != BRW_ADDRESS_DIRECT, in send_restrictions()
259 ERROR_IF(!src0_is_grf(devinfo, inst), "send from non-GRF"); in send_restrictions()
260 ERROR_IF(brw_inst_eot(devinfo, inst) && in send_restrictions()
261 brw_inst_src0_da_reg_nr(devinfo, inst) < 112, in send_restrictions()
271 const brw_inst *inst) in is_unsupported_inst() argument
273 return brw_opcode_desc(devinfo, brw_inst_opcode(devinfo, inst)) == NULL; in is_unsupported_inst()
311 execution_type(const struct gen_device_info *devinfo, const brw_inst *inst) in execution_type() argument
313 unsigned num_sources = num_sources_from_inst(devinfo, inst); in execution_type()
319 enum brw_reg_type dst_exec_type = brw_inst_dst_type(devinfo, inst); in execution_type()
321 src0_exec_type = execution_type_for_type(brw_inst_src0_type(devinfo, inst)); in execution_type()
330 src1_exec_type = execution_type_for_type(brw_inst_src1_type(devinfo, inst)); in execution_type()
398 const brw_inst *inst) in general_restrictions_based_on_operand_types() argument
401 brw_opcode_desc(devinfo, brw_inst_opcode(devinfo, inst)); in general_restrictions_based_on_operand_types()
402 unsigned num_sources = num_sources_from_inst(devinfo, inst); in general_restrictions_based_on_operand_types()
403 unsigned exec_size = 1 << brw_inst_exec_size(devinfo, inst); in general_restrictions_based_on_operand_types()
409 if (inst_is_send(devinfo, inst)) in general_restrictions_based_on_operand_types()
433 unsigned dst_stride = STRIDE(brw_inst_dst_hstride(devinfo, inst)); in general_restrictions_based_on_operand_types()
434 enum brw_reg_type dst_type = brw_inst_dst_type(devinfo, inst); in general_restrictions_based_on_operand_types()
436 brw_inst_dst_type(devinfo, inst) == BRW_REGISTER_TYPE_B || in general_restrictions_based_on_operand_types()
437 brw_inst_dst_type(devinfo, inst) == BRW_REGISTER_TYPE_UB; in general_restrictions_based_on_operand_types()
441 if (!inst_is_raw_move(devinfo, inst)) { in general_restrictions_based_on_operand_types()
450 unsigned exec_type = execution_type(devinfo, inst); in general_restrictions_based_on_operand_types()
467 unsigned subreg = brw_inst_dst_da1_subreg_nr(devinfo, inst); in general_restrictions_based_on_operand_types()
469 if (brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_1 && in general_restrictions_based_on_operand_types()
470 brw_inst_dst_address_mode(devinfo, inst) == BRW_ADDRESS_DIRECT) { in general_restrictions_based_on_operand_types()
499 const brw_inst *inst) in general_restrictions_on_region_parameters() argument
502 brw_opcode_desc(devinfo, brw_inst_opcode(devinfo, inst)); in general_restrictions_on_region_parameters()
503 unsigned num_sources = num_sources_from_inst(devinfo, inst); in general_restrictions_on_region_parameters()
504 unsigned exec_size = 1 << brw_inst_exec_size(devinfo, inst); in general_restrictions_on_region_parameters()
510 if (brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_16) { in general_restrictions_on_region_parameters()
511 if (desc->ndst != 0 && !dst_is_null(devinfo, inst)) in general_restrictions_on_region_parameters()
512 ERROR_IF(brw_inst_dst_hstride(devinfo, inst) != BRW_HORIZONTAL_STRIDE_1, in general_restrictions_on_region_parameters()
517 ERROR_IF(brw_inst_src0_reg_file(devinfo, inst) != BRW_IMMEDIATE_VALUE && in general_restrictions_on_region_parameters()
518 brw_inst_src0_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_0 && in general_restrictions_on_region_parameters()
519 brw_inst_src0_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_2 && in general_restrictions_on_region_parameters()
520 brw_inst_src0_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_4, in general_restrictions_on_region_parameters()
523 ERROR_IF(brw_inst_src0_reg_file(devinfo, inst) != BRW_IMMEDIATE_VALUE && in general_restrictions_on_region_parameters()
524 brw_inst_src0_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_0 && in general_restrictions_on_region_parameters()
525 brw_inst_src0_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_4, in general_restrictions_on_region_parameters()
532 ERROR_IF(brw_inst_src1_reg_file(devinfo, inst) != BRW_IMMEDIATE_VALUE && in general_restrictions_on_region_parameters()
533 brw_inst_src1_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_0 && in general_restrictions_on_region_parameters()
534 brw_inst_src1_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_2 && in general_restrictions_on_region_parameters()
535 brw_inst_src1_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_4, in general_restrictions_on_region_parameters()
538 ERROR_IF(brw_inst_src1_reg_file(devinfo, inst) != BRW_IMMEDIATE_VALUE && in general_restrictions_on_region_parameters()
539 brw_inst_src1_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_0 && in general_restrictions_on_region_parameters()
540 brw_inst_src1_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_4, in general_restrictions_on_region_parameters()
553 if (brw_inst_src ## n ## _reg_file(devinfo, inst) == \ in general_restrictions_on_region_parameters()
557 vstride = STRIDE(brw_inst_src ## n ## _vstride(devinfo, inst)); \ in general_restrictions_on_region_parameters()
558 width = WIDTH(brw_inst_src ## n ## _width(devinfo, inst)); \ in general_restrictions_on_region_parameters()
559 hstride = STRIDE(brw_inst_src ## n ## _hstride(devinfo, inst)); \ in general_restrictions_on_region_parameters()
560 type = brw_inst_src ## n ## _type(devinfo, inst); \ in general_restrictions_on_region_parameters()
562 subreg = brw_inst_src ## n ## _da1_subreg_nr(devinfo, inst) in general_restrictions_on_region_parameters()
642 if (desc->ndst != 0 && !dst_is_null(devinfo, inst)) { in general_restrictions_on_region_parameters()
643 ERROR_IF(brw_inst_dst_hstride(devinfo, inst) == BRW_HORIZONTAL_STRIDE_0, in general_restrictions_on_region_parameters()
716 const brw_inst *inst) in region_alignment_rules() argument
719 brw_opcode_desc(devinfo, brw_inst_opcode(devinfo, inst)); in region_alignment_rules()
720 unsigned num_sources = num_sources_from_inst(devinfo, inst); in region_alignment_rules()
721 unsigned exec_size = 1 << brw_inst_exec_size(devinfo, inst); in region_alignment_rules()
728 if (brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_16) in region_alignment_rules()
731 if (inst_is_send(devinfo, inst)) in region_alignment_rules()
747 if (brw_inst_src ## n ## _address_mode(devinfo, inst) != \ in region_alignment_rules()
751 if (brw_inst_src ## n ## _reg_file(devinfo, inst) == \ in region_alignment_rules()
755 vstride = STRIDE(brw_inst_src ## n ## _vstride(devinfo, inst)); \ in region_alignment_rules()
756 width = WIDTH(brw_inst_src ## n ## _width(devinfo, inst)); \ in region_alignment_rules()
757 hstride = STRIDE(brw_inst_src ## n ## _hstride(devinfo, inst)); \ in region_alignment_rules()
758 type = brw_inst_src ## n ## _type(devinfo, inst); \ in region_alignment_rules()
760 subreg = brw_inst_src ## n ## _da1_subreg_nr(devinfo, inst); \ in region_alignment_rules()
782 if (desc->ndst == 0 || dst_is_null(devinfo, inst)) in region_alignment_rules()
785 unsigned stride = STRIDE(brw_inst_dst_hstride(devinfo, inst)); in region_alignment_rules()
786 enum brw_reg_type dst_type = brw_inst_dst_type(devinfo, inst); in region_alignment_rules()
788 unsigned subreg = brw_inst_dst_da1_subreg_nr(devinfo, inst); in region_alignment_rules()
872 brw_inst_opcode(devinfo, inst) == BRW_OPCODE_MATH) { in region_alignment_rules()
943 brw_inst_src ## n ## _da1_subreg_nr(devinfo, inst); \ in region_alignment_rules()
993 enum brw_reg_type dst_type = brw_inst_dst_type(devinfo, inst); in region_alignment_rules()
1001 vstride = STRIDE(brw_inst_src ## n ## _vstride(devinfo, inst)); \ in region_alignment_rules()
1002 width = WIDTH(brw_inst_src ## n ## _width(devinfo, inst)); \ in region_alignment_rules()
1003 hstride = STRIDE(brw_inst_src ## n ## _hstride(devinfo, inst)); \ in region_alignment_rules()
1006 (brw_inst_src ## n ## _type(devinfo, inst) == BRW_REGISTER_TYPE_W || \ in region_alignment_rules()
1007 brw_inst_src ## n ## _type(devinfo, inst) == BRW_REGISTER_TYPE_UW); \ in region_alignment_rules()
1010 !src ## n ## _has_scalar_region(devinfo, inst) && \ in region_alignment_rules()
1030 const brw_inst *inst) in vector_immediate_restrictions() argument
1032 unsigned num_sources = num_sources_from_inst(devinfo, inst); in vector_immediate_restrictions()
1039 brw_inst_src0_reg_file(devinfo, inst) : in vector_immediate_restrictions()
1040 brw_inst_src1_reg_file(devinfo, inst); in vector_immediate_restrictions()
1044 enum brw_reg_type dst_type = brw_inst_dst_type(devinfo, inst); in vector_immediate_restrictions()
1046 unsigned dst_subreg = brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_1 ? in vector_immediate_restrictions()
1047 brw_inst_dst_da1_subreg_nr(devinfo, inst) : 0; in vector_immediate_restrictions()
1048 unsigned dst_stride = STRIDE(brw_inst_dst_hstride(devinfo, inst)); in vector_immediate_restrictions()
1050 brw_inst_src0_type(devinfo, inst) : in vector_immediate_restrictions()
1051 brw_inst_src1_type(devinfo, inst); in vector_immediate_restrictions()
1092 const brw_inst *inst) in special_requirements_for_handling_double_precision_data_types() argument
1094 unsigned num_sources = num_sources_from_inst(devinfo, inst); in special_requirements_for_handling_double_precision_data_types()
1100 enum brw_reg_type exec_type = execution_type(devinfo, inst); in special_requirements_for_handling_double_precision_data_types()
1103 enum brw_reg_file dst_file = brw_inst_dst_reg_file(devinfo, inst); in special_requirements_for_handling_double_precision_data_types()
1104 enum brw_reg_type dst_type = brw_inst_dst_type(devinfo, inst); in special_requirements_for_handling_double_precision_data_types()
1106 unsigned dst_hstride = STRIDE(brw_inst_dst_hstride(devinfo, inst)); in special_requirements_for_handling_double_precision_data_types()
1107 unsigned dst_reg = brw_inst_dst_da_reg_nr(devinfo, inst); in special_requirements_for_handling_double_precision_data_types()
1108 unsigned dst_subreg = brw_inst_dst_da1_subreg_nr(devinfo, inst); in special_requirements_for_handling_double_precision_data_types()
1109 unsigned dst_address_mode = brw_inst_dst_address_mode(devinfo, inst); in special_requirements_for_handling_double_precision_data_types()
1113 brw_inst_opcode(devinfo, inst) == BRW_OPCODE_MUL && in special_requirements_for_handling_double_precision_data_types()
1114 (brw_inst_src0_type(devinfo, inst) == BRW_REGISTER_TYPE_D || in special_requirements_for_handling_double_precision_data_types()
1115 brw_inst_src0_type(devinfo, inst) == BRW_REGISTER_TYPE_UD) && in special_requirements_for_handling_double_precision_data_types()
1116 (brw_inst_src1_type(devinfo, inst) == BRW_REGISTER_TYPE_D || in special_requirements_for_handling_double_precision_data_types()
1117 brw_inst_src1_type(devinfo, inst) == BRW_REGISTER_TYPE_UD); in special_requirements_for_handling_double_precision_data_types()
1129 if (brw_inst_src ## n ## _reg_file(devinfo, inst) == \ in special_requirements_for_handling_double_precision_data_types()
1133 is_scalar_region = src ## n ## _has_scalar_region(devinfo, inst); \ in special_requirements_for_handling_double_precision_data_types()
1134 vstride = STRIDE(brw_inst_src ## n ## _vstride(devinfo, inst)); \ in special_requirements_for_handling_double_precision_data_types()
1135 width = WIDTH(brw_inst_src ## n ## _width(devinfo, inst)); \ in special_requirements_for_handling_double_precision_data_types()
1136 hstride = STRIDE(brw_inst_src ## n ## _hstride(devinfo, inst)); \ in special_requirements_for_handling_double_precision_data_types()
1137 file = brw_inst_src ## n ## _reg_file(devinfo, inst); \ in special_requirements_for_handling_double_precision_data_types()
1138 type = brw_inst_src ## n ## _type(devinfo, inst); \ in special_requirements_for_handling_double_precision_data_types()
1140 reg = brw_inst_src ## n ## _da_reg_nr(devinfo, inst); \ in special_requirements_for_handling_double_precision_data_types()
1141 subreg = brw_inst_src ## n ## _da1_subreg_nr(devinfo, inst); \ in special_requirements_for_handling_double_precision_data_types()
1142 address_mode = brw_inst_src ## n ## _address_mode(devinfo, inst) in special_requirements_for_handling_double_precision_data_types()
1164 if (brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_1 && in special_requirements_for_handling_double_precision_data_types()
1209 ERROR_IF(brw_inst_opcode(devinfo, inst) == BRW_OPCODE_MAC || in special_requirements_for_handling_double_precision_data_types()
1210 brw_inst_acc_wr_control(devinfo, inst) || in special_requirements_for_handling_double_precision_data_types()
1228 enum brw_reg_type src0_type = brw_inst_src0_type(devinfo, inst); in special_requirements_for_handling_double_precision_data_types()
1230 num_sources > 1 ? brw_inst_src1_type(devinfo, inst) : src0_type; in special_requirements_for_handling_double_precision_data_types()
1234 ERROR_IF(brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_16 && in special_requirements_for_handling_double_precision_data_types()
1237 brw_inst_exec_size(devinfo, inst) > BRW_EXECUTE_2, in special_requirements_for_handling_double_precision_data_types()
1250 ERROR_IF(brw_inst_no_dd_check(devinfo, inst) || in special_requirements_for_handling_double_precision_data_types()
1251 brw_inst_no_dd_clear(devinfo, inst), in special_requirements_for_handling_double_precision_data_types()
1267 const brw_inst *inst = assembly + src_offset; in brw_validate_instructions() local
1268 bool is_compact = brw_inst_cmpt_control(devinfo, inst); in brw_validate_instructions()
1272 brw_compact_inst *compacted = (void *)inst; in brw_validate_instructions()
1274 inst = &uncompacted; in brw_validate_instructions()
1277 if (is_unsupported_inst(devinfo, inst)) { in brw_validate_instructions()