avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (fwd) [avr-gcc-list] RFC: ATmega256x and 16-bit function pointers


From: Marek Michalkiewicz
Subject: Re: (fwd) [avr-gcc-list] RFC: ATmega256x and 16-bit function pointers
Date: Sat, 19 Mar 2005 22:00:53 +0100
User-agent: Mutt/1.5.6+20040907i

On Sat, Mar 19, 2005 at 07:19:06PM +0100, address@hidden wrote:

> You tackle a question I've encountered when I first say the
> -mcall-prologues code. Why is the prologue sequence not jumped to via
> CALL? It would be somewhat shorter to use CALL, then pop the return
> address off the stack at the beginning of the called prologue. And it
> solves your problem, just a pop-to-eind has to be added to the
> prologue.

The problem is that the jump can be to any of the PUSH instructions
at the beginning of __prologue_saves__ - not necessarily the first one
(if fewer registers need to be pushed).  With CALL, you would have to
pop the return address before pushing anything.

So, -mcall-prologues will probably not be supported at all on the
ATmega256x - its goal was to reduce code size (at the cost of speed)
which was most important on the small chips.  I still need to figure
out how to get the mangled function name, to fix -mcall-prologues in
C++ and to implement the function entry points in low 64K words.

Marek




reply via email to

[Prev in Thread] Current Thread [Next in Thread]