From: Lionel Landwerlin Date: Tue, 10 Mar 2020 15:49:30 +0000 (+0200) Subject: intel/decoder: don't consider header fields past dword0 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=25a54554b319ce38dbe11f92cb2447bfb6b5b78f;p=mesa.git intel/decoder: don't consider header fields past dword0 v2: use ULL Signed-off-by: Lionel Landwerlin Reviewed-by: Danylo Piliaiev Tested-by: Marge Bot Part-of: --- 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;