[avr] gas support for cfi info
Richard Henderson
rth@redhat.com
Wed Feb 16 17:59:00 GMT 2011
On 02/15/2011 02:44 PM, Petr HluzÃn wrote:
> In avr-tdep.c [1] near avr_dwarf_reg_to_regnum():
> /* Unfortunately dwarf2 register for SP is 32. */
Excellent. We're all on the same page for this.
> (I can't help you with the value for #define DWARF2_DEFAULT_RETURN_COLUMN 36)
> AFAIK there is no written ABI. Only the calling convention is
> documented (and only the easy cases), the rest is in gdb/gcc/binutils
> sources and people's heads.
As I recall, GCC defaults to using FIRST_PSEUDO_REGISTER for this,
so as to not overlap any hard registers. I'll continue to so the same.
> /* Avr-6 call instructions save 3 bytes. */
> switch (info.bfd_arch_info->mach)
Thanks. That value is readily available in the assembler as well.
Anitha pointed out to me via gcc pr17994 that AVR uses post-decrement
for its pushes. I had a brief read over the AVR insn manual, and it's
not crystal clear how multi-byte post-decrement pushes operate.
I've made an assumption that it happens as-if each byte is pushed
separately. I.e.
caller: callee:
save rN
save rM
trash <- SP hi(ret) <- CFA
lo(ret)
trash <- SP
This is the only way I can imagine that call insns interoperate with
byte push/pop insns.
All of which means that the return address is at a different offset
from the CFA than I originally thought. This ought to be fixed in
the following.
Can someone please test these two patches and see if they actually
agree with the hardware?
r~
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: z-gas
URL: <https://sourceware.org/pipermail/binutils/attachments/20110216/8eb9d90a/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: z-gcc
URL: <https://sourceware.org/pipermail/binutils/attachments/20110216/8eb9d90a/attachment-0001.ksh>
More information about the Binutils
mailing list