64-bit applications are described using Executable and Linking Format (ELF64), which allows large applications and large address spaces to be described completely.
Following is a list of the AMD ABI features.
The AMD ABI allows all 64-bit instructions and 64-bit registers to be used to their full effect. Many of the new instructions are straightforward extensions of the existing i386 instruction set. There are now sixteen general purpose registers.
The basic function calling convention is different for the AMD ABI. Arguments are placed in registers. For simple integer arguments, the first arguments are placed in the %rdi, %rsi, %rdx, %rcx, %r8, and %r9 registers, in that order.
The layout of the stack is slightly different for AMD. In particular, the stack is always aligned on a 16–byte boundary immediately preceding the call instruction.
Instruction sizes are still 32 bits. Address constant generation therefore takes more instructions. The call instruction can no longer be used to branch anywhere in the address space, since it can only reach within plus or minus 2 gigabytes of %rip.
Integer multiply and divide functions are now implemented completely in hardware.
Structure passing and return are accomplished differently. Small data structures and some floating point arguments are now passed directly in registers.
There are new PC-relative addressing modes that enable more efficient position-independent code to be generated.
All data types are now aligned to their size.
Many basic derived types are larger. Thus many system call interface data structures are now of different sizes.
Two different sets of libraries exist on the system: those for 32-bit i386 applications and those for 64-bit amd64 applications.
The AMD ABI substantially enhances floating point capabilities.
See the draft amd64 psABI document System V Application Binary Interface, AMD64 Architecture Processor Supplement, Draft Version 0.92.
For 64-bit applications, the layout of the address space is closely related to that of 32-bit applications, though the starting address and addressing limits are radically different. Like SPARC V9, the amd64 stack grows down from the top of the address space, while the heap extends the data segment from the bottom.
The following diagram shows the default address space provided to a 64–bit application. The regions of the address space marked as reserved might not be mapped by applications. These restrictions might be relaxed on future systems.
The actual addresses in the figure above describe a particular implementation on a particular machine, and are given for illustrative purposes only.