Lines Matching defs:inst
82 struct string __msg = func(isa, inst, ##args); \
93 inst_is_send(const struct brw_isa_info *isa, const brw_inst *inst)
95 switch (brw_inst_opcode(isa, inst)) {
107 inst_is_split_send(const struct brw_isa_info *isa, const brw_inst *inst)
112 return inst_is_send(isa, inst);
114 switch (brw_inst_opcode(isa, inst)) {
137 inst_dst_type(const struct brw_isa_info *isa, const brw_inst *inst)
141 return (devinfo->ver < 12 || !inst_is_send(isa, inst)) ?
142 brw_inst_dst_type(devinfo, inst) : BRW_REGISTER_TYPE_D;
146 inst_is_raw_move(const struct brw_isa_info *isa, const brw_inst *inst)
150 unsigned dst_type = signed_type(inst_dst_type(isa, inst));
151 unsigned src_type = signed_type(brw_inst_src0_type(devinfo, inst));
153 if (brw_inst_src0_reg_file(devinfo, inst) == BRW_IMMEDIATE_VALUE) {
155 if (brw_inst_src0_type(devinfo, inst) == BRW_REGISTER_TYPE_VF ||
156 brw_inst_src0_type(devinfo, inst) == BRW_REGISTER_TYPE_UV ||
157 brw_inst_src0_type(devinfo, inst) == BRW_REGISTER_TYPE_V) {
160 } else if (brw_inst_src0_negate(devinfo, inst) ||
161 brw_inst_src0_abs(devinfo, inst)) {
165 return brw_inst_opcode(isa, inst) == BRW_OPCODE_MOV &&
166 brw_inst_saturate(devinfo, inst) == 0 &&
171 dst_is_null(const struct intel_device_info *devinfo, const brw_inst *inst)
173 return brw_inst_dst_reg_file(devinfo, inst) == BRW_ARCHITECTURE_REGISTER_FILE &&
174 brw_inst_dst_da_reg_nr(devinfo, inst) == BRW_ARF_NULL;
178 src0_is_null(const struct intel_device_info *devinfo, const brw_inst *inst)
180 return brw_inst_src0_address_mode(devinfo, inst) == BRW_ADDRESS_DIRECT &&
181 brw_inst_src0_reg_file(devinfo, inst) == BRW_ARCHITECTURE_REGISTER_FILE &&
182 brw_inst_src0_da_reg_nr(devinfo, inst) == BRW_ARF_NULL;
186 src1_is_null(const struct intel_device_info *devinfo, const brw_inst *inst)
188 return brw_inst_src1_reg_file(devinfo, inst) == BRW_ARCHITECTURE_REGISTER_FILE &&
189 brw_inst_src1_da_reg_nr(devinfo, inst) == BRW_ARF_NULL;
193 src0_is_acc(const struct intel_device_info *devinfo, const brw_inst *inst)
195 return brw_inst_src0_reg_file(devinfo, inst) == BRW_ARCHITECTURE_REGISTER_FILE &&
196 (brw_inst_src0_da_reg_nr(devinfo, inst) & 0xF0) == BRW_ARF_ACCUMULATOR;
200 src1_is_acc(const struct intel_device_info *devinfo, const brw_inst *inst)
202 return brw_inst_src1_reg_file(devinfo, inst) == BRW_ARCHITECTURE_REGISTER_FILE &&
203 (brw_inst_src1_da_reg_nr(devinfo, inst) & 0xF0) == BRW_ARF_ACCUMULATOR;
208 const brw_inst *inst)
210 return brw_inst_src0_vstride(devinfo, inst) == BRW_VERTICAL_STRIDE_0 &&
211 brw_inst_src0_width(devinfo, inst) == BRW_WIDTH_1 &&
212 brw_inst_src0_hstride(devinfo, inst) == BRW_HORIZONTAL_STRIDE_0;
217 const brw_inst *inst)
219 return brw_inst_src1_vstride(devinfo, inst) == BRW_VERTICAL_STRIDE_0 &&
220 brw_inst_src1_width(devinfo, inst) == BRW_WIDTH_1 &&
221 brw_inst_src1_hstride(devinfo, inst) == BRW_HORIZONTAL_STRIDE_0;
226 const brw_inst *inst)
230 brw_opcode_desc(isa, brw_inst_opcode(isa, inst));
233 if (brw_inst_opcode(isa, inst) == BRW_OPCODE_MATH) {
234 math_function = brw_inst_math_function(devinfo, inst);
236 brw_inst_opcode(isa, inst) == BRW_OPCODE_SEND) {
237 if (brw_inst_sfid(devinfo, inst) == BRW_SFID_MATH) {
281 invalid_values(const struct brw_isa_info *isa, const brw_inst *inst)
285 unsigned num_sources = num_sources_from_inst(isa, inst);
288 switch ((enum brw_execution_size) brw_inst_exec_size(devinfo, inst)) {
301 if (inst_is_send(isa, inst))
312 ERROR_IF(brw_inst_dst_reg_file(devinfo, inst) == MRF ||
314 brw_inst_src0_reg_file(devinfo, inst) == MRF) ||
316 brw_inst_src1_reg_file(devinfo, inst) == MRF),
325 if (brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_1) {
327 ERROR_IF(brw_inst_3src_a1_dst_type (devinfo, inst) == INVALID_REG_TYPE ||
328 brw_inst_3src_a1_src0_type(devinfo, inst) == INVALID_REG_TYPE ||
329 brw_inst_3src_a1_src1_type(devinfo, inst) == INVALID_REG_TYPE ||
330 brw_inst_3src_a1_src2_type(devinfo, inst) == INVALID_REG_TYPE,
336 ERROR_IF(brw_inst_3src_a16_dst_type(devinfo, inst) == INVALID_REG_TYPE ||
337 brw_inst_3src_a16_src_type(devinfo, inst) == INVALID_REG_TYPE,
341 ERROR_IF(brw_inst_dst_type (devinfo, inst) == INVALID_REG_TYPE ||
343 brw_inst_src0_type(devinfo, inst) == INVALID_REG_TYPE) ||
345 brw_inst_src1_type(devinfo, inst) == INVALID_REG_TYPE),
354 const brw_inst *inst)
357 unsigned num_sources = num_sources_from_inst(isa, inst);
369 if (inst_is_split_send(isa, inst))
372 if (num_sources >= 1 && brw_inst_opcode(isa, inst) != BRW_OPCODE_SYNC)
373 ERROR_IF(src0_is_null(devinfo, inst), "src0 is null");
376 ERROR_IF(src1_is_null(devinfo, inst), "src1 is null");
383 const brw_inst *inst)
388 ERROR_IF(devinfo->ver >= 11 && brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_16,
396 const brw_inst *inst)
401 switch (brw_inst_opcode(isa, inst)) {
411 unsigned num_sources = num_sources_from_inst(isa, inst);
414 return src0_is_acc(devinfo, inst) || (num_sources > 1 && src1_is_acc(devinfo, inst));
419 const brw_inst *inst)
425 if (inst_is_split_send(isa, inst)) {
426 ERROR_IF(brw_inst_send_src1_reg_file(devinfo, inst) == BRW_ARCHITECTURE_REGISTER_FILE &&
427 brw_inst_send_src1_reg_nr(devinfo, inst) != BRW_ARF_NULL,
430 ERROR_IF(brw_inst_eot(devinfo, inst) &&
431 brw_inst_src0_da_reg_nr(devinfo, inst) < 112,
433 ERROR_IF(brw_inst_eot(devinfo, inst) &&
434 brw_inst_send_src1_reg_file(devinfo, inst) == BRW_GENERAL_REGISTER_FILE &&
435 brw_inst_send_src1_reg_nr(devinfo, inst) < 112,
438 if (brw_inst_send_src0_reg_file(devinfo, inst) == BRW_GENERAL_REGISTER_FILE &&
439 brw_inst_send_src1_reg_file(devinfo, inst) == BRW_GENERAL_REGISTER_FILE) {
442 if (!brw_inst_send_sel_reg32_desc(devinfo, inst)) {
443 const uint32_t desc = brw_inst_send_desc(devinfo, inst);
448 if (!brw_inst_send_sel_reg32_ex_desc(devinfo, inst)) {
449 const uint32_t ex_desc = brw_inst_sends_ex_desc(devinfo, inst);
452 const unsigned src0_reg_nr = brw_inst_src0_da_reg_nr(devinfo, inst);
453 const unsigned src1_reg_nr = brw_inst_send_src1_reg_nr(devinfo, inst);
460 } else if (inst_is_send(isa, inst)) {
461 ERROR_IF(brw_inst_src0_address_mode(devinfo, inst) != BRW_ADDRESS_DIRECT,
465 ERROR_IF(brw_inst_send_src0_reg_file(devinfo, inst) != BRW_GENERAL_REGISTER_FILE,
467 ERROR_IF(brw_inst_eot(devinfo, inst) &&
468 brw_inst_src0_da_reg_nr(devinfo, inst) < 112,
473 ERROR_IF(!dst_is_null(devinfo, inst) &&
474 (brw_inst_dst_da_reg_nr(devinfo, inst) +
475 brw_inst_rlen(devinfo, inst) > 127) &&
476 (brw_inst_src0_da_reg_nr(devinfo, inst) +
477 brw_inst_mlen(devinfo, inst) >
478 brw_inst_dst_da_reg_nr(devinfo, inst)),
489 const brw_inst *inst)
491 return brw_inst_opcode(isa, inst) == BRW_OPCODE_ILLEGAL;
538 * Returns the execution type of an instruction \p inst
541 execution_type(const struct brw_isa_info *isa, const brw_inst *inst)
545 unsigned num_sources = num_sources_from_inst(isa, inst);
551 enum brw_reg_type dst_exec_type = inst_dst_type(isa, inst);
553 src0_exec_type = execution_type_for_type(brw_inst_src0_type(devinfo, inst));
560 src1_exec_type = execution_type_for_type(brw_inst_src1_type(devinfo, inst));
640 const brw_inst *inst)
644 enum brw_reg_type dst_type = brw_inst_dst_type(devinfo, inst);
646 unsigned num_sources = num_sources_from_inst(isa, inst);
647 enum brw_reg_type src0_type = brw_inst_src0_type(devinfo, inst);
653 enum brw_reg_type src1_type = brw_inst_src1_type(devinfo, inst);
666 is_mixed_float(const struct brw_isa_info *isa, const brw_inst *inst)
673 if (inst_is_send(isa, inst))
676 unsigned opcode = brw_inst_opcode(isa, inst);
682 unsigned num_sources = num_sources_from_inst(isa, inst);
685 enum brw_reg_type dst_type = brw_inst_dst_type(devinfo, inst);
686 enum brw_reg_type src0_type = brw_inst_src0_type(devinfo, inst);
691 enum brw_reg_type src1_type = brw_inst_src1_type(devinfo, inst);
704 const brw_inst *inst)
708 enum brw_reg_type dst_type = brw_inst_dst_type(devinfo, inst);
710 unsigned num_sources = num_sources_from_inst(isa, inst);
711 enum brw_reg_type src0_type = brw_inst_src0_type(devinfo, inst);
717 enum brw_reg_type src1_type = brw_inst_src1_type(devinfo, inst);
731 const brw_inst *inst)
736 brw_opcode_desc(isa, brw_inst_opcode(isa, inst));
737 unsigned num_sources = num_sources_from_inst(isa, inst);
738 unsigned exec_size = 1 << brw_inst_exec_size(devinfo, inst);
741 if (inst_is_send(isa, inst))
746 ERROR_IF(brw_reg_type_to_size(brw_inst_3src_a1_src1_type(devinfo, inst)) == 1 ||
747 brw_reg_type_to_size(brw_inst_3src_a1_src2_type(devinfo, inst)) == 1,
752 ERROR_IF(brw_reg_type_to_size(brw_inst_src1_type(devinfo, inst)) == 1,
761 if (brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_1)
762 dst_type = brw_inst_3src_a1_dst_type(devinfo, inst);
764 dst_type = brw_inst_3src_a16_dst_type(devinfo, inst);
766 dst_type = inst_dst_type(isa, inst);
781 if (brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_1) {
783 case 0: src_type = brw_inst_3src_a1_src0_type(devinfo, inst); break;
784 case 1: src_type = brw_inst_3src_a1_src1_type(devinfo, inst); break;
785 case 2: src_type = brw_inst_3src_a1_src2_type(devinfo, inst); break;
789 src_type = brw_inst_3src_a16_src_type(devinfo, inst);
793 case 0: src_type = brw_inst_src0_type(devinfo, inst); break;
794 case 1: src_type = brw_inst_src1_type(devinfo, inst); break;
833 unsigned dst_stride = STRIDE(brw_inst_dst_hstride(devinfo, inst));
835 inst_dst_type(isa, inst) == BRW_REGISTER_TYPE_B ||
836 inst_dst_type(isa, inst) == BRW_REGISTER_TYPE_UB;
840 if (!inst_is_raw_move(isa, inst))
846 unsigned exec_type = execution_type(isa, inst);
858 if (is_byte_conversion(isa, inst)) {
868 enum brw_reg_type src0_type = brw_inst_src0_type(devinfo, inst);
870 brw_inst_src1_type(devinfo, inst) : 0;
883 if (is_half_float_conversion(isa, inst)) {
896 enum brw_reg_type src0_type = brw_inst_src0_type(devinfo, inst);
898 brw_inst_src1_type(devinfo, inst) : 0;
939 if (brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_1) {
950 unsigned subreg = brw_inst_dst_da1_subreg_nr(devinfo, inst);
957 unsigned subreg = brw_inst_dst_da1_subreg_nr(devinfo, inst);
959 !(is_mixed_float(isa, inst) &&
973 !is_mixed_float(isa, inst) ||
978 if (!(dst_type_is_byte && inst_is_raw_move(isa, inst))) {
984 unsigned subreg = brw_inst_dst_da1_subreg_nr(devinfo, inst);
986 if (brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_1 &&
987 brw_inst_dst_address_mode(devinfo, inst) == BRW_ADDRESS_DIRECT) {
1016 const brw_inst *inst)
1021 brw_opcode_desc(isa, brw_inst_opcode(isa, inst));
1022 unsigned num_sources = num_sources_from_inst(isa, inst);
1023 unsigned exec_size = 1 << brw_inst_exec_size(devinfo, inst);
1032 if (inst_is_split_send(isa, inst))
1035 if (brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_16) {
1036 if (desc->ndst != 0 && !dst_is_null(devinfo, inst))
1037 ERROR_IF(brw_inst_dst_hstride(devinfo, inst) != BRW_HORIZONTAL_STRIDE_1,
1042 ERROR_IF(brw_inst_src0_reg_file(devinfo, inst) != BRW_IMMEDIATE_VALUE &&
1043 brw_inst_src0_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_0 &&
1044 brw_inst_src0_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_2 &&
1045 brw_inst_src0_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_4,
1048 ERROR_IF(brw_inst_src0_reg_file(devinfo, inst) != BRW_IMMEDIATE_VALUE &&
1049 brw_inst_src0_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_0 &&
1050 brw_inst_src0_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_4,
1057 ERROR_IF(brw_inst_src1_reg_file(devinfo, inst) != BRW_IMMEDIATE_VALUE &&
1058 brw_inst_src1_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_0 &&
1059 brw_inst_src1_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_2 &&
1060 brw_inst_src1_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_4,
1063 ERROR_IF(brw_inst_src1_reg_file(devinfo, inst) != BRW_IMMEDIATE_VALUE &&
1064 brw_inst_src1_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_0 &&
1065 brw_inst_src1_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_4,
1078 if (brw_inst_src ## n ## _reg_file(devinfo, inst) == \
1082 vstride = STRIDE(brw_inst_src ## n ## _vstride(devinfo, inst)); \
1083 width = WIDTH(brw_inst_src ## n ## _width(devinfo, inst)); \
1084 hstride = STRIDE(brw_inst_src ## n ## _hstride(devinfo, inst)); \
1085 type = brw_inst_src ## n ## _type(devinfo, inst); \
1087 subreg = brw_inst_src ## n ## _da1_subreg_nr(devinfo, inst)
1167 if (desc->ndst != 0 && !dst_is_null(devinfo, inst)) {
1168 ERROR_IF(brw_inst_dst_hstride(devinfo, inst) == BRW_HORIZONTAL_STRIDE_0,
1177 const brw_inst *inst)
1183 const unsigned opcode = brw_inst_opcode(isa, inst);
1184 const unsigned num_sources = num_sources_from_inst(isa, inst);
1188 if (!is_mixed_float(isa, inst))
1191 unsigned exec_size = 1 << brw_inst_exec_size(devinfo, inst);
1192 bool is_align16 = brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_16;
1194 enum brw_reg_type src0_type = brw_inst_src0_type(devinfo, inst);
1196 brw_inst_src1_type(devinfo, inst) : 0;
1197 enum brw_reg_type dst_type = brw_inst_dst_type(devinfo, inst);
1199 unsigned dst_stride = STRIDE(brw_inst_dst_hstride(devinfo, inst));
1208 ERROR_IF(brw_inst_src0_address_mode(devinfo, inst) != BRW_ADDRESS_DIRECT ||
1210 brw_inst_src1_address_mode(devinfo, inst) != BRW_ADDRESS_DIRECT),
1236 ERROR_IF(brw_inst_src0_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_4,
1240 brw_inst_src1_vstride(devinfo, inst) != BRW_VERTICAL_STRIDE_4,
1283 ERROR_IF(inst_uses_src_acc(isa, inst),
1307 ERROR_IF(STRIDE(brw_inst_src0_hstride(devinfo, inst)) <= 1,
1312 ERROR_IF(STRIDE(brw_inst_src1_hstride(devinfo, inst)) <= 1,
1330 if (brw_inst_dst_address_mode(devinfo, inst) == BRW_ADDRESS_DIRECT)
1331 subreg = brw_inst_dst_da1_subreg_nr(devinfo, inst);
1333 subreg = brw_inst_dst_ia_subreg_nr(devinfo, inst);
1351 if (src0_is_acc(devinfo, inst) &&
1354 ERROR_IF(brw_inst_src0_da1_subreg_nr(devinfo, inst) != 0,
1361 src1_is_acc(devinfo, inst) &&
1364 ERROR_IF(brw_inst_src1_da1_subreg_nr(devinfo, inst) != 0,
1383 inst_uses_src_acc(isa, inst)) {
1460 const brw_inst *inst)
1464 brw_opcode_desc(isa, brw_inst_opcode(isa, inst));
1465 unsigned num_sources = num_sources_from_inst(isa, inst);
1466 unsigned exec_size = 1 << brw_inst_exec_size(devinfo, inst);
1473 if (brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_16)
1476 if (inst_is_send(isa, inst))
1492 if (brw_inst_src ## n ## _address_mode(devinfo, inst) != \
1496 if (brw_inst_src ## n ## _reg_file(devinfo, inst) == \
1500 vstride = STRIDE(brw_inst_src ## n ## _vstride(devinfo, inst)); \
1501 width = WIDTH(brw_inst_src ## n ## _width(devinfo, inst)); \
1502 hstride = STRIDE(brw_inst_src ## n ## _hstride(devinfo, inst)); \
1503 type = brw_inst_src ## n ## _type(devinfo, inst); \
1505 subreg = brw_inst_src ## n ## _da1_subreg_nr(devinfo, inst); \
1527 if (desc->ndst == 0 || dst_is_null(devinfo, inst))
1530 unsigned stride = STRIDE(brw_inst_dst_hstride(devinfo, inst));
1531 enum brw_reg_type dst_type = inst_dst_type(isa, inst);
1533 unsigned subreg = brw_inst_dst_da1_subreg_nr(devinfo, inst);
1617 brw_inst_opcode(isa, inst) == BRW_OPCODE_MATH) {
1688 brw_inst_src ## n ## _da1_subreg_nr(devinfo, inst); \
1738 enum brw_reg_type dst_type = inst_dst_type(isa, inst);
1746 vstride = STRIDE(brw_inst_src ## n ## _vstride(devinfo, inst)); \
1747 width = WIDTH(brw_inst_src ## n ## _width(devinfo, inst)); \
1748 hstride = STRIDE(brw_inst_src ## n ## _hstride(devinfo, inst)); \
1751 (brw_inst_src ## n ## _type(devinfo, inst) == BRW_REGISTER_TYPE_W || \
1752 brw_inst_src ## n ## _type(devinfo, inst) == BRW_REGISTER_TYPE_UW); \
1755 !src ## n ## _has_scalar_region(devinfo, inst) && \
1775 const brw_inst *inst)
1779 unsigned num_sources = num_sources_from_inst(isa, inst);
1786 brw_inst_src0_reg_file(devinfo, inst) :
1787 brw_inst_src1_reg_file(devinfo, inst);
1791 enum brw_reg_type dst_type = inst_dst_type(isa, inst);
1793 unsigned dst_subreg = brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_1 ?
1794 brw_inst_dst_da1_subreg_nr(devinfo, inst) : 0;
1795 unsigned dst_stride = STRIDE(brw_inst_dst_hstride(devinfo, inst));
1797 brw_inst_src0_type(devinfo, inst) :
1798 brw_inst_src1_type(devinfo, inst);
1839 const brw_inst *inst)
1843 unsigned num_sources = num_sources_from_inst(isa, inst);
1850 if (inst_is_split_send(isa, inst))
1853 enum brw_reg_type exec_type = execution_type(isa, inst);
1856 enum brw_reg_file dst_file = brw_inst_dst_reg_file(devinfo, inst);
1857 enum brw_reg_type dst_type = inst_dst_type(isa, inst);
1859 unsigned dst_hstride = STRIDE(brw_inst_dst_hstride(devinfo, inst));
1860 unsigned dst_reg = brw_inst_dst_da_reg_nr(devinfo, inst);
1861 unsigned dst_subreg = brw_inst_dst_da1_subreg_nr(devinfo, inst);
1862 unsigned dst_address_mode = brw_inst_dst_address_mode(devinfo, inst);
1866 brw_inst_opcode(isa, inst) == BRW_OPCODE_MUL &&
1867 (brw_inst_src0_type(devinfo, inst) == BRW_REGISTER_TYPE_D ||
1868 brw_inst_src0_type(devinfo, inst) == BRW_REGISTER_TYPE_UD) &&
1869 (brw_inst_src1_type(devinfo, inst) == BRW_REGISTER_TYPE_D ||
1870 brw_inst_src1_type(devinfo, inst) == BRW_REGISTER_TYPE_UD);
1882 if (brw_inst_src ## n ## _reg_file(devinfo, inst) == \
1886 is_scalar_region = src ## n ## _has_scalar_region(devinfo, inst); \
1887 vstride = STRIDE(brw_inst_src ## n ## _vstride(devinfo, inst)); \
1888 width = WIDTH(brw_inst_src ## n ## _width(devinfo, inst)); \
1889 hstride = STRIDE(brw_inst_src ## n ## _hstride(devinfo, inst)); \
1890 file = brw_inst_src ## n ## _reg_file(devinfo, inst); \
1891 type = brw_inst_src ## n ## _type(devinfo, inst); \
1893 reg = brw_inst_src ## n ## _da_reg_nr(devinfo, inst); \
1894 subreg = brw_inst_src ## n ## _da1_subreg_nr(devinfo, inst); \
1895 address_mode = brw_inst_src ## n ## _address_mode(devinfo, inst)
1921 brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_1 &&
1966 ERROR_IF(brw_inst_opcode(isa, inst) == BRW_OPCODE_MAC ||
1967 brw_inst_acc_wr_control(devinfo, inst) ||
2038 enum brw_reg_type src0_type = brw_inst_src0_type(devinfo, inst);
2040 num_sources > 1 ? brw_inst_src1_type(devinfo, inst) : src0_type;
2044 ERROR_IF(brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_16 &&
2047 brw_inst_exec_size(devinfo, inst) > BRW_EXECUTE_2,
2061 ERROR_IF(brw_inst_no_dd_check(devinfo, inst) ||
2062 brw_inst_no_dd_clear(devinfo, inst),
2071 const brw_inst *inst)
2082 brw_inst_opcode(isa, inst) == BRW_OPCODE_MUL) {
2083 enum brw_reg_type exec_type = execution_type(isa, inst);
2084 const bool src0_valid = type_sz(brw_inst_src0_type(devinfo, inst)) == 4 ||
2085 brw_inst_src0_reg_file(devinfo, inst) == BRW_IMMEDIATE_VALUE ||
2086 !(brw_inst_src0_negate(devinfo, inst) ||
2087 brw_inst_src0_abs(devinfo, inst));
2088 const bool src1_valid = type_sz(brw_inst_src1_type(devinfo, inst)) == 4 ||
2089 brw_inst_src1_reg_file(devinfo, inst) == BRW_IMMEDIATE_VALUE ||
2090 !(brw_inst_src1_negate(devinfo, inst) ||
2091 brw_inst_src1_abs(devinfo, inst));
2099 if (brw_inst_opcode(isa, inst) == BRW_OPCODE_CMP ||
2100 brw_inst_opcode(isa, inst) == BRW_OPCODE_CMPN) {
2116 ERROR_IF(brw_inst_dst_reg_file(devinfo, inst) == BRW_ARCHITECTURE_REGISTER_FILE &&
2117 brw_inst_dst_da_reg_nr(devinfo, inst) != BRW_ARF_NULL,
2130 ERROR_IF(dst_is_null(devinfo, inst) &&
2131 brw_inst_thread_control(devinfo, inst) != BRW_THREAD_SWITCH,
2137 if (brw_inst_opcode(isa, inst) == BRW_OPCODE_MATH) {
2138 unsigned math_function = brw_inst_math_function(devinfo, inst);
2147 bool src0_valid = !brw_inst_src0_negate(devinfo, inst) &&
2148 !brw_inst_src0_abs(devinfo, inst);
2149 bool src1_valid = !brw_inst_src1_negate(devinfo, inst) &&
2150 !brw_inst_src1_abs(devinfo, inst);
2160 if (brw_inst_opcode(isa, inst) == BRW_OPCODE_DP4A) {
2166 ERROR_IF(src0_is_acc(devinfo, inst) && src1_is_acc(devinfo, inst),
2177 const brw_inst *inst)
2182 if (inst_is_split_send(isa, inst)) {
2184 if (brw_inst_send_sel_reg32_desc(devinfo, inst))
2186 } else if (inst_is_send(isa, inst)) {
2188 if (brw_inst_src1_reg_file(devinfo, inst) != BRW_IMMEDIATE_VALUE)
2194 const uint32_t desc = brw_inst_send_desc(devinfo, inst);
2196 switch (brw_inst_sfid(devinfo, inst)) {
2204 brw_inst_exec_size(devinfo, inst) != BRW_EXECUTE_1,
2212 if (brw_inst_sfid(devinfo, inst) == BRW_SFID_URB) {
2214 ERROR_IF(devinfo->ver > 4 && !brw_inst_header_present(devinfo, inst),
2217 switch (brw_inst_urb_opcode(devinfo, inst)) {
2227 ERROR_IF(brw_inst_urb_global_offset(devinfo, inst) != 0,
2229 ERROR_IF(brw_inst_urb_swizzle_control(devinfo, inst) != 0,
2231 ERROR_IF(brw_inst_urb_used(devinfo, inst) != 0,
2233 ERROR_IF(brw_inst_urb_complete(devinfo, inst) != 0,
2242 ERROR_IF((unsigned)brw_inst_rlen(devinfo, inst) > 1,
2269 ERROR_IF(brw_inst_rlen(devinfo, inst) == 0,
2294 const brw_inst *inst, int offset,
2300 if (is_unsupported_inst(isa, inst)) {
2337 const brw_inst *inst = assembly + src_offset;
2338 bool is_compact = brw_inst_cmpt_control(devinfo, inst);
2344 brw_compact_inst *compacted = (void *)inst;
2346 inst = &uncompacted;
2349 bool v = brw_validate_instruction(isa, inst, src_offset,