From: Dmitry Selyutin Date: Sun, 23 Jan 2022 11:45:01 +0000 (+0000) Subject: sv_binutils: determine the longest name X-Git-Tag: sv_maxu_works-initial~541 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=45b8c139d7cbeee041553373b4cf06f8af1ae3e7;p=openpower-isa.git sv_binutils: determine the longest name --- 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"