public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/38479] Incorrect dwarf generated for function with parameters greater 4 words in length
       [not found] <bug-38479-4@http.gcc.gnu.org/bugzilla/>
@ 2011-07-21  8:56 ` anghelcovici at yahoo dot com
  0 siblings, 0 replies; only message in thread
From: anghelcovici at yahoo dot com @ 2011-07-21  8:56 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38479

--- Comment #6 from Ionut Anghelcovici <anghelcovici at yahoo dot com> 2011-07-21 08:55:46 UTC ---
The problem only occurs when the argument to a function is a 64 bit type and
gcc tries to store it in r3/stack. This creates a different function prolog
than the usual. The reason for this is basically that half of the value is
passed in r3 (the last available register for arguments), and half of it is
passed on the stack. So in this special case, the function prolog starts with:

sub sp, sp, #4

The reason is that gcc wants to allocate space to store the second half of the
64 bit value on the stack as well. So it reserves these additional 4 bytes
first and later writes the other part of the value passed in r3 to this
location. 

However, the debug info generation doesn't take this special case properly into
account so the debugger displays wrong info (also verified this with Trace32).


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-07-21  8:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-38479-4@http.gcc.gnu.org/bugzilla/>
2011-07-21  8:56 ` [Bug target/38479] Incorrect dwarf generated for function with parameters greater 4 words in length anghelcovici at yahoo dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).