This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/38479] Incorrect dwarf generated for function with parameters greater 4 words in length


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).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]