title: Move quadword between xmm and general-purpose register in ml64?
body: <p>In a simple program written for Microsoft's x64 assembler, I want to move a 64-bit value between an SSE register (say xmm0) and a general-purpose register (say rcx), as in &lt;Intel syntax in MASM&gt;:</p>
  
  <pre><code>mov xmm0, rcx
  ...
  mov rcx, xmm0
  </code></pre>
  
  <p>These two lines generate the following error messages, respectively, from <code>ml64.exe</code>:</p>
  
  <ul>
  <li>error A2152: coprocessor register cannot be first operand</li>
  <li>error A2070: invalid instruction operands</li>
  </ul>
  
  <p>However, it is clearly possible to accomplish this simple task in x64. For example, the following is a functioning x64 program that I can assemble and run in GAS &lt;AT&amp;T syntax using GCC 4.8.2&gt;:</p>
  
  <pre><code>.text
      .globl main
  main:
      movl $1, %ecx
      movq %rcx, %xmm0
      movq %xmm0, %rax
      ret
  </code></pre>
  
  <p>As expected, the return value of this program is 1 and the <code>objdump</code> output for <code>main()</code> is:</p>
  
  <pre><code>1004010d0:   b9 01 00 00 00          mov    $0x1,%ecx
  1004010d5:   66 48 0f 6e c1          movq   %rcx,%xmm0
  1004010da:   66 48 0f 7e c0          movq   %xmm0,%rax
  1004010df:   c3                      retq
  </code></pre>
  
  <p>So my question is, how can I accomplish this in MASM given that <code>ml64.exe</code> is producing the above errors?</p>