Re: FreeBSD 9.0-CUR/amd64 CLANG: howto use gcc __builtin_ia32?

From: O. Hartmann <ohartman_at_zedat.fu-berlin.de>
Date: Thu, 16 Jun 2011 09:04:11 +0200
On 06/15/11 20:36, Doug Rabson wrote:
> You could try using the standard<xmmintrin.h>  header - that has inline
> functions which should cover all the SSE instructions.
>
> On 12 June 2011 17:43, Hartmann, O.<ohartman_at_zedat.fu-berlin.de>  wrote:
>
>> I use some numerical code utilizing the SIMD units of modern X86
>> architectures. Code compiles well using gcc/gcc46,
>> but clang does not know about the __builtin_ia32_xxxxx() statements. How to
>> treat those in clang and how to make
>> C code compiling with clang utilizing those __builtin_ia32 statements?
>>
>> Thanks,
>> Oliver

Thanks for this hint.

I tried, and its a negative. I'm quite new to the usage of builtins and 
I oriented myself using gcc style __builtins. Especially 
__builtin_ia32_mulpd(()), __builtin_ia32_addpd(()). The aim is to add, 
mul, div and sub two 64 Bit doubles residing in a 128 Bit xmm register; 
by doing this, a struct contains two unions, each 128 bit, to simulate a 
4d vector, so I' capable of adding, multiplying etc. vectors using the 
SIMD units. It seems that there is a more 'sophisticated' way than 
simply apllying the __builtin assembly equivalences.

Oliver
Received on Thu Jun 16 2011 - 05:04:15 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:14 UTC