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
This commit is contained in:
Aidan MacDonald 2025-01-27 08:58:27 +00:00 committed by Solomon Peachy
parent cffd158ace
commit f50455f6a7

View file

@ -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";