sv_binutils: follow binutils coding style
authorDmitry Selyutin <dmitry.selyutin@3mdeb.com>
Sun, 23 Jan 2022 10:33:30 +0000 (10:33 +0000)
committerDmitry Selyutin <dmitry.selyutin@3mdeb.com>
Sun, 23 Jan 2022 11:01:02 +0000 (11:01 +0000)
src/openpower/sv/sv_binutils.py

index 389e0e3cb247f18aebdb0bd8ab727d6802d65a2a..728a28158e053c001ae589b1f09a453ee6aa1fc6 100644 (file)
@@ -289,7 +289,10 @@ class Codegen(_enum.Enum):
             for (index, entry) in enumerate(entries):
                 yield from indent(entry.c_value(prefix=f"[{index}] = ", suffix=","))
             yield f"}};"
-            yield f"const unsigned int svp64_num_entries = {len(entries)};"
+            yield ""
+
+            yield "const unsigned int svp64_num_entries = \\"
+            yield "    sizeof (svp64_entries) / sizeof (svp64_entries[0]);"
             yield ""
 
         return {