From 0302519f1ce16e9c0002080012303ba889cf71b0 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 30 Sep 2022 21:04:11 -0400 Subject: [PATCH] asahi/genxml: Defeature uint/float Unused, relic from panfrost and not in upstream genxml. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/lib/gen_pack.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/asahi/lib/gen_pack.py b/src/asahi/lib/gen_pack.py index c0a4b25881e..f922967c2ec 100644 --- a/src/asahi/lib/gen_pack.py +++ b/src/asahi/lib/gen_pack.py @@ -229,7 +229,7 @@ class Field(object): type = 'uint64_t' elif self.type == 'int': type = 'int32_t' - elif self.type in ['uint', 'uint/float', 'hex']: + elif self.type in ['uint', 'hex']: type = 'uint32_t' elif self.type in self.parser.structs: type = 'struct ' + self.parser.gen_prefix(safe_name(self.type.upper())) @@ -459,7 +459,7 @@ class Group(object): args.append(str(fieldref.start)) args.append(str(fieldref.end)) - if field.type in set(["uint", "uint/float", "address", "hex"]) | self.parser.enums: + if field.type in set(["uint", "address", "hex"]) | self.parser.enums: convert = "__gen_unpack_uint" elif field.type == "int": convert = "__gen_unpack_sint" @@ -519,8 +519,6 @@ class Group(object): print(' fprintf(fp, "%*s{}: 0x%" PRIx64 "\\n", indent, "", {});'.format(name, val)) elif field.type == "hex": print(' fprintf(fp, "%*s{}: 0x%" PRIx32 "\\n", indent, "", {});'.format(name, val)) - elif field.type == "uint/float": - print(' fprintf(fp, "%*s{}: 0x%X (%f)\\n", indent, "", {}, uif({}));'.format(name, val, val)) else: print(' fprintf(fp, "%*s{}: %u\\n", indent, "", {});'.format(name, val))