The MASM Forum Archive 2004 to 2012

Project Support Forums => 64 Bit Assembler => Topic started by: zx3speed on October 14, 2009, 11:45:27 PM

Title: mov, movd, movq : AX, EAX, RAX
Post by: zx3speed on October 14, 2009, 11:45:27 PM
Hello all,

I'm a newby in assembler.
I read a lot and buy some books to learn and understand the basis.
The only thing that is not clear enough is in 64 bit mode, do I need to use the ax, eax, mov and movd.
Do I be using all of them or just those that are use only in 64 bit.
That is where I'm not sure at all, which way will give me the computer the faster I can.

Thank you in advance
Title: Re: mov, movd, movq : AX, EAX, RAX
Post by: thomas_remkus on October 15, 2009, 02:05:15 AM
Welcome! You can still use ax, eax and your instructions but 64-bit will increase your offerings for registers for sure. 32-bit calling convention options in Windows have been "simplified" to only 'fastcall'. Some people, when coding for 64-bit and assembly, choose GoAsm over MASM because of it's help with the standard (params mostly).
Title: Re: mov, movd, movq : AX, EAX, RAX
Post by: zx3speed on October 15, 2009, 02:15:29 PM
Where I'm confuse about that is, do I increase the speed when using only 64 bits parameter or depend on kind of binary object I have to move.
like for a letter using 32 bits and for files using 64 bits.
Title: Re: mov, movd, movq : AX, EAX, RAX
Post by: thomas_remkus on October 15, 2009, 04:21:27 PM
When you are coding and need a full 64-bit parameter the expectation is that you will get more performance. It's always best to test. Also, code that is 64-bit specific will logically be a different algor and you might find that having that option alone will increase your perf significantly. A single character, even in unicode, would most likely have the same performance in general from 32 to 64. Of course, if the algors are specific to your needs and you are using full registers then your likeliness of increased perfromance will improve.
Title: Re: mov, movd, movq : AX, EAX, RAX
Post by: BlackVortex on October 15, 2009, 08:39:52 PM
I believe your best bet is to always use the default value size for the system. Also makes for more robust/readable code.

And make sure your important data is quad-aligned.