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 middle-end/66334] cleanup block fails to initialize EBX


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.


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