diff options
author | Kenneth Graunke <[email protected]> | 2017-05-15 16:53:25 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-06-01 11:49:45 -0700 |
commit | df2d55ba57dec857e4fb36ba3d9ec86aa3a46cd5 (patch) | |
tree | 7b6c71d2fa5ebb2dc4d1660d2715860b8cf27c6c /src/intel/genxml | |
parent | 845d07978f8eef9b87b952c430edcb8c2b50b1b5 (diff) |
genxml: Fix parsing of address fields in groups.
For example,
<group count="4" start="64" size="64">
<field name="Pointer" start="5" end="63" type="address"/>
</group>
used to generate:
const uint64_t v2_address =
__gen_combine_address(data, &dw[2], values->Pointer, 0);
...
const uint64_t v4_address =
__gen_combine_address(data, &dw[4], values->Pointer, 0);
...
but now generates code with proper subscripts:
const uint64_t v2_address =
__gen_combine_address(data, &dw[2], values->Pointer[0], 0);
...
const uint64_t v4_address =
__gen_combine_address(data, &dw[4], values->Pointer[1], 0);
...
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/genxml')
-rw-r--r-- | src/intel/genxml/gen_pack_header.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intel/genxml/gen_pack_header.py b/src/intel/genxml/gen_pack_header.py index 020dbe40a60..fefbc9aeccb 100644 --- a/src/intel/genxml/gen_pack_header.py +++ b/src/intel/genxml/gen_pack_header.py @@ -467,13 +467,13 @@ class Group(object): if dw.size == 32: if dw.address: - print(" dw[%d] = __gen_combine_address(data, &dw[%d], values->%s, %s);" % (index, index, dw.address.name, v)) + print(" dw[%d] = __gen_combine_address(data, &dw[%d], values->%s, %s);" % (index, index, dw.address.name + field.dim, v)) continue if dw.address: v_address = "v%d_address" % index print(" const uint64_t %s =\n __gen_combine_address(data, &dw[%d], values->%s, %s);" % - (v_address, index, dw.address.name, v)) + (v_address, index, dw.address.name + field.dim, v)) v = v_address print(" dw[%d] = %s;" % (index, v)) |