public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/47602] New: Permit inline asm to clobber PIC register
@ 2011-02-03 19:40 ian at airs dot com
  2011-02-03 19:55 ` [Bug rtl-optimization/47602] " pinskia at gcc dot gnu.org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: ian at airs dot com @ 2011-02-03 19:40 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47602

           Summary: Permit inline asm to clobber PIC register
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ian@airs.com


This fails for i386 32-bit when using -fpic:

void foo() { asm volatile ("movl $0,%%ebx" : : : "ebx"); }

The compiler reports

foo.c:1:14: error: PIC register clobbered by ‘ebx’ in ‘asm’

This forces people to write their asm statements differently for PIC and
non-PIC code.  That is not useful.  The compiler could save and restore the PIC
register around the asm statement.  That would be more useful, and that is what
we should do.


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2015-02-24 20:01 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-03 19:40 [Bug rtl-optimization/47602] New: Permit inline asm to clobber PIC register ian at airs dot com
2011-02-03 19:55 ` [Bug rtl-optimization/47602] " pinskia at gcc dot gnu.org
2011-02-03 23:50 ` ian at airs dot com
2011-02-03 23:52 ` pinskia at gcc dot gnu.org
2011-02-04  0:03 ` [Bug middle-end/47602] " pinskia at gcc dot gnu.org
2011-02-04  0:04 ` pinskia at gcc dot gnu.org
2011-02-04  0:06 ` pinskia at gcc dot gnu.org
2011-02-04  0:08 ` ian at airs dot com
2011-02-04  1:42 ` hjl.tools at gmail dot com
2011-02-04  5:31 ` ian at airs dot com
2011-02-04  8:49 ` ebotcazou at gcc dot gnu.org
2011-02-04 14:16 ` ian at airs dot com
2011-02-04 14:28 ` schwab@linux-m68k.org
2011-02-04 15:02 ` hjl.tools at gmail dot com
2011-02-04 15:23 ` ebotcazou at gcc dot gnu.org
2011-11-25 20:20 ` pcpa at mandriva dot com.br
2011-12-24 16:38 ` kaffeemonster at googlemail dot com
2014-10-13 17:27 ` kyukhin at gcc dot gnu.org
2015-02-24 20:55 ` law at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).