Floating Point Conversion using SSE

  • Follow


good evening everyone,

i have to convert 4 double-word integers into single precision packed 
floating point numbers. and i have to use sse (not sse2 instructions).

i found the CVTPI2PS instruction, however it can convert only two 
integers, and only mmx registers work as source, whereas any 
xmm-register can be the target.

does anyone know of a faster way to do this, i.e. convert 4 numbers like 
CVTDQ2PS does? or a way to bypass mmx registers?


thanks in advance
andr�

0
Reply ISO 2/17/2006 7:15:52 PM

Keep in mind that mmx is _not_ the only possible source for that
instruction. You can use CVTPI2PS directly from memory as well. So if
your 4 bytes are in consecutive memory locations, you can just do two
of them with a movlhps wedged in between. If they aren't in consecutive
memory locations.. well, then, you have a bigger problem.

in at&t stynax

movl $ADDRESS, %eax
cvtpi2ps %eax, %xmm0
movlhps %xmm0, %xmm0
cvtpi2ps 8(%eax), %xmm0

0
Reply ldb 2/17/2006 9:27:51 PM


1 Replies
138 Views

(page loaded in 0.082 seconds)

Similiar Articles:













7/29/2012 5:34:13 AM


Reply: