summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/intel/common/gen_decoder.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/intel/common/gen_decoder.c b/src/intel/common/gen_decoder.c
index 97e8f168228..d07962a0b97 100644
--- a/src/intel/common/gen_decoder.c
+++ b/src/intel/common/gen_decoder.c
@@ -1208,10 +1208,12 @@ gen_field_is_header(struct gen_field *field)
{
uint32_t bits;
- if (field->start >= 32)
+ /* Instructions are identified by the first DWord. */
+ if (field->start >= 32 ||
+ field->end >= 32)
return false;
- bits = (1U << (field->end - field->start + 1)) - 1;
+ bits = (1ULL << (field->end - field->start + 1)) - 1;
bits <<= field->start;
return (field->parent->opcode_mask & bits) != 0;