I need to load 4 diff. dwords 1,2,3,4 in the lower half of an SSE2 reg, wich is followed by a unpack with a zero reg for casting.


for now i use:

pxor xmm7,xmm7
.
.
.


movd mm1,
punpckldq mm1,

movq2dq xmm1, mm1

punpcklbw xmm1, xmm7

i use mmx regs here to direct build 1234 and than copy this to xmm1 and unpack.

Is there a way to direct work with xmm regs with the same speed?

its like:

4 diff. locations [1] [2] [3] [4]

and i need xmm0[00_4|00_3|00_2|00_1]

thx
Posted on 2004-06-23 08:13:03 by Andy2222
Load dqword, unpack to high and low with zero-register, then shuffle to invert the order?
Posted on 2004-06-23 09:04:58 by Scali