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: [PATCH] Add support for fpscr for Power / PowerPC targets


>  > > For PowerPC, the fpscr regnum is 70, which was an unused slot.  For
>> > Power, I chose to use the first available slot (71).  The other change
>> > that this patch makes is to make MQ unavailable for all PowerPC
>> > targets except for the 601 processors (which is as it should be).
> 
>> 
>> Kevin, is there any reason to not just use the same slot for both POWER 
>> and PowerPC?
> 
> 
> It would be nice if we could, but I don't see how it can be done without
> either
> 
>     1) renumbering some registers for some processors.
> or
>     2) assigning fpscr to a really high slot that's larger than any
>        current register.
> 
> I didn't want to do (1) because existing stubs would likely break. 
> (But see below).
> 
> I didn't want to do (2) because that would introduce a really large
> gap between fpscr and the rest of the registers for most processors. 
> 
> Slot 70 was an unused slot for PowerPC, but it was used for ``mq'' for
> Power.  The next available slot for Power was 71, so that's what I used
> for Power.
> 
> Also, for PowerPC, slot 70 was already in the set of PPC_UISA_SPRS and
> that's exactly where fpscr belongs.
> 
> If we don't mind a minor violation of (1), I could reassign mq to slot 71
> for Power.  That would free up slot 70 so that Power would also have
> fpscr available at the same slot number as PowerPC.  This might be a
> relatively safe thing to do since it's likely that there aren't many
> (any?) existing stubs for the Power architecture.  It'll require some
> adjustments to rs6000-nat.c, but I'm willing to make those adjustments.
> 
> Opinions?

Thanks for explaining this.  I guess just add the above as a comment.

Andrew



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