[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
Wed Apr 19 10:09:08 PDT 2017


craig.topper added a comment.

This wasn't a mistake. We have aliases for movq for this instruction already. This was for compatibility with MacOS/Darwin's old assembler from the pre-clang days.

See this code

// These are the correct encodings of the instructions so that we know how to
// read correct assembly, even though we continue to emit the wrong ones for
// compatibility with Darwin's buggy assembler.
def : InstAlias<"movq\t{$src, $dst|$dst, $src}",

  (MOV64toPQIrr VR128:$dst, GR64:$src), 0>;

def : InstAlias<"movq\t{$src, $dst|$dst, $src}",

  (MOVPQIto64rr GR64:$dst, VR128:$src), 0>;

// Allow "vmovd" but print "vmovq" since we don't need compatibility for AVX.
def : InstAlias<"vmovd\t{$src, $dst|$dst, $src}",

  (VMOV64toPQIrr VR128:$dst, GR64:$src), 0>;

def : InstAlias<"vmovd\t{$src, $dst|$dst, $src}",

  (VMOVPQIto64rr GR64:$dst, VR128:$src), 0>;


https://reviews.llvm.org/D32220





More information about the llvm-commits mailing list