Commit 4b06db05 authored by Danylo Piliaiev's avatar Danylo Piliaiev 🇺🇦 Committed by Marge Bot
Browse files

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


Signed-off-by: Danylo Piliaiev's avatarDanylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <mesa/mesa!11431>
parent ba1c9893
......@@ -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));
......
......@@ -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,
......
......@@ -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(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment