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: PowerPC sim & GDB: use fixed register numbering


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.

Ok,


The old code, which did an under-the-covers call into gdb to map number -> name, was bad and definitly needed to be replaced. The above though could still do with some work - too much on the magic of those numbers in gdb/sim-ppc.h :-(

Anyway, lets first get the enum in place.

Since we've nailed the enum, what should we do about the sim/ppc?


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.

Which is a change from the status quo. That was doing things based on the ISA's register name. Which ever.


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.

Andrew



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