In the above code, I can't figure out why pxor xmm0, xmm0 takes place.
Asked
Active
Viewed 44 times
0
Peter Cordes
- 328,167
- 45
- 605
- 847
InexactRex69
- 7
- 2
-
2Please do not post images of code, just share the link that godbolt example. – Quimby Apr 26 '22 at 08:50
-
1Okay.. I'll keep that in mind. I'm updating it now – InexactRex69 Apr 26 '22 at 08:54
-
1That's there to clear the bits of `xmm0`, but it is a good question as to why that's needed. From what I can tell neither `cvtsi2sd`, `divsd` nor `movsd` cares about the most significant 64 bits, everything else is set by `cvtsi2sd` or `divsd`. – Lala5th Apr 26 '22 at 09:03
-
@Lala5th: It's there to break the false dependency from the short-signed design of `cvtsi2sd` merging into the destination, instead of zero-extending to the full XMM reg. – Peter Cordes Apr 26 '22 at 09:53
