[cfe-commits] r47850 - /cfe/trunk/Headers/mmintrin.h

Fariborz Jahanian fjahanian at apple.com
Tue Mar 4 14:13:18 PST 2008


On Mar 4, 2008, at 1:39 PM, Chris Lattner wrote:

> On Mar 3, 2008, at 7:41 PM, Eli Friedman wrote:
>>>> Actually, I just realized an issue with the current implementation:
>>>> shouldn't the functions in mmintrin.h actually be static inline?
>>>
>>> No, that won't work for C99+, as that then prevents these routines
>>> from being used in inline functions.  :-(  For non-c99 languages,
>>> yes,
>>> I'd argue that static inline is the right choice.
>>
>> Ah, I forgot... yeah, that sucks.  Then I guess we should mark them
>> "extern inline __attribute__((weak))"?  Just plain inline means that
>> we can't in general generate the right thing.  Or we could cheat and
>> add a "ignore_c99_6_7_4_3_restrictions" attribute.
>
> Wouldn't something like this be fine:
>
> __inline __m64 __attribute__((__always_inline__, __nodebug__))
> _mm_cvtsi32_si64 (int __i) { ... }

Did __nodebug__ attribute get into the FSF's version of gcc? I  
implemented it locally. But FSF did not like it for one reason or the  
other (I think had to do dwarf vs staff thing). So, this attribute may  
or may not be in the fsf branch. For local folks, this was radar  
4152603.

- Fariborz




More information about the cfe-commits mailing list