This is the mail archive of the gcc-patches@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]

Re: PR 27528: Expanding constant asm operands


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


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