This is the mail archive of the gcc-patches@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]

Re: fix alpha glibc miscompilation


Richard Henderson <rth@redhat.com> writes:

>   * This results in two blocks containing calls, one of
>     which then branches to the join block containing the
>     gp-reload.  It is this path containing the branch that
>     is incorrect -- the gp-reload is pc-relative and is
>     fed the return address from the function; the first
>     insn of the gp-reload must *immediately* follow the call.

I guess I'm missing something, but can't one just mark the call with a
label and add an offset to the reload which is the difference between
the label and the instruction pointer? I think the relocator can take
existing nonzero offsets into account.

-- 
	Falk


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