freedreno/isa: add uoffset type to print positive-only offsets

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11431>
This commit is contained in:
Danylo Piliaiev
2021-06-18 18:09:01 +03:00
committed by Marge Bot
parent ba1c989348
commit 4b06db0548
3 changed files with 8 additions and 2 deletions
+5
View File
@@ -540,6 +540,11 @@ display_field(struct decode_scope *scope, const char *field_name)
fprintf(out, "%+"PRId64, util_sign_extend(val, width));
}
break;
case TYPE_UOFFSET:
if (val != 0) {
fprintf(out, "+%"PRIu64, val);
}
break;
case TYPE_FLOAT:
if (width == 16) {
fprintf(out, "%f", _mesa_half_to_float(val));
+2 -1
View File
@@ -89,7 +89,8 @@ struct isa_field {
TYPE_INT,
TYPE_UINT,
TYPE_HEX,
TYPE_OFFSET, /* Like INT but formated with +/- or ommited if ==0 */
TYPE_OFFSET, /* Like INT but formated with +/- or omitted if ==0 */
TYPE_UOFFSET, /* Like UINT but formated with + or omitted if ==0 */
TYPE_FLOAT,
TYPE_BOOL,
TYPE_ENUM,
+1 -1
View File
@@ -449,7 +449,7 @@ class ISA(object):
def validate_isa(self):
# Validate that all bitset fields have valid types, and in
# the case of bitset type, the sizes match:
builtin_types = ['branch', 'int', 'uint', 'hex', 'offset', 'float', 'bool', 'enum']
builtin_types = ['branch', 'int', 'uint', 'hex', 'offset', 'uoffset', 'float', 'bool', 'enum']
for bitset_name, bitset in self.bitsets.items():
if bitset.extends is not None:
assert bitset.extends in self.bitsets, "{} extends invalid type: {}".format(