In a simple program written for Microsoft x64 assembler, I want to move a 64-bit value between the SSE register (say xmm0) and the general register (say rcx), as in Intel syntax in MASM>
mov xmm0, rcx
...
mov rcx, xmm0
These two lines generate the following error messages from ml64.exe:
- error A2152: the coprocessor register cannot be the first operand
- Error A2070: Invalid Command Operands
However, it is obvious that this simple task can be performed on x64. For example, the following working x64 program that I can compile and run in the GAS <AT & T syntax using GCC 4.8.2>:
.text
.globl main
main:
movl $1, %ecx
movq %rcx, %xmm0
movq %xmm0, %rax
ret
As expected, the return value of this program is 1, and the output objdumpfor main():
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
, , MASM, , ml64.exe ?