intel: decoder: identify groups with fixed length
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 1 May 2018 21:14:12 +0000 (22:14 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 2 May 2018 16:10:37 +0000 (17:10 +0100)
commit4f128f7850e64829b8b1399ef0bdfd1eec7f4504
tree2d2dbda4bcf300bedbe18112fdebbe12c1e26408
parent3c416a50d8d203115012363b13a4083f1c6de069
intel: decoder: identify groups with fixed length

<register> & <struct> elements always have fixed length. The
get_length() method implies that we're dealing with an instruction in
which the length is encoded into the variable data but the field
iterator uses it without checking what kind of gen_group it is dealing
with.

Let's make get_length() report the correct length regardless of the
gen_group (register, struct or instruction).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/intel/common/gen_decoder.c
src/intel/common/gen_decoder.h