Hello all of you,
I am sure, this is a absolutely stupid failure of mine, but I don' get it... so, please have a look and see, if you are able to find the problem
get_wu:
mov rbx, qword [para_w] ; load my value to rbx to ensure I can see in debugger if it is right
movsd xmm1, qword [para_w] ; get my value to xmm1
sqrtsd xmm0, xmm1 ; take root of xmm1 and save it to xmm0
cvttsd2si rbx, xmm0 ; convert (and truncate) xmm0 to integer and store it in rbx
inc rbx
ret
in the debugger I see, that rbx and xmm1 are correct loaded with my value,
after the sqrtsd , I see "something" in xmm0, which I assume it is my packed calculated root
and after the cvttsd2si, I have always 0 (zero) in my rbx. not a correct calculated root.
Please, what am I doing wrong?
Note: I do not need the correct root, but the integer part has to be correct. (sqrt(10) => 3) is good for me