v2: use ULL
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4134>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4134>
{
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;