This project is read-only.

MOVSDX Opcode Should Be Recognized As SSE2 Instruction


I haven't dug into the source code, but it looks like the opcode matching is done using a master list rather than by parsing the code. Unfortunately, that means the list needs to be carefully maintained.

One item that's missing is MOVSDX. Granted, this is not a real instruction and it's not documented in either the Intel or AMD manuals. It is just an alternate name for the MOVSD instruction. But it is emitted by Microsoft's compiler into an /FA listing.

The only "reference" that I can find for this is Jim Hogg's comment here on the MSVC team blog (search for "movsdx"). He says:
The movsdx mnemonic is emitted (only?) by the VC++ compiler into an FA listing, as we saw. This mnemonic is NOT in the Intel manuals. And it's NOT an alternative to the movsxd instruction. In fact, it corresponds to the Intel MOVSD instruction - as you will see in the disassembly, using link /dump /disasm mul.obj. As best I can discover, we added the 'x' to disambiguate it from Intel's original MOVSD instruction ("move doubleword string"). That 'x' has nothing to do with sign-bit extension. Not sure it was a great idea, viewed with 20-20 hindsight, but that's what we have.
Indeed. I'm not sure it's a great idea, either. But considering this is a VC++-specific utility, I think it only makes sense to recognize and support it.

Practically speaking, I see it often, and having it recognized as an SSE2 instruction (and therefore highlighted differently) would help to remind me that it is not related to MOVSXD.