On Fri, 10 Jan 2025 at 15:32, Alex Bennée <alex.ben...@linaro.org> wrote: > > Peter Maydell <peter.mayd...@linaro.org> writes: > > > helper.c includes some small TCG helper functions used for mostly > > arithmetic instructions. These are TCG only and there's no need for > > them to be in the large and unwieldy helper.c. Move them out to > > their own source file in the tcg/ subdirectory, together with the > > op_addsub.h multiply-included template header that they use. > > > > Since we are moving op_addsub.h, we take the opportunity to > > give it a name which matches our convention for files which > > are not true header files but which are #included from other > > C files: op_addsub.c.inc. > > > > (Ironically, this means that helper.c no longer contains > > any TCG helper function definitions at all.) > > What's left? It mostly looks like cpreg related stuff. I guess it could > become cpreg.c?
It is mostly cpreg stuff by volume, but if I were going to try to improve the situation I'd start by moving chunks of that out, e.g. the PMU related cpregs and associated code could probably going into their own file, similarly for the generic timer cpregs and code. helper.c also has code like the "take an interrupt" functions for A-profile (arm_cpu_do_interrupt() and the things it calls). -- PMM