Cross-module inlining in gdc

Mike Farnsworth mike.farnsworth at gmail.com
Wed Feb 9 12:20:22 PST 2011


Trass3r Wrote:

> > // Assume __v4sf is defined by the compiler
> > pragma(set_attribute, _mm_add_ps, always_inline, artificial);
> > __v4sf _mm_add_ps (__v4sf __A, __v4sf __B)
> > {
> >     return __builtin_ia32_addps(__A, __B);
> > }
> 
> 2 notes:
> Isn't it pragma(GNU_set_attribute?
> 
> And you should be able to do
> pragma(GNU_attribute, always_inline, artificial)
> __v4sf _mm_add_ps....
> 
> as well.

That's the syntax that ibuclaw gave me, and it does indeed work.  GNU_set_attribute is deprecated now, as far as I know (from spelunking through the code).

-Mike



More information about the D.gnu mailing list