This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/47602] Permit inline asm to clobber PIC register
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 4 Feb 2011 01:42:13 +0000
- Subject: [Bug middle-end/47602] Permit inline asm to clobber PIC register
- Auto-submitted: auto-generated
- References: <bug-47602-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47602
--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> 2011-02-04 01:42:03 UTC ---
(In reply to comment #6)
>
> I can not find any discussion about fixing this issue in any way other than
> forbidding it.
>
EBX is fixed in PIC. If it is changed in asm, it should be saved and
restored in asm. Otherwise, non-leaf functions may not work properly
even if it is saved/restored in prologue/epilogue.