sv_binutils: remove separate CRs table
authorDmitry Selyutin <ghostmansd@gmail.com>
Thu, 28 Jul 2022 13:34:11 +0000 (16:34 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Thu, 28 Jul 2022 13:34:17 +0000 (16:34 +0300)
src/openpower/sv/sv_binutils.py

index baa8241233432e70cd827eef0f923c9649997862..1f5d6a7fe5aca97b0cff5ade56dc4cf965dc19c4 100644 (file)
@@ -524,10 +524,6 @@ class Codegen(_enum.Enum):
             yield Size.c_var("svp64_num_regs", prefix="extern const ", suffix=";")
             yield ""
 
-            yield "extern const struct powerpc_pd_reg svp64_cr_regs[];"
-            yield Size.c_var("svp64_num_cr_regs", prefix="extern const ", suffix=";")
-            yield ""
-
             yield "#ifdef __cplusplus"
             yield "}"
             yield "#endif"
@@ -685,27 +681,6 @@ class Codegen(_enum.Enum):
             yield from indent(num_regs.c_value(suffix=";"))
             yield ""
 
-            yield "const struct powerpc_pd_reg svp64_cr_regs[] = {"
-            regs = {
-                "eq": (2, "PPC_OPERAND_CR_BIT"),
-                "gt": (1, "PPC_OPERAND_CR_BIT"),
-                "lt": (0, "PPC_OPERAND_CR_BIT"),
-                "so": (3, "PPC_OPERAND_CR_BIT"),
-                "un": (3, "PPC_OPERAND_CR_BIT"),
-            }
-            for index in range(128):
-                regs[f"cr{index}"] = (index, "PPC_OPERAND_CR_REG")
-            for (name, (index, flags)) in sorted(regs.items()):
-                yield from indent([f"{{\"{name}\", {index}, {flags}}},"])
-            yield "};"
-            yield ""
-
-            num_regs = Size("(sizeof (svp64_cr_regs) / sizeof (svp64_cr_regs[0]))")
-            yield Size.c_var("svp64_num_cr_regs",
-                        prefix="const ", suffix=" = \\")
-            yield from indent(num_regs.c_value(suffix=";"))
-            yield ""
-
 
         records = Record[...](records)
         num_records = Size("(sizeof (svp64_records) / sizeof (svp64_records[0]))")