From 1060715bedd8d39e8b9e5db4a3e039f011e60dc1 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Tue, 12 Apr 2022 16:30:45 +0000 Subject: [PATCH] Revert "sv_binutils: generate register categories mapping" This reverts commit b2943e73797b6544e15ea43a14cf57b2275509d6. --- src/openpower/sv/sv_binutils.py | 51 --------------------------------- 1 file changed, 51 deletions(-) diff --git a/src/openpower/sv/sv_binutils.py b/src/openpower/sv/sv_binutils.py index 8b3dbf6c..e11c9f47 100644 --- a/src/openpower/sv/sv_binutils.py +++ b/src/openpower/sv/sv_binutils.py @@ -334,18 +334,6 @@ class Codegen(_enum.Enum): yield f"#define SVP64_NAME_MAX {max(map(lambda entry: len(entry.name), entries))}" yield "" - yield "enum svp64_reg_category {" - yield " SVP64_REG_CATEGORY_UNKNOWN," - yield " SVP64_REG_CATEGORY_GPR," - yield " SVP64_REG_CATEGORY_FPR," - yield " SVP64_REG_CATEGORY_CR_3BIT," - yield " SVP64_REG_CATEGORY_CR_5BIT," - yield "};" - yield "" - - yield "enum svp64_reg_category" - yield "svp64_reg_category(unsigned char type);" - yield "#ifdef __cplusplus" yield "}" yield "#endif" @@ -371,45 +359,6 @@ class Codegen(_enum.Enum): yield " sizeof (svp64_entries) / sizeof (svp64_entries[0]);" yield "" - yield "#ifndef BC" - yield "#define BC CRB" - yield "#endif" - yield "" - yield "enum svp64_reg_category" - yield "svp64_reg_category(unsigned char type)" - yield "{" - yield " size_t i;" - yield " static struct {" - yield " unsigned char type;" - yield " unsigned char category;" - yield " } const table[] = {" - yield " {BF , SVP64_REG_CATEGORY_CR_3BIT}," - yield " {BFA , SVP64_REG_CATEGORY_CR_3BIT}," - yield " {BA , SVP64_REG_CATEGORY_CR_5BIT}," - yield " {BB , SVP64_REG_CATEGORY_CR_5BIT}," - yield " {BC , SVP64_REG_CATEGORY_CR_5BIT}," - yield " {BI , SVP64_REG_CATEGORY_CR_5BIT}," - yield " {BT , SVP64_REG_CATEGORY_CR_5BIT}," - yield " {RA , SVP64_REG_CATEGORY_GPR}," - yield " {RB , SVP64_REG_CATEGORY_GPR}," - yield " {RC , SVP64_REG_CATEGORY_GPR}," - yield " {RS , SVP64_REG_CATEGORY_GPR}," - yield " {RT , SVP64_REG_CATEGORY_GPR}," - yield " {FRA , SVP64_REG_CATEGORY_FPR}," - yield " {FRB , SVP64_REG_CATEGORY_FPR}," - yield " {FRC , SVP64_REG_CATEGORY_FPR}," - yield " {FRS , SVP64_REG_CATEGORY_FPR}," - yield " {FRT , SVP64_REG_CATEGORY_FPR}," - yield " };" - yield "" - yield " for (i = 0; i < sizeof (table) / sizeof (table[0]); ++i) {" - yield " if (table[i].type == type)" - yield " return (enum svp64_reg_category)table[i].category;" - yield " }" - yield "" - yield " return SVP64_REG_CATEGORY_UNKNOWN;" - yield "}" - return { Codegen.PPC_SVP64_H: ppc_svp64_h, Codegen.PPC_SVP64_OPC_C: ppc_svp64_opc_c, -- 2.30.2