PR 27528: Expanding constant asm operands

Richard Sandiford richard@codesourcery.com
Mon Dec 11 22:22:00 GMT 2006


Eric Botcazou <ebotcazou@libertysurf.fr> writes:
>> Does everything still work with empty asm strings?  I found the
>> commented stuff useful for debugging, but it probably isn't much
>> use for testing purposes.
>
> I'm not sure I undertand: what should I try to remove?
>
>   asm volatile ("# %0 %1" :: "s" (x), "i" (x));
>   /* At the time of writing, &x[1] is decomposed before reaching expand
>      when compiling with -O0.  */
>   asm volatile ("# %0 %1" :: "s" ("string"), "i" ("string"));
>   asm volatile ("# %0 %1" :: "s" (__FILE__), "i" (__FILE__));
>   asm volatile ("# %0 %1" :: "s" (__FUNCTION__), "i" (__FUNCTION__));

s/"# %0 %1"/""/.  My understanding was that gcc wouldn't try to
drop operands that don't appear in the template.

Richard



More information about the Gcc-patches mailing list