I'm trying to flip the sign bit of the least significant float inside of xmm0. I've tried to convert -0 into another xmm register and xor it with xmm0. Unfortunately, I've achieved to flip the sign though the value of my float is gone. Is there a way to use xorps
in asm in order to flip the sign bit? I've also seen some posts on stackoverflow exactly doing that but in c.
# xmm0 contains 4 floats
# goal is to flip the sign of the least significant one
mov eax, -0
cvtsi2ss xmm1, eax
xorps xmm0, xmm1