Following the answer about assembly registers' sizes:
First, what sizes are
eax
,ax
,ah
and their counterparts, in the 64-bit architecture? How to access a single register's byte and how to access all the 64-bit register's eight bytes?I'd love attention for both x86-64 (x64) and Itanium processors.
Second, what is the correct way to use the four registers for holding the first four parameters in function calls in the new calling convention?
With the old name all registers remain the same size. To access 64-bit registers you use the new name with R-prefix such as rax, rbx...
Register names don't change so you just use the byte registers (al, bl, cl, dl, ah, bh, ch, dh) for the LSB and MSB of ax, bx, cx, dx like before.
There are also 8 new registers called r8-r15. You can access their LSBs by adding the suffix
b
(orl
if you're using AMD). For example r8b, r9b... You can also use the LSB of esi, edi, esp, ebp by the names sil, dil, spl, bpl with the new REX prefix, but you cannot use it at the same time with ah, bh, ch or dh.Likewise the new registers' lowest word or double word can be accessed through the suffix
w
ord
.What are the names of the new X86_64 processors registers?
Regarding the calling convention, on a specific system there's only one convention1.
On Windows:
1Since MSVC 2013 there's also a new extended convention on Windows called
__vectorcall
.x86_64 calling conventions
Those are the most basics of x86_64. You should also read this
OTOH Itanium is a completely different architecture and has no relation to x86_64 whatsoever. It's a pure 64-bit architecture so all normal registers are 64-bit, no 32-bit or smaller version available. There are a lot of registers in it:
Read more on What is the difference between x64 and IA-64?