[Bug target/36047] -pg does not work on large binaries and m68k
mkuvyrkov at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Nov 4 16:58:00 GMT 2009
------- Comment #4 from mkuvyrkov at gcc dot gnu dot org 2009-11-04 16:57 -------
It appears that 'lea' serves some compatibility purpose. The code is there
since 1995.
Recent GLIBC defines _mcount as
void
_mcount (void)
{
mcount_internal ((u_long)
__builtin_extract_return_addr (__builtin_return_address
(1)),
(u_long)
__builtin_extract_return_addr (__builtin_return_address
(0)));
}
so the value of %a1 is unused. Newlib and uClibc don't define _mcount for m68k
at all.
Andreas, I suggest simply removing the 'lea'; they seem to be no users for it.
Alternatively, for the !PIC case we may use 'lea <label>, %a1' (no pc-relative
relocation) and for the PIC case use a longer sequence, something like: 'move.l
#<label>@PC32, %a1\n add.l (-4, %pc), %a1'.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36047
More information about the Gcc-bugs
mailing list