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: [RFA] sh-tdep.*: Rename DSP bank registers


On Feb 17 09:44, Elena Zannoni wrote:
> Corinna Vinschen writes:
>  > I'd like to propose the below patch, which renames the used enum
>  > values from R0_BANK_REGNUM and R7_BANK_REGNUM to DSP_R0_BANK_REGNUM
>  > and DSP_R7_BANK_REGNUM respectively.  IMHO, that's less confusing
>  > and allows to use the register bank numbering scheme of non-dsp
>  > CPUs at a later point.
> 
> Interesting, this is what it was originally before your change:
> -  if (nr >= DSP_R0_BANK_REGNUM && nr <= DSP_R7_BANK_REGNUM)
> -    return nr - DSP_R0_BANK_REGNUM + SIM_SH_R0_BANK_REGNUM;
> +  if (nr >= R0_BANK_REGNUM && nr <= R7_BANK_REGNUM)
> +    return nr - R0_BANK_REGNUM + SIM_SH_R0_BANK_REGNUM;

Half a year ago it seemed to be right.  Well... the world keeps turning.

Thanks, applied,
Corinna

-- 
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.


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