From f50455f6a72d2390d77c925355299a963d73825c Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Mon, 27 Jan 2025 08:58:27 +0000 Subject: [PATCH] headergen_v2: increase macro argument limit to 20 When registers have lot of 1- and 2-bit fields it's possible to exceed the 13 argument limit. Usually this only shows up when programming a configuration register, but it's annoying to have to split up the write. 20 arguments should be enough to avoid that. Change-Id: I6240fae4a51ae14600afcfb8a4e3f1e983cbffa6 --- utils/regtools/headergen_v2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/regtools/headergen_v2.cpp b/utils/regtools/headergen_v2.cpp index f8614f8174..97197ccce8 100644 --- a/utils/regtools/headergen_v2.cpp +++ b/utils/regtools/headergen_v2.cpp @@ -1459,7 +1459,7 @@ bool common_generator::generate_macro_header(error_context_t& ectx) * and more n>=2, using multiple layers of macros: * __VAR_ORn(pre, s01, s02, ..., sn) expands to pre##s01 | .. | pre##sn */ std::string var_or = "__VAR_OR"; - const int MAX_N = 13; + const int MAX_N = 20; fout << "#define " << var_or << "1(prefix, suffix) \\\n"; fout << " (prefix##suffix)\n";