Re: RFA: PowerPC sim & GDB: use fixed register numbering

Jim Blandy
2004-08-04T17:13:45Z

Andrew Cagney <cagney@gnu.org> writes:
> > Andrew Cagney <cagney@gnu.org> writes:
> >
> >>> Have a look at the other sim-*.h files, you'll notice that most define
> >>> an enum namespace and not a series of magic constants. Can we expand
> >>> the table so that the constants aren't needed?
> > Is this going in the right direction?
>
> Yes, that should go in.

Okay, committed. Thanks to you and Kevin for the review.

> What's your plan with SPRs?

I think it's best to use the SPR numbers assigned by the ISA to
identify them. Trying to keep tables based on automatically assigned
enum values in sync would take a lot of work, for little gain, since
ISA SPR numbers are (obviously) unambiguous within any particular PPC
variant.

At the moment, the sim doesn't support any SPRs from different PPC
variants whose numbers clash. There'll be work needed there to handle
that; I don't have any particular insights there.