I've got array of bytes and I want to cast them to float and do some arithmetic with them. I've got idea, but I am not sure, if it has right to work. Maybe its not perfect, but if its possible to make it work then it would be enough for me, since I am starting to learn.
I tried to unpack low data twice. First mixing it with vector of 0 in xmm1 converting byte to short
and doing it again converting from short to word. then I convert it to float. In my head it should work, looking at debugger I m not sure.
I dont know why hexadecimal values are the ones that I expect, but values are always maximum short. Why does it happen?
PUNPCKLBW xmm1, [rbx]
movups xmm2,xmm1
xorps xmm1,xmm1
PUNPCKLBW xmm1,xmm2
CVTDQ2PS xmm1,xmm1
movups [vecReal],xmm1