Lines Matching refs:inst

82       struct string __msg = func(devinfo, inst, ##args); \
93 inst_is_send(const struct intel_device_info *devinfo, const brw_inst *inst) in inst_is_send() argument
95 switch (brw_inst_opcode(devinfo, inst)) { in inst_is_send()
108 const brw_inst *inst) in inst_is_split_send() argument
111 return inst_is_send(devinfo, inst); in inst_is_split_send()
113 switch (brw_inst_opcode(devinfo, inst)) { in inst_is_split_send()
136 inst_dst_type(const struct intel_device_info *devinfo, const brw_inst *inst) in inst_dst_type() argument
138 return (devinfo->ver < 12 || !inst_is_send(devinfo, inst)) ? in inst_dst_type()
139 brw_inst_dst_type(devinfo, inst) : BRW_REGISTER_TYPE_D; in inst_dst_type()
143 inst_is_raw_move(const struct intel_device_info *devinfo, const brw_inst *inst) in inst_is_raw_move() argument
145 unsigned dst_type = signed_type(inst_dst_type(devinfo, inst)); in inst_is_raw_move()
146 unsigned src_type = signed_type(brw_inst_src0_type(devinfo, inst)); in inst_is_raw_move()
148 if (brw_inst_src0_reg_file(devinfo, inst) == BRW_IMMEDIATE_VALUE) { in inst_is_raw_move()
150 if (brw_inst_src0_type(devinfo, inst) == BRW_REGISTER_TYPE_VF || in inst_is_raw_move()
151 brw_inst_src0_type(devinfo, inst) == BRW_REGISTER_TYPE_UV || in inst_is_raw_move()
152 brw_inst_src0_type(devinfo, inst) == BRW_REGISTER_TYPE_V) { in inst_is_raw_move()
155 } else if (brw_inst_src0_negate(devinfo, inst) || in inst_is_raw_move()
156 brw_inst_src0_abs(devinfo, inst)) { in inst_is_raw_move()
160 return brw_inst_opcode(devinfo, inst) == BRW_OPCODE_MOV && in inst_is_raw_move()
161 brw_inst_saturate(devinfo, inst) == 0 && in inst_is_raw_move()
166 dst_is_null(const struct intel_device_info *devinfo, const brw_inst *inst) in dst_is_null() argument
168 return brw_inst_dst_reg_file(devinfo, inst) == BRW_ARCHITECTURE_REGISTER_FILE && in dst_is_null()
169 brw_inst_dst_da_reg_nr(devinfo, inst) == BRW_ARF_NULL; in dst_is_null()
173 src0_is_null(const struct intel_device_info *devinfo, const brw_inst *inst) in src0_is_null() argument
175 return brw_inst_src0_address_mode(devinfo, inst) == BRW_ADDRESS_DIRECT && in src0_is_null()
176 brw_inst_src0_reg_file(devinfo, inst) == BRW_ARCHITECTURE_REGISTER_FILE && in src0_is_null()
177 brw_inst_src0_da_reg_nr(devinfo, inst) == BRW_ARF_NULL; in src0_is_null()
181 src1_is_null(const struct intel_device_info *devinfo, const brw_inst *inst) in src1_is_null() argument
183 return brw_inst_src1_reg_file(devinfo, inst) == BRW_ARCHITECTURE_REGISTER_FILE && in src1_is_null()
184 brw_inst_src1_da_reg_nr(devinfo, inst) == BRW_ARF_NULL; in src1_is_null()
188 src0_is_acc(const struct intel_device_info *devinfo, const brw_inst *inst) in src0_is_acc() argument
190 return brw_inst_src0_reg_file(devinfo, inst) == BRW_ARCHITECTURE_REGISTER_FILE && in src0_is_acc()
191 (brw_inst_src0_da_reg_nr(devinfo, inst) & 0xF0) == BRW_ARF_ACCUMULATOR; in src0_is_acc()
195 src1_is_acc(const struct intel_device_info *devinfo, const brw_inst *inst) in src1_is_acc() argument
197 return brw_inst_src1_reg_file(devinfo, inst) == BRW_ARCHITECTURE_REGISTER_FILE && in src1_is_acc()
198 (brw_inst_src1_da_reg_nr(devinfo, inst) & 0xF0) == BRW_ARF_ACCUMULATOR; in src1_is_acc()
203 const brw_inst *inst) in src0_has_scalar_region() argument
205 return brw_inst_src0_vstride(devinfo, inst) == BRW_VERTICAL_STRIDE_0 && in src0_has_scalar_region()
206 brw_inst_src0_width(devinfo, inst) == BRW_WIDTH_1 && in src0_has_scalar_region()
207 brw_inst_src0_hstride(devinfo, inst) == BRW_HORIZONTAL_STRIDE_0; in src0_has_scalar_region()
212 const brw_inst *inst) in src1_has_scalar_region() argument
214 return brw_inst_src1_vstride(devinfo, inst) == BRW_VERTICAL_STRIDE_0 && in src1_has_scalar_region()
215 brw_inst_src1_width(devinfo, inst) == BRW_WIDTH_1 && in src1_has_scalar_region()
216 brw_inst_src1_hstride(devinfo, inst) == BRW_HORIZONTAL_STRIDE_0; in src1_has_scalar_region()
221 const brw_inst *inst) in num_sources_from_inst() argument
224 brw_opcode_desc(devinfo, brw_inst_opcode(devinfo, inst)); in num_sources_from_inst()
227 if (brw_inst_opcode(devinfo, inst) == BRW_OPCODE_MATH) { in num_sources_from_inst()
228 math_function = brw_inst_math_function(devinfo, inst); in num_sources_from_inst()
230 brw_inst_opcode(devinfo, inst) == BRW_OPCODE_SEND) { in num_sources_from_inst()
231 if (brw_inst_sfid(devinfo, inst) == BRW_SFID_MATH) { in num_sources_from_inst()
275 invalid_values(const struct intel_device_info *devinfo, const brw_inst *inst) in invalid_values() argument
277 unsigned num_sources = num_sources_from_inst(devinfo, inst); in invalid_values()
280 switch ((enum brw_execution_size) brw_inst_exec_size(devinfo, inst)) { in invalid_values()
293 if (inst_is_send(devinfo, inst)) in invalid_values()
304 ERROR_IF(brw_inst_dst_reg_file(devinfo, inst) == MRF || in invalid_values()
306 brw_inst_src0_reg_file(devinfo, inst) == MRF) || in invalid_values()
308 brw_inst_src1_reg_file(devinfo, inst) == MRF), in invalid_values()
317 if (brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_1) { in invalid_values()
319 ERROR_IF(brw_inst_3src_a1_dst_type (devinfo, inst) == INVALID_REG_TYPE || in invalid_values()
320 brw_inst_3src_a1_src0_type(devinfo, inst) == INVALID_REG_TYPE || in invalid_values()
321 brw_inst_3src_a1_src1_type(devinfo, inst) == INVALID_REG_TYPE || in invalid_values()
322 brw_inst_3src_a1_src2_type(devinfo, inst) == INVALID_REG_TYPE, in invalid_values()
328 ERROR_IF(brw_inst_3src_a16_dst_type(devinfo, inst) == INVALID_REG_TYPE || in invalid_values()
329 brw_inst_3src_a16_src_type(devinfo, inst) == INVALID_REG_TYPE, in invalid_values()
333 ERROR_IF(brw_inst_dst_type (devinfo, inst) == INVALID_REG_TYPE || in invalid_values()
335 brw_inst_src0_type(devinfo, inst) == INVALID_REG_TYPE) || in invalid_values()
337 brw_inst_src1_type(devinfo, inst) == INVALID_REG_TYPE), in invalid_values()
346 const brw_inst *inst) in sources_not_null() argument
348 unsigned num_sources = num_sources_from_inst(devinfo, inst); in sources_not_null()
360 if (inst_is_split_send(devinfo, inst)) in sources_not_null()
363 if (num_sources >= 1 && brw_inst_opcode(devinfo, inst) != BRW_OPCODE_SYNC) in sources_not_null()
364 ERROR_IF(src0_is_null(devinfo, inst), "src0 is null"); in sources_not_null()
367 ERROR_IF(src1_is_null(devinfo, inst), "src1 is null"); in sources_not_null()
374 const brw_inst *inst) in alignment_supported() argument
378 ERROR_IF(devinfo->ver >= 11 && brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_16, in alignment_supported()
385 inst_uses_src_acc(const struct intel_device_info *devinfo, const brw_inst *inst) in inst_uses_src_acc() argument
388 switch (brw_inst_opcode(devinfo, inst)) { in inst_uses_src_acc()
398 unsigned num_sources = num_sources_from_inst(devinfo, inst); in inst_uses_src_acc()
401 return src0_is_acc(devinfo, inst) || (num_sources > 1 && src1_is_acc(devinfo, inst)); in inst_uses_src_acc()
406 const brw_inst *inst) in send_restrictions() argument
410 if (inst_is_split_send(devinfo, inst)) { in send_restrictions()
411 ERROR_IF(brw_inst_send_src1_reg_file(devinfo, inst) == BRW_ARCHITECTURE_REGISTER_FILE && in send_restrictions()
412 brw_inst_send_src1_reg_nr(devinfo, inst) != BRW_ARF_NULL, in send_restrictions()
415 ERROR_IF(brw_inst_eot(devinfo, inst) && in send_restrictions()
416 brw_inst_src0_da_reg_nr(devinfo, inst) < 112, in send_restrictions()
418 ERROR_IF(brw_inst_eot(devinfo, inst) && in send_restrictions()
419 brw_inst_send_src1_reg_file(devinfo, inst) == BRW_GENERAL_REGISTER_FILE && in send_restrictions()
420 brw_inst_send_src1_reg_nr(devinfo, inst) < 112, in send_restrictions()
423 if (brw_inst_send_src1_reg_file(devinfo, inst) == BRW_GENERAL_REGISTER_FILE) { in send_restrictions()
426 if (!brw_inst_send_sel_reg32_desc(devinfo, inst)) { in send_restrictions()
427 const uint32_t desc = brw_inst_send_desc(devinfo, inst); in send_restrictions()
432 if (!brw_inst_send_sel_reg32_ex_desc(devinfo, inst)) { in send_restrictions()
433 const uint32_t ex_desc = brw_inst_sends_ex_desc(devinfo, inst); in send_restrictions()
436 const unsigned src0_reg_nr = brw_inst_src0_da_reg_nr(devinfo, inst); in send_restrictions()
437 const unsigned src1_reg_nr = brw_inst_send_src1_reg_nr(devinfo, inst); in send_restrictions()
444 } else if (inst_is_send(devinfo, inst)) { in send_restrictions()
445 ERROR_IF(brw_inst_src0_address_mode(devinfo, inst) != BRW_ADDRESS_DIRECT, in send_restrictions()
449 ERROR_IF(brw_inst_send_src0_reg_file(devinfo, inst) != BRW_GENERAL_REGISTER_FILE, in send_restrictions()
451 ERROR_IF(brw_inst_eot(devinfo, inst) && in send_restrictions()
452 brw_inst_src0_da_reg_nr(devinfo, inst) < 112, in send_restrictions()
457 ERROR_IF(!dst_is_null(devinfo, inst) && in send_restrictions()
458 (brw_inst_dst_da_reg_nr(devinfo, inst) + in send_restrictions()
459 brw_inst_rlen(devinfo, inst) > 127) && in send_restrictions()
460 (brw_inst_src0_da_reg_nr(devinfo, inst) + in send_restrictions()
461 brw_inst_mlen(devinfo, inst) > in send_restrictions()
462 brw_inst_dst_da_reg_nr(devinfo, inst)), in send_restrictions()
473 const brw_inst *inst) in is_unsupported_inst() argument
475 return brw_inst_opcode(devinfo, inst) == BRW_OPCODE_ILLEGAL; in is_unsupported_inst()
525 execution_type(const struct intel_device_info *devinfo, const brw_inst *inst) in execution_type() argument
527 unsigned num_sources = num_sources_from_inst(devinfo, inst); in execution_type()
533 enum brw_reg_type dst_exec_type = inst_dst_type(devinfo, inst); in execution_type()
535 src0_exec_type = execution_type_for_type(brw_inst_src0_type(devinfo, inst)); in execution_type()
542 src1_exec_type = execution_type_for_type(brw_inst_src1_type(devinfo, inst)); in execution_type()
609 const brw_inst *inst) in is_half_float_conversion() argument
611 enum brw_reg_type dst_type = brw_inst_dst_type(devinfo, inst); in is_half_float_conversion()
613 unsigned num_sources = num_sources_from_inst(devinfo, inst); in is_half_float_conversion()
614 enum brw_reg_type src0_type = brw_inst_src0_type(devinfo, inst); in is_half_float_conversion()
620 enum brw_reg_type src1_type = brw_inst_src1_type(devinfo, inst); in is_half_float_conversion()
633 is_mixed_float(const struct intel_device_info *devinfo, const brw_inst *inst) in is_mixed_float() argument
638 if (inst_is_send(devinfo, inst)) in is_mixed_float()
641 unsigned opcode = brw_inst_opcode(devinfo, inst); in is_mixed_float()
647 unsigned num_sources = num_sources_from_inst(devinfo, inst); in is_mixed_float()
650 enum brw_reg_type dst_type = brw_inst_dst_type(devinfo, inst); in is_mixed_float()
651 enum brw_reg_type src0_type = brw_inst_src0_type(devinfo, inst); in is_mixed_float()
656 enum brw_reg_type src1_type = brw_inst_src1_type(devinfo, inst); in is_mixed_float()
669 const brw_inst *inst) in is_byte_conversion() argument
671 enum brw_reg_type dst_type = brw_inst_dst_type(devinfo, inst); in is_byte_conversion()
673 unsigned num_sources = num_sources_from_inst(devinfo, inst); in is_byte_conversion()
674 enum brw_reg_type src0_type = brw_inst_src0_type(devinfo, inst); in is_byte_conversion()
680 enum brw_reg_type src1_type = brw_inst_src1_type(devinfo, inst); in is_byte_conversion()
694 const brw_inst *inst) in general_restrictions_based_on_operand_types() argument
697 brw_opcode_desc(devinfo, brw_inst_opcode(devinfo, inst)); in general_restrictions_based_on_operand_types()
698 unsigned num_sources = num_sources_from_inst(devinfo, inst); in general_restrictions_based_on_operand_types()
699 unsigned exec_size = 1 << brw_inst_exec_size(devinfo, inst); in general_restrictions_based_on_operand_types()
702 if (inst_is_send(devinfo, inst)) in general_restrictions_based_on_operand_types()
707 ERROR_IF(brw_reg_type_to_size(brw_inst_3src_a1_src1_type(devinfo, inst)) == 1 || in general_restrictions_based_on_operand_types()
708 brw_reg_type_to_size(brw_inst_3src_a1_src2_type(devinfo, inst)) == 1, in general_restrictions_based_on_operand_types()
713 ERROR_IF(brw_reg_type_to_size(brw_inst_src1_type(devinfo, inst)) == 1, in general_restrictions_based_on_operand_types()
743 unsigned dst_stride = STRIDE(brw_inst_dst_hstride(devinfo, inst)); in general_restrictions_based_on_operand_types()
744 enum brw_reg_type dst_type = inst_dst_type(devinfo, inst); in general_restrictions_based_on_operand_types()
746 inst_dst_type(devinfo, inst) == BRW_REGISTER_TYPE_B || in general_restrictions_based_on_operand_types()
747 inst_dst_type(devinfo, inst) == BRW_REGISTER_TYPE_UB; in general_restrictions_based_on_operand_types()
751 if (!inst_is_raw_move(devinfo, inst)) in general_restrictions_based_on_operand_types()
757 unsigned exec_type = execution_type(devinfo, inst); in general_restrictions_based_on_operand_types()
769 if (is_byte_conversion(devinfo, inst)) { in general_restrictions_based_on_operand_types()
779 enum brw_reg_type src0_type = brw_inst_src0_type(devinfo, inst); in general_restrictions_based_on_operand_types()
781 brw_inst_src1_type(devinfo, inst) : 0; in general_restrictions_based_on_operand_types()
794 if (is_half_float_conversion(devinfo, inst)) { in general_restrictions_based_on_operand_types()
807 enum brw_reg_type src0_type = brw_inst_src0_type(devinfo, inst); in general_restrictions_based_on_operand_types()
809 brw_inst_src1_type(devinfo, inst) : 0; in general_restrictions_based_on_operand_types()
850 if (brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_1) { in general_restrictions_based_on_operand_types()
861 unsigned subreg = brw_inst_dst_da1_subreg_nr(devinfo, inst); in general_restrictions_based_on_operand_types()
867 unsigned subreg = brw_inst_dst_da1_subreg_nr(devinfo, inst); in general_restrictions_based_on_operand_types()
869 !(is_mixed_float(devinfo, inst) && in general_restrictions_based_on_operand_types()
883 !is_mixed_float(devinfo, inst) || in general_restrictions_based_on_operand_types()
888 if (!(dst_type_is_byte && inst_is_raw_move(devinfo, inst))) { in general_restrictions_based_on_operand_types()
894 unsigned subreg = brw_inst_dst_da1_subreg_nr(devinfo, inst); in general_restrictions_based_on_operand_types()
896 if (brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_1 && in general_restrictions_based_on_operand_types()
897 brw_inst_dst_address_mode(devinfo, inst) == BRW_ADDRESS_DIRECT) { in general_restrictions_based_on_operand_types()
926 const brw_inst *inst) in general_restrictions_on_region_parameters() argument
929 brw_opcode_desc(devinfo, brw_inst_opcode(devinfo, inst)); in general_restrictions_on_region_parameters()
930 unsigned num_sources = num_sources_from_inst(devinfo, inst); in general_restrictions_on_region_parameters()
931 unsigned exec_size = 1 << brw_inst_exec_size(devinfo, inst); in general_restrictions_on_region_parameters()
940 if (inst_is_split_send(devinfo, inst)) in general_restrictions_on_region_parameters()
943 if (brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_16) { in general_restrictions_on_region_parameters()
944 if (desc->ndst != 0 && !dst_is_null(devinfo, inst)) in general_restrictions_on_region_parameters()
945 ERROR_IF(brw_inst_dst_hstride(devinfo, inst) != BRW_HORIZONTAL_STRIDE_1, in general_restrictions_on_region_parameters()
950 ERROR_IF(brw_inst_src0_reg_file(devinfo, inst) != BRW_IMMEDIATE_VALUE && in general_restrictions_on_region_parameters()
951 brw_inst_src0_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_0 && in general_restrictions_on_region_parameters()
952 brw_inst_src0_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_2 && in general_restrictions_on_region_parameters()
953 brw_inst_src0_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_4, in general_restrictions_on_region_parameters()
956 ERROR_IF(brw_inst_src0_reg_file(devinfo, inst) != BRW_IMMEDIATE_VALUE && in general_restrictions_on_region_parameters()
957 brw_inst_src0_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_0 && in general_restrictions_on_region_parameters()
958 brw_inst_src0_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_4, in general_restrictions_on_region_parameters()
965 ERROR_IF(brw_inst_src1_reg_file(devinfo, inst) != BRW_IMMEDIATE_VALUE && in general_restrictions_on_region_parameters()
966 brw_inst_src1_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_0 && in general_restrictions_on_region_parameters()
967 brw_inst_src1_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_2 && in general_restrictions_on_region_parameters()
968 brw_inst_src1_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_4, in general_restrictions_on_region_parameters()
971 ERROR_IF(brw_inst_src1_reg_file(devinfo, inst) != BRW_IMMEDIATE_VALUE && in general_restrictions_on_region_parameters()
972 brw_inst_src1_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_0 && in general_restrictions_on_region_parameters()
973 brw_inst_src1_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_4, in general_restrictions_on_region_parameters()
986 if (brw_inst_src ## n ## _reg_file(devinfo, inst) == \ in general_restrictions_on_region_parameters()
990 vstride = STRIDE(brw_inst_src ## n ## _vstride(devinfo, inst)); \ in general_restrictions_on_region_parameters()
991 width = WIDTH(brw_inst_src ## n ## _width(devinfo, inst)); \ in general_restrictions_on_region_parameters()
992 hstride = STRIDE(brw_inst_src ## n ## _hstride(devinfo, inst)); \ in general_restrictions_on_region_parameters()
993 type = brw_inst_src ## n ## _type(devinfo, inst); \ in general_restrictions_on_region_parameters()
995 subreg = brw_inst_src ## n ## _da1_subreg_nr(devinfo, inst) in general_restrictions_on_region_parameters()
1075 if (desc->ndst != 0 && !dst_is_null(devinfo, inst)) { in general_restrictions_on_region_parameters()
1076 ERROR_IF(brw_inst_dst_hstride(devinfo, inst) == BRW_HORIZONTAL_STRIDE_0, in general_restrictions_on_region_parameters()
1085 const brw_inst *inst) in special_restrictions_for_mixed_float_mode() argument
1089 const unsigned opcode = brw_inst_opcode(devinfo, inst); in special_restrictions_for_mixed_float_mode()
1090 const unsigned num_sources = num_sources_from_inst(devinfo, inst); in special_restrictions_for_mixed_float_mode()
1094 if (!is_mixed_float(devinfo, inst)) in special_restrictions_for_mixed_float_mode()
1097 unsigned exec_size = 1 << brw_inst_exec_size(devinfo, inst); in special_restrictions_for_mixed_float_mode()
1098 bool is_align16 = brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_16; in special_restrictions_for_mixed_float_mode()
1100 enum brw_reg_type src0_type = brw_inst_src0_type(devinfo, inst); in special_restrictions_for_mixed_float_mode()
1102 brw_inst_src1_type(devinfo, inst) : 0; in special_restrictions_for_mixed_float_mode()
1103 enum brw_reg_type dst_type = brw_inst_dst_type(devinfo, inst); in special_restrictions_for_mixed_float_mode()
1105 unsigned dst_stride = STRIDE(brw_inst_dst_hstride(devinfo, inst)); in special_restrictions_for_mixed_float_mode()
1114 ERROR_IF(brw_inst_src0_address_mode(devinfo, inst) != BRW_ADDRESS_DIRECT || in special_restrictions_for_mixed_float_mode()
1116 brw_inst_src1_address_mode(devinfo, inst) != BRW_ADDRESS_DIRECT), in special_restrictions_for_mixed_float_mode()
1142 ERROR_IF(brw_inst_src0_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_4, in special_restrictions_for_mixed_float_mode()
1146 brw_inst_src1_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_4, in special_restrictions_for_mixed_float_mode()
1189 ERROR_IF(inst_uses_src_acc(devinfo, inst), in special_restrictions_for_mixed_float_mode()
1213 ERROR_IF(STRIDE(brw_inst_src0_hstride(devinfo, inst)) <= 1, in special_restrictions_for_mixed_float_mode()
1218 ERROR_IF(STRIDE(brw_inst_src1_hstride(devinfo, inst)) <= 1, in special_restrictions_for_mixed_float_mode()
1236 if (brw_inst_dst_address_mode(devinfo, inst) == BRW_ADDRESS_DIRECT) in special_restrictions_for_mixed_float_mode()
1237 subreg = brw_inst_dst_da1_subreg_nr(devinfo, inst); in special_restrictions_for_mixed_float_mode()
1239 subreg = brw_inst_dst_ia_subreg_nr(devinfo, inst); in special_restrictions_for_mixed_float_mode()
1257 if (src0_is_acc(devinfo, inst) && in special_restrictions_for_mixed_float_mode()
1260 ERROR_IF(brw_inst_src0_da1_subreg_nr(devinfo, inst) != 0, in special_restrictions_for_mixed_float_mode()
1267 src1_is_acc(devinfo, inst) && in special_restrictions_for_mixed_float_mode()
1270 ERROR_IF(brw_inst_src1_da1_subreg_nr(devinfo, inst) != 0, in special_restrictions_for_mixed_float_mode()
1289 inst_uses_src_acc(devinfo, inst)) { in special_restrictions_for_mixed_float_mode()
1366 const brw_inst *inst) in region_alignment_rules() argument
1369 brw_opcode_desc(devinfo, brw_inst_opcode(devinfo, inst)); in region_alignment_rules()
1370 unsigned num_sources = num_sources_from_inst(devinfo, inst); in region_alignment_rules()
1371 unsigned exec_size = 1 << brw_inst_exec_size(devinfo, inst); in region_alignment_rules()
1378 if (brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_16) in region_alignment_rules()
1381 if (inst_is_send(devinfo, inst)) in region_alignment_rules()
1397 if (brw_inst_src ## n ## _address_mode(devinfo, inst) != \ in region_alignment_rules()
1401 if (brw_inst_src ## n ## _reg_file(devinfo, inst) == \ in region_alignment_rules()
1405 vstride = STRIDE(brw_inst_src ## n ## _vstride(devinfo, inst)); \ in region_alignment_rules()
1406 width = WIDTH(brw_inst_src ## n ## _width(devinfo, inst)); \ in region_alignment_rules()
1407 hstride = STRIDE(brw_inst_src ## n ## _hstride(devinfo, inst)); \ in region_alignment_rules()
1408 type = brw_inst_src ## n ## _type(devinfo, inst); \ in region_alignment_rules()
1410 subreg = brw_inst_src ## n ## _da1_subreg_nr(devinfo, inst); \ in region_alignment_rules()
1432 if (desc->ndst == 0 || dst_is_null(devinfo, inst)) in region_alignment_rules()
1435 unsigned stride = STRIDE(brw_inst_dst_hstride(devinfo, inst)); in region_alignment_rules()
1436 enum brw_reg_type dst_type = inst_dst_type(devinfo, inst); in region_alignment_rules()
1438 unsigned subreg = brw_inst_dst_da1_subreg_nr(devinfo, inst); in region_alignment_rules()
1522 brw_inst_opcode(devinfo, inst) == BRW_OPCODE_MATH) { in region_alignment_rules()
1593 brw_inst_src ## n ## _da1_subreg_nr(devinfo, inst); \ in region_alignment_rules()
1643 enum brw_reg_type dst_type = inst_dst_type(devinfo, inst); in region_alignment_rules()
1651 vstride = STRIDE(brw_inst_src ## n ## _vstride(devinfo, inst)); \ in region_alignment_rules()
1652 width = WIDTH(brw_inst_src ## n ## _width(devinfo, inst)); \ in region_alignment_rules()
1653 hstride = STRIDE(brw_inst_src ## n ## _hstride(devinfo, inst)); \ in region_alignment_rules()
1656 (brw_inst_src ## n ## _type(devinfo, inst) == BRW_REGISTER_TYPE_W || \ in region_alignment_rules()
1657 brw_inst_src ## n ## _type(devinfo, inst) == BRW_REGISTER_TYPE_UW); \ in region_alignment_rules()
1660 !src ## n ## _has_scalar_region(devinfo, inst) && \ in region_alignment_rules()
1680 const brw_inst *inst) in vector_immediate_restrictions() argument
1682 unsigned num_sources = num_sources_from_inst(devinfo, inst); in vector_immediate_restrictions()
1689 brw_inst_src0_reg_file(devinfo, inst) : in vector_immediate_restrictions()
1690 brw_inst_src1_reg_file(devinfo, inst); in vector_immediate_restrictions()
1694 enum brw_reg_type dst_type = inst_dst_type(devinfo, inst); in vector_immediate_restrictions()
1696 unsigned dst_subreg = brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_1 ? in vector_immediate_restrictions()
1697 brw_inst_dst_da1_subreg_nr(devinfo, inst) : 0; in vector_immediate_restrictions()
1698 unsigned dst_stride = STRIDE(brw_inst_dst_hstride(devinfo, inst)); in vector_immediate_restrictions()
1700 brw_inst_src0_type(devinfo, inst) : in vector_immediate_restrictions()
1701 brw_inst_src1_type(devinfo, inst); in vector_immediate_restrictions()
1742 const brw_inst *inst) in special_requirements_for_handling_double_precision_data_types() argument
1744 unsigned num_sources = num_sources_from_inst(devinfo, inst); in special_requirements_for_handling_double_precision_data_types()
1751 if (inst_is_split_send(devinfo, inst)) in special_requirements_for_handling_double_precision_data_types()
1754 enum brw_reg_type exec_type = execution_type(devinfo, inst); in special_requirements_for_handling_double_precision_data_types()
1757 enum brw_reg_file dst_file = brw_inst_dst_reg_file(devinfo, inst); in special_requirements_for_handling_double_precision_data_types()
1758 enum brw_reg_type dst_type = inst_dst_type(devinfo, inst); in special_requirements_for_handling_double_precision_data_types()
1760 unsigned dst_hstride = STRIDE(brw_inst_dst_hstride(devinfo, inst)); in special_requirements_for_handling_double_precision_data_types()
1761 unsigned dst_reg = brw_inst_dst_da_reg_nr(devinfo, inst); in special_requirements_for_handling_double_precision_data_types()
1762 unsigned dst_subreg = brw_inst_dst_da1_subreg_nr(devinfo, inst); in special_requirements_for_handling_double_precision_data_types()
1763 unsigned dst_address_mode = brw_inst_dst_address_mode(devinfo, inst); in special_requirements_for_handling_double_precision_data_types()
1767 brw_inst_opcode(devinfo, inst) == BRW_OPCODE_MUL && in special_requirements_for_handling_double_precision_data_types()
1768 (brw_inst_src0_type(devinfo, inst) == BRW_REGISTER_TYPE_D || in special_requirements_for_handling_double_precision_data_types()
1769 brw_inst_src0_type(devinfo, inst) == BRW_REGISTER_TYPE_UD) && in special_requirements_for_handling_double_precision_data_types()
1770 (brw_inst_src1_type(devinfo, inst) == BRW_REGISTER_TYPE_D || in special_requirements_for_handling_double_precision_data_types()
1771 brw_inst_src1_type(devinfo, inst) == BRW_REGISTER_TYPE_UD); in special_requirements_for_handling_double_precision_data_types()
1783 if (brw_inst_src ## n ## _reg_file(devinfo, inst) == \ in special_requirements_for_handling_double_precision_data_types()
1787 is_scalar_region = src ## n ## _has_scalar_region(devinfo, inst); \ in special_requirements_for_handling_double_precision_data_types()
1788 vstride = STRIDE(brw_inst_src ## n ## _vstride(devinfo, inst)); \ in special_requirements_for_handling_double_precision_data_types()
1789 width = WIDTH(brw_inst_src ## n ## _width(devinfo, inst)); \ in special_requirements_for_handling_double_precision_data_types()
1790 hstride = STRIDE(brw_inst_src ## n ## _hstride(devinfo, inst)); \ in special_requirements_for_handling_double_precision_data_types()
1791 file = brw_inst_src ## n ## _reg_file(devinfo, inst); \ in special_requirements_for_handling_double_precision_data_types()
1792 type = brw_inst_src ## n ## _type(devinfo, inst); \ in special_requirements_for_handling_double_precision_data_types()
1794 reg = brw_inst_src ## n ## _da_reg_nr(devinfo, inst); \ in special_requirements_for_handling_double_precision_data_types()
1795 subreg = brw_inst_src ## n ## _da1_subreg_nr(devinfo, inst); \ in special_requirements_for_handling_double_precision_data_types()
1796 address_mode = brw_inst_src ## n ## _address_mode(devinfo, inst) in special_requirements_for_handling_double_precision_data_types()
1822 brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_1 && in special_requirements_for_handling_double_precision_data_types()
1866 ERROR_IF(brw_inst_opcode(devinfo, inst) == BRW_OPCODE_MAC || in special_requirements_for_handling_double_precision_data_types()
1867 brw_inst_acc_wr_control(devinfo, inst) || in special_requirements_for_handling_double_precision_data_types()
1930 enum brw_reg_type src0_type = brw_inst_src0_type(devinfo, inst); in special_requirements_for_handling_double_precision_data_types()
1932 num_sources > 1 ? brw_inst_src1_type(devinfo, inst) : src0_type; in special_requirements_for_handling_double_precision_data_types()
1936 ERROR_IF(brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_16 && in special_requirements_for_handling_double_precision_data_types()
1939 brw_inst_exec_size(devinfo, inst) > BRW_EXECUTE_2, in special_requirements_for_handling_double_precision_data_types()
1953 ERROR_IF(brw_inst_no_dd_check(devinfo, inst) || in special_requirements_for_handling_double_precision_data_types()
1954 brw_inst_no_dd_clear(devinfo, inst), in special_requirements_for_handling_double_precision_data_types()
1963 const brw_inst *inst) in instruction_restrictions() argument
1973 brw_inst_opcode(devinfo, inst) == BRW_OPCODE_MUL) { in instruction_restrictions()
1974 enum brw_reg_type exec_type = execution_type(devinfo, inst); in instruction_restrictions()
1975 const bool src0_valid = type_sz(brw_inst_src0_type(devinfo, inst)) == 4 || in instruction_restrictions()
1976 brw_inst_src0_reg_file(devinfo, inst) == BRW_IMMEDIATE_VALUE || in instruction_restrictions()
1977 !(brw_inst_src0_negate(devinfo, inst) || in instruction_restrictions()
1978 brw_inst_src0_abs(devinfo, inst)); in instruction_restrictions()
1979 const bool src1_valid = type_sz(brw_inst_src1_type(devinfo, inst)) == 4 || in instruction_restrictions()
1980 brw_inst_src1_reg_file(devinfo, inst) == BRW_IMMEDIATE_VALUE || in instruction_restrictions()
1981 !(brw_inst_src1_negate(devinfo, inst) || in instruction_restrictions()
1982 brw_inst_src1_abs(devinfo, inst)); in instruction_restrictions()
1990 if (brw_inst_opcode(devinfo, inst) == BRW_OPCODE_CMP || in instruction_restrictions()
1991 brw_inst_opcode(devinfo, inst) == BRW_OPCODE_CMPN) { in instruction_restrictions()
2007 ERROR_IF(brw_inst_dst_reg_file(devinfo, inst) == BRW_ARCHITECTURE_REGISTER_FILE && in instruction_restrictions()
2008 brw_inst_dst_da_reg_nr(devinfo, inst) != BRW_ARF_NULL, in instruction_restrictions()
2021 ERROR_IF(dst_is_null(devinfo, inst) && in instruction_restrictions()
2022 brw_inst_thread_control(devinfo, inst) != BRW_THREAD_SWITCH, in instruction_restrictions()
2028 if (brw_inst_opcode(devinfo, inst) == BRW_OPCODE_MATH) { in instruction_restrictions()
2029 unsigned math_function = brw_inst_math_function(devinfo, inst); in instruction_restrictions()
2038 bool src0_valid = !brw_inst_src0_negate(devinfo, inst) && in instruction_restrictions()
2039 !brw_inst_src0_abs(devinfo, inst); in instruction_restrictions()
2040 bool src1_valid = !brw_inst_src1_negate(devinfo, inst) && in instruction_restrictions()
2041 !brw_inst_src1_abs(devinfo, inst); in instruction_restrictions()
2051 if (brw_inst_opcode(devinfo, inst) == BRW_OPCODE_DP4A) { in instruction_restrictions()
2057 ERROR_IF(src0_is_acc(devinfo, inst) && src1_is_acc(devinfo, inst), in instruction_restrictions()
2068 const brw_inst *inst) in send_descriptor_restrictions() argument
2072 if (inst_is_split_send(devinfo, inst)) { in send_descriptor_restrictions()
2074 if (brw_inst_send_sel_reg32_desc(devinfo, inst)) in send_descriptor_restrictions()
2076 } else if (inst_is_send(devinfo, inst)) { in send_descriptor_restrictions()
2078 if (brw_inst_src1_reg_file(devinfo, inst) != BRW_IMMEDIATE_VALUE) in send_descriptor_restrictions()
2084 const uint32_t desc = brw_inst_send_desc(devinfo, inst); in send_descriptor_restrictions()
2086 switch (brw_inst_sfid(devinfo, inst)) { in send_descriptor_restrictions()
2094 brw_inst_exec_size(devinfo, inst) != BRW_EXECUTE_1, in send_descriptor_restrictions()
2107 const brw_inst *inst, int offset, in brw_validate_instruction() argument
2112 if (is_unsupported_inst(devinfo, inst)) { in brw_validate_instruction()
2148 const brw_inst *inst = assembly + src_offset; in brw_validate_instructions() local
2149 bool is_compact = brw_inst_cmpt_control(devinfo, inst); in brw_validate_instructions()
2155 brw_compact_inst *compacted = (void *)inst; in brw_validate_instructions()
2157 inst = &uncompacted; in brw_validate_instructions()
2160 bool v = brw_validate_instruction(devinfo, inst, src_offset, disasm); in brw_validate_instructions()