This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: allow certain kinds of inputs to top level asm()-s
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jan Beulich <JBeulich at novell dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 6 Jul 2010 10:12:56 +0200
- Subject: Re: allow certain kinds of inputs to top level asm()-s
- References: <4C32F9BA0200007800009ABF@vpn.id2.novell.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Jul 06, 2010 at 08:39:06AM +0100, Jan Beulich wrote:
> This is so that use of symbols referenced in these asm()-s can be
> properly tracked by the compiler, just like is the case for all other
> asm()-s. I'm particularly looking forward to use this in the Linux
> kernel.
I'd say it is a bad idea to have in this case the input arguments after
first :, there should be two :'s before those. You can of course for
toplevel asms require that there are no output operands (like we already do
require e.g. for asm goto).
Also note that address of symbols with "i" constraint might not work on all
targets, certainly won't work on many targets with -fpic/-fPIC (so the
testcase needs to be guarded with { target !fpic } or something similar).
It might not even work on some targets where -fpic/-fPIC is the default.
Jakub