This is the mail archive of the gdb-patches@sources.redhat.com 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: Enum constants for sh1-sh4, sh{3}-dsp register numbers in thesimulator


> Index: include/gdb/sim-sh.h
> ===================================================================
> RCS file: /cvs/src/src/include/gdb/sim-sh.h,v
> retrieving revision 1.1
> diff -p -r1.1 sim-sh.h
> *** include/gdb/sim-sh.h	10 May 2002 22:53:56 -0000	1.1
> --- include/gdb/sim-sh.h	15 May 2002 11:55:03 -0000
> *************** extern "C" { // }
> *** 28,33 ****
> --- 28,62 ----
>   
>   enum
>     {
> +     SIM_SH_R0_REGNUM = 0, SIM_SH_R1_REGNUM, SIM_SH_R2_REGNUM, SIM_SH_R3_REGNUM,
> +     SIM_SH_R4_REGNUM, SIM_SH_R5_REGNUM, SIM_SH_R6_REGNUM, SIM_SH_R7_REGNUM,
> +     SIM_SH_R8_REGNUM, SIM_SH_R9_REGNUM, SIM_SH_R10_REGNUM, SIM_SH_R11_REGNUM,
> +     SIM_SH_R12_REGNUM, SIM_SH_R13_REGNUM, SIM_SH_R14_REGNUM, SIM_SH_R15_REGNUM,
> +     SIM_SH_PC_REGNUM, SIM_SH_PR_REGNUM,
> +     SIM_SH_GBR_REGNUM, SIM_SH_VBR_REGNUM,
> +     SIM_SH_MACH_REGNUM, SIM_SH_MACL_REGNUM, SIM_SH_SR_REGNUM,
> +     SIM_SH_FPUL_REGNUM, SIM_SH_FPSCR_REGNUM,
> +     SIM_SH_FR0_REGNUM = 25, /* sh3e / sh4 */
> +     /* sh[3]-dsp */
> +     SIM_SH_DSR_REGNUM = 24,
> +     SIM_SH_A0G_REGNUM, SIM_SH_A0_REGNUM,
> +     SIM_SH_A1G_REGNUM, SIM_SH_A1_REGNUM,
> +     SIM_SH_M0_REGNUM, SIM_SH_M1_REGNUM,
> +     SIM_SH_X0_REGNUM, SIM_SH_X1_REGNUM,
> +     SIM_SH_Y0_REGNUM, SIM_SH_Y1_REGNUM,
> +     SIM_SH_MOD_REGNUM = 40,

One thought.

This is a true enum and not a bunch of constants.  Perhaphs it would be 
better to simply list all the enum members.

I intend doing the same to sim-d10v.h.

However, not my call.  Elena and BenE are the ones with an interest here.

enjoy,
Andrew



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