New C parser [patch]

Richard Guenther richard.guenther@gmail.com
Wed Oct 27 19:11:00 GMT 2004


On Wed, 27 Oct 2004 11:49:57 -0700, Richard Henderson <rth@redhat.com> wrote:
> On Mon, Oct 25, 2004 at 05:03:31PM -0700, Zack Weinberg wrote:
> > The only way
> > asm() at top level can continue to make sense is if we pass it along
> > to cgraph, and somehow get cgraph to preserve the global order of
> > functions and asm()s.  [Mind you, I would not have any problem with
> > dropping this feature.]
> 
> False.
> 
> ----
> static void doit(int, int);
> 
> __asm__("\
>         .ent doit       \n\
> doit:                   \n\
>         ...             \n\
>         ret             \n\
>         .end doit       \n\
> ");
> 
> void foo(int a)
> {
>   doit(a, a+1);
> }
> ----
> 
> For non-trivial definitions of doit, this can be extremely useful.
> Glibc, for instance, uses this in ld.so.

Why doesn't it use an assembly file then?  You seem to gain nothing
by using gcc inline assembly this way.

Richard.



More information about the Gcc-patches mailing list