News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

mov, movd, movq : AX, EAX, RAX

Started by zx3speed, October 14, 2009, 11:45:27 PM

Previous topic - Next topic

zx3speed

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

thomas_remkus

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).

zx3speed

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.

thomas_remkus

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.

BlackVortex

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.