Author Topic: 64 bit assembly language step by step  (Read 51857 times)

qWord

  • Member
  • *****
  • Posts: 1475
  • The base type of a type is the type itself
    • SmplMath macros
Re: 64 bit assembly language step by step
« Reply #15 on: May 11, 2013, 10:15:18 PM »
The description text (and the table that shows all valid forms) says that only XMM, MMX or m64 can be used. The same applies for AMD's manuals.
Intel® 64 and IA-32 Architectures Software Developer's Manual
Combined Volumes 2A, 2B, and 2C: Instruction Set Reference, A-Z
(page 4-82)
However, the entry for MOVD is named "MOVD/MOVQ", which shows that at least Intel "allows" to use GPRs with the MOVQ mnemonic.

For AMD there are two descriptions: one for the XMM extension and one for MMX technology:
AMD64 Architecture Programmer’s Manual Volume 4: 128-bit and 256 bit media instructions (page 202)

AMD64 Architecture Programmer’s Manual Volume 5: 64-Bit Media and x87 Floating-Point Instructions (page 36)

I think the reason for this ambiguousness is that MOVD gets "very similar" to MOVQ when using the REX prefix to access 64 bit GPRs.

EDIT: From AMD: MOVD: "The quadword form of this instruction is distinct from the differently-encoded (V)MOVQ instruction"
MREAL macros - when you need floating point arithmetic while assembling!

Gunther

  • Member
  • *****
  • Posts: 4178
  • Forgive your enemies, but never forget their names
Re: 64 bit assembly language step by step
« Reply #16 on: May 11, 2013, 11:21:33 PM »
Hi qWord,

I think the reason for this ambiguousness is that MOVD gets "very similar" to MOVQ when using the REX prefix to access 64 bit GPRs.

that exactly was my point in my last post. Anyway, we've to live with that and finally it works.

Gunther
You have to know the facts before you can distort them.