Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Ed Schröder's attack bytes or SEE with SSE2?

Author: Gerd Isenberg

Date: 15:17:38 08/12/04

Go up one level in this thread


This is the packed unpack shuffle sequence to rotate
a 8*8 byte array by 90 degree:

BYTE[64] := {xmm4,xmm5,xmm6,xmm7}

     movdqa     xmm0, xmm4
     movdqa     xmm1, xmm5
     movdqa     xmm2, xmm6
     movdqa     xmm3, xmm7
     punpckhqdq xmm4, xmm4
     punpckhqdq xmm5, xmm5
     punpckhqdq xmm6, xmm6
     punpckhqdq xmm7, xmm7
     punpcklbw  xmm0, xmm4
     punpcklbw  xmm1, xmm5
     punpcklbw  xmm2, xmm6
     punpcklbw  xmm3, xmm7

     movdqa     xmm4, xmm0
     movdqa     xmm6, xmm2
     punpcklwd  xmm0, xmm1
     punpcklwd  xmm2, xmm3
     punpckhwd  xmm4, xmm1
     punpckhwd  xmm6, xmm3

     movdqa     xmm1, xmm0
     movdqa     xmm5, xmm4
     punpckldq  xmm0, xmm2
     punpckldq  xmm4, xmm6
     punpckhdq  xmm1, xmm2
     punpckhdq  xmm5, xmm6

     movdqa     [eax+0*16], xmm0
     movdqa     [eax+1*16], xmm1
     movdqa     [eax+2*16], xmm4
     movdqa     [eax+3*16], xmm5

The unrolled routine takes ~230 cycles now.

Gerd



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.