From 45b8c139d7cbeee041553373b4cf06f8af1ae3e7 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sun, 23 Jan 2022 11:45:01 +0000 Subject: [PATCH] sv_binutils: determine the longest name --- src/openpower/sv/sv_binutils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/openpower/sv/sv_binutils.py b/src/openpower/sv/sv_binutils.py index 7d6c1bab..5a484f78 100644 --- a/src/openpower/sv/sv_binutils.py +++ b/src/openpower/sv/sv_binutils.py @@ -270,6 +270,9 @@ class Codegen(_enum.Enum): yield "extern const unsigned int svp64_num_entries;" yield "" + yield f"#define SVP64_NAME_MAX {max(map(lambda entry: len(entry.name), entries))}" + yield "" + yield "#ifdef __cplusplus" yield "}" yield "#endif" -- 2.30.2