This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: preprocessor: % as args to #defines
Geoff Keating <geoffk@geoffk.org> writes:
> Ian Lance Taylor <ian@wasabisystems.com> writes:
>
> > While acknowledging that inline assembler is a fertile source of
> > problems, I would say that gcc's support for inline assembler is one
> > of the main reasons that gcc is useful in compiling for embedded
> > systems and kernels. It permits scheduling of assembler code,
>
> I'm sure you meant another word here, not 'scheduling'. One of the
> best reasons not to use inline asm is that it can't be scheduled.
Mea culpa. It can be rearranged, hoisted, duplicated, eliminated,
etc., but it can't actually be scheduled.
And Jim was quite correct to point out that intrinsics are actually a
better solution, assuming somebody is patient enough to enter and
document all the appropriate instructions, and add the features
required to support stuff like the carry flag which can not be
expressed in C.
Ian