This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/66334] cleanup block fails to initialize EBX
- From: "vmakarov at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 03 Jul 2015 21:04:42 +0000
- Subject: [Bug middle-end/66334] cleanup block fails to initialize EBX
- Auto-submitted: auto-generated
- References: <bug-66334-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66334
--- Comment #9 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to H.J. Lu from comment #8)
> (In reply to Vladimir Makarov from comment #7)
> > I've looked at this. Insn 34 is transformed into
> >
> > ebx=ebx
> >
> > as pseudo 87 gets ebx. At the very end. LRA removes the useless insn.
> > Therefore there is no insn setting ebx.
> >
> > H.J., is it really a problem?
>
> The problem is although ebx, which is used for PIC, is callee saved, but
> ebx has junk when called from BUILT_IN_UNWIND_RESUME. LRA should
> reinitialize it.
I see. It would be nice that eh machinary saved ebx. But even if it is done,
we would have compatibility problem with already existing code. So there is no
other way than fixing it GCC.
I guess it is a continuation of work to use PIC hard reg by introducing PIC
pseudo. PIC pseudo should conflict with PIC hard reg because ebx can be
corrupted in this case. So in general your solution proposal is right but it
needs more details.
I will work on the patch and commit it on next week.
Thanks.