[Mesa-dev] [PATCH 10/33] intel: decoder: expose helper to test header fields

Lionel Landwerlin lionel.g.landwerlin at intel.com
Mon Oct 30 16:58:23 UTC 2017


These fields are of little importance as they're used to recognize
instructions.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
 src/intel/common/gen_decoder.c | 6 +++---
 src/intel/common/gen_decoder.h | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/intel/common/gen_decoder.c b/src/intel/common/gen_decoder.c
index c1affc47a02..f8fca28a18b 100644
--- a/src/intel/common/gen_decoder.c
+++ b/src/intel/common/gen_decoder.c
@@ -963,8 +963,8 @@ print_dword_header(FILE *outfile,
            offset + 4 * dword, iter->p[dword], dword);
 }
 
-static bool
-is_header_field(struct gen_group *group, struct gen_field *field)
+bool
+gen_group_header_is_header(struct gen_group *group, struct gen_field *field)
 {
    uint32_t bits;
 
@@ -991,7 +991,7 @@ gen_print_group(FILE *outfile, struct gen_group *group,
             print_dword_header(outfile, &iter, offset, i);
          last_dword = iter.dword;
       }
-      if (!is_header_field(group, iter.field)) {
+      if (!gen_group_header_is_header(group, iter.field)) {
          fprintf(outfile, "    %s: %s\n", iter.name, iter.value);
          if (iter.struct_desc) {
             uint64_t struct_offset = offset + 4 * iter.dword;
diff --git a/src/intel/common/gen_decoder.h b/src/intel/common/gen_decoder.h
index 4d9edf78ff0..86ececeb8b1 100644
--- a/src/intel/common/gen_decoder.h
+++ b/src/intel/common/gen_decoder.h
@@ -50,6 +50,7 @@ int gen_group_get_length(struct gen_group *group, const uint32_t *p);
 const char *gen_group_get_name(struct gen_group *group);
 uint32_t gen_group_get_opcode(struct gen_group *group);
 struct gen_enum *gen_spec_find_enum(struct gen_spec *spec, const char *name);
+bool gen_group_header_is_header(struct gen_group *group, struct gen_field *field);
 
 struct gen_field_iterator {
    struct gen_group *group;
-- 
2.15.0.rc2



More information about the mesa-dev mailing list