This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add micromips support to the MIPS simulator


On 21 Jan 2015 12:44, Andrew Bennett wrote:

the igen files i pretty much skimmed over

> --- a/sim/mips/Makefile.in
> +++ b/sim/mips/Makefile.in
>
>  support.o: sim-main.h support.c $(SIM_EXTRA_DEPS)
>  idecode.o: sim-main.h idecode.c $(SIM_EXTRA_DEPS)
>  itable.o: sim-main.h itable.c $(SIM_EXTRA_DEPS)
> -m16run.o: sim-main.h m16_idecode.h m32_idecode.h $(SIM_EXTRA_DEPS)
> +m16run.o: sim-main.h m16_idecode.h m32_idecode.h m16run.c $(SIM_EXTRA_DEPS)
> +micromipsrun.o: sim-main.h micromips16_idecode.h micromips32_idecode.h \
> +	micromips_m32_idecode.h micromipsrun.c $(SIM_EXTRA_DEPS)

pretty sure you don't need any of this hand maintained dependency info anymore.  
can you please try deleting it all instead ?

> --- a/sim/mips/configure.ac
> +++ b/sim/mips/configure.ac
>
> +      *:*micromips32*:*)
> +	# Run igen thrice, once for micromips32, once for micromips16,
> +        # and once for m32.
> +	ws="micromips_m32 micromips16 micromips32"

indentation is broken slightly on the second comment line.  seems to come up a 
few times ... you should fix them all.

> --- a/sim/mips/interp.c
> +++ b/sim/mips/interp.c
>  
> +/* microMIPS ISA mode */
> +int isa_mode;

why is this a global instead of being part of the sim state ?

the comment also needs tweaking to match GNU style

> --- /dev/null
> +++ b/sim/mips/micromipsrun.c
>
> +/*  Run function for the micromips simulator
> +
> +    Copyright (C) 2005-2013 Free Software Foundation, Inc.

years needs updating

> +    This file is part of GDB, the GNU debugger.

i think you mean:
	This file is part of the GNU simulators.

> +#define SD sd
> +#define CPU cpu

unused ?

> +void
> +sim_engine_run (SIM_DESC sd, int next_cpu_nr, int nr_cpus, int signal);

you should include sim-engine.h instead of declaring the prototype yourself
-mike

Attachment: signature.asc
Description: Digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]