Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: On SSE2-Intrinsics

Author: Aart J.C. Bik

Date: 13:36:30 04/08/05

Go up one level in this thread


On April 08, 2005 at 14:08:22, Gerd Isenberg wrote:

>What i missed recently - an intrinsic based on movd to load a 32-integer from
>memory into a the lowest dword of an xmm-register, zero extending to 64-bit.

Hi Gerd,

I guess you are simply looking for the “_mm_cvtsi32_si128” intrinsic. For
example

    __m128i a;
    void foo(int *p) {
      a = _mm_cvtsi32_si128(*p);
    }

translates into

     movd      xmm0, DWORD PTR [eax] ; clears higher 96-bit
     movdqa    XMMWORD PTR _a, xmm0

where, for your request, you would feed xmm0 into the shift factor rather than
storing it.

>Is it ok, to use assign-operator

Looks okay to me.

>Guess generating C-code with intrinsics is your way to implement vectorisation
>with intel C ;-)

I am not sure what you mean by this. In general, I promote automatic
vectorization with the Intel compiler over heavy use of intrinsics, but I
realize that this is not a viable option for expert programmers as yourself yet
:-)

Aart Bik
http://www.aartbik.com/



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.