diff options
author | Lionel Landwerlin <[email protected]> | 2017-03-01 14:39:58 +0000 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2017-04-04 21:22:26 +0100 |
commit | e8d9b76f6390459b2f7e2aa6ae8b74275f66c791 (patch) | |
tree | 22f197c8cd1c75369c0125bd68f37b87032df1cf /src/intel/common/gen_decoder.c | |
parent | 567d77885e8579486354843e7280428dc96d4bd9 (diff) |
intel: tools: add aubinator_error_decode tool
This is pretty much the same tool as what i-g-t has, only with a more
fancy decoding of the instructions/registers. It also doesn't support
anything before gen4.
v2 (from Matt): Drop authors
Remove undefined automake variable
v3: Fix incorrect offsets for dword > 1 (Jordan)
v4: Fix decompression error with large blobs (Jordan)
Signed-off-by: Lionel Landwerlin <[email protected]>
Acked-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/intel/common/gen_decoder.c')
-rw-r--r-- | src/intel/common/gen_decoder.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/intel/common/gen_decoder.c b/src/intel/common/gen_decoder.c index 6cc6896b057..1ae78c88e3f 100644 --- a/src/intel/common/gen_decoder.c +++ b/src/intel/common/gen_decoder.c @@ -108,6 +108,17 @@ gen_spec_find_register(struct gen_spec *spec, uint32_t offset) return NULL; } +struct gen_group * +gen_spec_find_register_by_name(struct gen_spec *spec, const char *name) +{ + for (int i = 0; i < spec->nregisters; i++) { + if (strcmp(spec->registers[i]->name, name) == 0) + return spec->registers[i]; + } + + return NULL; +} + struct gen_enum * gen_spec_find_enum(struct gen_spec *spec, const char *name) { |