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

Re: [openrisc] Function prologue and stack frame



Hi Carlos!

> It seems to me that there are some inconsistences between the prologue that
> GCC introduces and what GDB expects to find at the beginning of functions.
> I've looked at source code, and or32_output_file (in GCC sources, or32.c)
> and or1k_skip_prologue (GDB sources, or1k-tdep.c) simply don't match.
> Moreover, the prologue format expected by the mentioned or1k_skip_prologue
> and by or1k_frame_chain (also from GDB sources) is not the same.
Yes, function prologues/epilogues were changed many times, since the original 
(in the manual) had problems. Note that specifications for this are very 
strict, and can cause lot of problems with OS development. As it did in our 
case ;)
And I was doing gdb somewhere in the middle ;)

Can you please post the differences, so we can choose the prologue we are 
happy with. I know Simon did a most of work on this when he was doing uClinux 
port.

> On the other hand, the stack frame format depicted on the OpenRISC
> Architecture Manual is different to the one created by the code actually
> inserted by GCC. The latter puts local variables just below FP, and
> previous FP and return address below those.
>
> I think these could be the cause of the "found function without prologue"
> errors posted in the forum some weeks ago. I would like to know whether
> someone has reached similar conclussions (or just tell me if you think I'm
> wrong ;-) ).

I guess you are not wrong ;)

best regards,
Marko

--
To unsubscribe from openrisc mailing list please visit http://www.opencores.org/mailinglists.shtml