intel/decoder: Expose the raw field value in the iterator
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 13 Dec 2017 16:23:50 +0000 (08:23 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 14 Dec 2017 21:27:09 +0000 (13:27 -0800)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/common/gen_decoder.c
src/intel/common/gen_decoder.h

index 4f373a371ee19879ddfeb10e06178128111d8476..87a81b4b05a87d589a6f9cae0916d5508a796c63 100644 (file)
@@ -889,10 +889,11 @@ iter_decode_field(struct gen_field_iterator *iter)
 
    memset(&v, 0, sizeof(v));
 
-   v.qw = iter_decode_field_raw(iter);
+   iter->raw_value = iter_decode_field_raw(iter);
 
    const char *enum_name = NULL;
 
+   v.qw = iter->raw_value;
    switch (iter->field->type.kind) {
    case GEN_TYPE_UNKNOWN:
    case GEN_TYPE_INT: {
index 37eebd7fcee8e9f0e739d634547a85c8f195bdcc..fe3cf273ed6ee85c25fbebaf62f98a0188b5b771 100644 (file)
@@ -67,6 +67,7 @@ struct gen_field_iterator {
    struct gen_group *group;
    char name[128];
    char value[128];
+   uint64_t raw_value;
    struct gen_group *struct_desc;
    const uint32_t *p;
    int p_bit; /**< bit offset into p */