sv_binutils: rename opsel to opindex as in binutils
authorDmitry Selyutin <ghostmansd@gmail.com>
Fri, 27 May 2022 12:12:26 +0000 (12:12 +0000)
committerDmitry Selyutin <ghostmansd@gmail.com>
Fri, 27 May 2022 12:12:26 +0000 (12:12 +0000)
src/openpower/sv/sv_binutils.py

index 6bd7c2ebff741d507ea55a3f1d773873d33e9441..603cea2ef65200357b32a33921cf8701f606e0f8 100644 (file)
@@ -507,7 +507,7 @@ class Codegen(_enum.Enum):
 
             for name in ("in1", "in2", "in3", "out", "out2", "cr_in", "cr_out"):
                 yield "unsigned char"
-                yield f"svp64_record_{name}_opsel(const struct svp64_record *record);"
+                yield f"svp64_record_{name}_opindex(const struct svp64_record *record);"
                 yield ""
 
             yield entries.__class__.c_var("svp64_entries",
@@ -536,11 +536,11 @@ class Codegen(_enum.Enum):
             yield "#include \"opcode/ppc-svp64.h\""
             yield ""
 
-            def opsel(enum, name, table):
+            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 f"svp64_record_{name}_opsel(const struct svp64_record *record)"
+                yield f"svp64_record_{name}_opindex(const struct svp64_record *record)"
                 yield "{"
                 yield from indent(["static const unsigned char table[] = {"])
                 for key in enum:
@@ -553,7 +553,7 @@ class Codegen(_enum.Enum):
                 yield "}"
                 yield ""
 
-            yield from opsel(In1Sel, "in1", {
+            yield from opindex(In1Sel, "in1", {
                 In1Sel.RA: "RA",
                 In1Sel.RA_OR_ZERO: "RA",
                 In1Sel.SPR: "SPR",
@@ -561,13 +561,13 @@ class Codegen(_enum.Enum):
                 In1Sel.FRA: "FRA",
                 In1Sel.FRS: "FRS",
             })
-            yield from opsel(In2Sel, "in2", {
+            yield from opindex(In2Sel, "in2", {
                 In2Sel.RB: "RB",
                 In2Sel.SPR: "SPR",
                 In2Sel.RS: "RS",
                 In2Sel.FRB: "FRB",
             })
-            yield from opsel(In3Sel, "in3", {
+            yield from opindex(In3Sel, "in3", {
                 In3Sel.RS: "RS",
                 In3Sel.RB: "RB",
                 In3Sel.FRS: "FRS",
@@ -576,7 +576,7 @@ class Codegen(_enum.Enum):
                 In3Sel.RT: "RT",
             })
             for name in ("out", "out2"):
-                yield from opsel(OutSel, name, {
+                yield from opindex(OutSel, name, {
                     OutSel.RT: "RT",
                     OutSel.RA: "RA",
                     OutSel.SPR: "SPR",
@@ -584,13 +584,13 @@ class Codegen(_enum.Enum):
                     OutSel.FRT: "FRT",
                     OutSel.FRS: "FRS",
                 })
-            yield from opsel(CRInSel, "cr_in", {
+            yield from opindex(CRInSel, "cr_in", {
                 CRInSel.BI: "BI",
                 CRInSel.BFA: "BFA",
                 CRInSel.BC: "CRB",
                 CRInSel.WHOLE_REG: "FXM",
             })
-            yield from opsel(CROutSel, "cr_out", {
+            yield from opindex(CROutSel, "cr_out", {
                 CROutSel.BF: "BF",
                 CROutSel.BT: "BT",
                 CROutSel.WHOLE_REG: "FXM",