简体   繁体   中英

How to write the value of a general-purpose 64 bit register into MMX?

I'm working with x64 assembly and Visual C++ 2010/MASM is telling me that the instruction

movq mm0, rax

contains "invalid instruction operands".

Is this really illegal, or could it be a bug? How does one perform this procedure without using the instruction?

It's a bug, or you didn't specify 64 bit mode or MMX extensions. movq mm0, rax is a valid instruction with machine code 48 0F 6E C0 . See the intel instruction set reference. If all else fails, you can include the machine code as data bytes.

That said, MMX is obsolete (especially since in 64 bit mode you by default have SSE2). Make sure you really want to use it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM