function arguments offset computation with -fomit-frame-pointer
Jim Wilson
wilson@tuliptree.org
Wed Jul 9 08:48:00 GMT 2003
On Wed, 2003-07-09 at 00:47, Bernardo Innocenti wrote:
> However, there must be still a bug somewhere because a Linux kernel
> compiled with -fomit-frame-pointer crashes with bus errors in a place
> I cannot reach with the debugger. I don't have strong evidence on this,
> but I believe one function gets its parameters from the wrong sp offset.
I wouldn't recommend using a kernel as a compiler test. Too hard to
debug miscompilation problems, but maybe if you know the kernel well
enough it is possible. The gcc testsuite is a better test, lots of
small easy to debug testcases.
Your initial_frame_pointer_offset function looks reasonable. There is
probably something subtly wrong here. There are various other things
that may need to be added into the frame size in some cases, for
instance current_function_pretend_args_size, and
current_function_outgoing_args_size. I think these are more applicable
to RISC machines than the m68k though. You will just have to figure out
what is missing.
Isn't the current_function_uses_pic_offset_table check redundant if you
are calling m68k_save_reg, because that function already handles the pic
register.
Jim
More information about the Gcc
mailing list