Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jun 2011 09:04:11 +0200
From:      "O. Hartmann" <ohartman@zedat.fu-berlin.de>
To:        Doug Rabson <dfr@rabson.org>
Cc:        "freebsd-performance@freebsd.org" <freebsd-performance@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: FreeBSD 9.0-CUR/amd64 CLANG: howto use gcc __builtin_ia32?
Message-ID:  <4DF9AAEB.5090801@zedat.fu-berlin.de>
In-Reply-To: <BANLkTikf-KqC4yYe8ab=vwee4z9U%2BT65iw@mail.gmail.com>
References:  <4DF4EC9F.9020604@zedat.fu-berlin.de> <BANLkTikf-KqC4yYe8ab=vwee4z9U%2BT65iw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DF9AAEB.5090801>