summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2018-12-07 14:09:25 -0800
committerFrancisco Jerez <[email protected]>2019-10-11 12:24:16 -0700
commit45768e6b3c51aebf052f47dd1c2aca5f17b77ed9 (patch)
tree5e82f347cf6d9dfd524e68214b8449f2f4e734af /src
parentf9ec4ac5a146b4ffbeca078179297f847035ef7f (diff)
intel/eu/validate/gen12: Implement integer multiply restrictions in EU validator.
Due to hardware bug filed as HSDES#1604601757. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/compiler/brw_eu_validate.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/intel/compiler/brw_eu_validate.c b/src/intel/compiler/brw_eu_validate.c
index d0a5ca9e203..068143d0dd0 100644
--- a/src/intel/compiler/brw_eu_validate.c
+++ b/src/intel/compiler/brw_eu_validate.c
@@ -1824,6 +1824,38 @@ special_requirements_for_handling_double_precision_data_types(
return error_msg;
}
+static struct string
+instruction_restrictions(const struct gen_device_info *devinfo,
+ const brw_inst *inst)
+{
+ struct string error_msg = { .str = NULL, .len = 0 };
+
+ /* From GEN:BUG:1604601757:
+ *
+ * "When multiplying a DW and any lower precision integer, source modifier
+ * is not supported."
+ */
+ if (devinfo->gen >= 12 &&
+ brw_inst_opcode(devinfo, inst) == BRW_OPCODE_MUL) {
+ enum brw_reg_type exec_type = execution_type(devinfo, inst);
+ const bool src0_valid = type_sz(brw_inst_src0_type(devinfo, inst)) == 4 ||
+ brw_inst_src0_reg_file(devinfo, inst) == BRW_IMMEDIATE_VALUE ||
+ !(brw_inst_src0_negate(devinfo, inst) ||
+ brw_inst_src0_abs(devinfo, inst));
+ const bool src1_valid = type_sz(brw_inst_src1_type(devinfo, inst)) == 4 ||
+ brw_inst_src1_reg_file(devinfo, inst) == BRW_IMMEDIATE_VALUE ||
+ !(brw_inst_src1_negate(devinfo, inst) ||
+ brw_inst_src1_abs(devinfo, inst));
+
+ ERROR_IF(!brw_reg_type_is_floating_point(exec_type) &&
+ type_sz(exec_type) == 4 && !(src0_valid && src1_valid),
+ "When multiplying a DW and any lower precision integer, source "
+ "modifier is not supported.");
+ }
+
+ return error_msg;
+}
+
bool
brw_validate_instructions(const struct gen_device_info *devinfo,
const void *assembly, int start_offset, int end_offset,
@@ -1855,6 +1887,7 @@ brw_validate_instructions(const struct gen_device_info *devinfo,
CHECK(region_alignment_rules);
CHECK(vector_immediate_restrictions);
CHECK(special_requirements_for_handling_double_precision_data_types);
+ CHECK(instruction_restrictions);
}
if (error_msg.str && disasm) {