sv_binutils: use ppc_opindex_t instead of unsigned char
authorDmitry Selyutin <ghostmansd@gmail.com>
Wed, 1 Jun 2022 11:05:00 +0000 (11:05 +0000)
committerDmitry Selyutin <ghostmansd@gmail.com>
Wed, 1 Jun 2022 11:05:00 +0000 (11:05 +0000)
src/openpower/sv/sv_binutils.py

index 6f2aea9f4f1925b12c6baa26acdf8bada4e2b674..37d170e66d5f728358654dc0da6e9f803fce8663 100644 (file)
@@ -506,7 +506,7 @@ class Codegen(_enum.Enum):
                 yield ""
 
             for name in ("in1", "in2", "in3", "out", "out2", "cr_in", "cr_out"):
-                yield "unsigned char"
+                yield "ppc_opindex_t"
                 yield f"svp64_record_{name}_opindex(const struct svp64_record *record);"
                 yield ""
 
@@ -539,10 +539,10 @@ class Codegen(_enum.Enum):
             def opindex(enum, name, table):
                 sep = (max(map(len, list(table.values()) + ["UNUSED"])) + 1)
                 c_tag = f"svp64_{enum.__name__.lower()}"
-                yield "unsigned char"
+                yield "ppc_opindex_t"
                 yield f"svp64_record_{name}_opindex(const struct svp64_record *record)"
                 yield "{"
-                yield from indent(["static const unsigned char table[] = {"])
+                yield from indent(["static const ppc_opindex_t table[] = {"])
                 for key in enum:
                     value = table.get(key, "UNUSED")
                     c_value = f"{c_tag.upper()}_{key.name.upper()}"