This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: SH5 compact register numbering in gcc -> gdb interface


> ac131313@cygnus.com wrote:
> 
>> Humor me here.
>> 
>> How do you use dwarf2 cfi to unwind a compact register (saved on the
>> stack) back to a media register?  In addition to the address of the
>> saved register you'll need to know that only part of the register was
>> saved. Does CFI describe this?
> 
> 
> With the proposed numbering change (2nd revision), we get different
> numbers to describe compact an media registers.  So when only the lower
> 32 bits are saved, gcc can use the SHcompact register number to describe
> this.

Ok.

> N.B., the upper 32 bits of the register are actually overwritten in the
> process.  The restore from the stack sign-extends from bit 31.  The caller
> is responsible to make sure that no 64 bit value is live in the register.	

This is the bit that I'm still missing.  As far as I know dwarf2cfi 
doesn't have stuff to indicate ``sign-extend''.  I guess this would 
still be handled by GDB magic?  (this is what the existing sh5 code 
appears to do.)

enjoy,
Andrew



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