[PATCH] D32220: [X86][SSE2] Fix asm string for movq (Move Quadword) instruction

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 20 09:02:10 PDT 2017


craig.topper added a comment.

In the days before the MC layer of LLVM existed, clang would output assembly as text and feed it to the separate assembler tool. So it had to output what the MacOS assembler could parse.

I believe the assembler bug occurred around when 64-bit was introduced. There was already separate 64-bit movq to/from memory instruction before that. Then movd picked up a rex prefix that allowed it to access 64-bit registers and redudantly access 64-bit memory. I don't think there was ever a movq to memory issue because we never expect to use the rex encoded memory instruction since the older movq instruction is available.

We probably don't need to output that way anymore. But we should keep an alias around so we can process old assembly filed. So switch the instruction string to movq and change the alias to movd.


https://reviews.llvm.org/D32220





More information about the llvm-commits mailing list