Re: [RFA] sh-tdep.c: optimize fv_reg_base_num and dr_reg_base_num

Corinna Vinschen
2004-02-16T16:00:13Z

On Feb 16 10:28, Elena Zannoni wrote:
> Corinna Vinschen writes:
> > Hi,
> >
> > another optimization which also will simplify the handling of the
> > upcoming SH variant.
> >
> > The functions fv_reg_base_num and dr_reg_base_num are basically
> > one-liner. The expression they evaluate is fairly simple so
> > I'd suggest the following patch. It converts both functions
> > into macros which will be evaluated inline. This has the additional
> > advantage, that the functions in which they are called have access
> > to gdbarch, which comes in handy for the new SH variant.
> >
> > If the conversion into macros is undesired, I'd like to suggest an
> > alternative implementation. In that case I'd like to add gdbarch as
> > first parameter to both functions.
>
> I prefer to not introduce macros here. Can you explain where you are
> headed? This looks like a micro optimization and I don't see the point
> of it ATM.

Gosh, I'm so sorry. I should have cancled this RFA already days ago.
This is a result of the same thinko I talked about in my previous
mail. The (blockheaded) idea was to use another SH_NUM_REGS for the
new CPU variant than for any other SH type. I already scratched that
but I missed to note that here :-(

Corinna

--
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.