[PATCH 06/40] sim/cris: Move declarations of f_specific_init

Hans-Peter Nilsson hp@bitrange.com
Sat Oct 22 01:46:18 GMT 2022


On Thu, 20 Oct 2022, Tsukasa OI via Binutils wrote:

> Declarations for MY (f_specific_init) functions are defined in CGEN-
> generated header files: sim/cris/decodev10.h (crisv10f_specific_init) and
> sim/cris/decodev32.h (crisv32f_specific_init).  However, those declarations
> are manually added by the commit 4e6e8ba7c565 ("sim: cris: clean up missing
> func prototype warnings") as a hack and not a CGEN-generated part.
> 
> Those definitions are required by $(builddir)/sim/cris/mloopv{10,32}f.c,
> generated from $(srcdir)/sim/cris/mloop.in.  If we define a declaration in
> mloop.in, we no longer need manually added one.
> 
> This commit adds a template for function declaration so that we no longer
> have to touch CGEN-generated code.  With this and the previous commit
> "cpu/cris: Add stall unit to CRIS v32", we can now safely regenerate
> CRIS CPU declarations with CGEN.
> ---
>  sim/cris/cris-tmpl.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/sim/cris/cris-tmpl.c b/sim/cris/cris-tmpl.c
> index 9f0c06e755e..8694d38b2af 100644
> --- a/sim/cris/cris-tmpl.c
> +++ b/sim/cris/cris-tmpl.c
> @@ -264,6 +264,8 @@ MY (make_thread_cpu_data) (SIM_CPU *current_cpu, void *context)
>  
>  /* Hook function for per-cpu simulator initialization.  */
>  
> +extern void MY (f_specific_init) (SIM_CPU *);
> +
>  void
>  MY (f_specific_init) (SIM_CPU *current_cpu)
>  {
> -- 
> 2.34.1
> 
> 

Ok, thanks.

brgds, H-P


More information about the Binutils mailing list