This is the mail archive of the gdb-patches@sourceware.org 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] xtensa: fix access to the last pseudo register


On 05/27/2015 11:55 AM, Max Filippov wrote:
> On Wed, May 27, 2015 at 1:16 PM, Pedro Alves <palves@redhat.com> wrote:
>> On 05/18/2015 12:12 AM, Max Filippov wrote:
>>> Currently access to the last pseudo register is aliased to a1. This is
>>> done by little snippets in the beginning of xtensa_pseudo_register_read
>>> and xtensa_pseudo_register_write that used to do such aliasing for FP
>>> register since bdb4c075a29dd086f0868b394b488b1c94666be6, but then
>>> FP_ALIAS was expanded into gdbarch_num_regs (current_gdbarch) +
>>> gdbarch_num_pseudo_regs (current_gdbarch) (one register past the last
>>> pseudo register) in 304fe2552d6e0821e8fdb7575f8e7ba6607a076d, which
>>> then was changed to the last pseudo register in
>>> 94a0e877111421d300d26b858bd3a0a27078d1e8.
>>
>> IIUC, the original intention was for FP to alias a1, and then through
>> that series of patches (part of old current_gdbarch elimination)
>> we ended up aliasing the wrong register.  Instead of fixing the
>> aliasing, you're just removing it altogether.  Correct?
> 
> I'm removing that aliasing to expose the last pseudoregister.
> After that patch fp pseudo register still exists and it is a read only alias
> for a1. I don't think that's right, because normally frame pointer is a7 or
> a15, depending on ABI, but that's definitely a separate question.

Ah, ok.  FAOD, patch is still OK.  :-)

Thanks,
Pedro Alves


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