64-bit applications are described by 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 order. Floating-point arguments are placed from %xmm0 to %xmm7 registers.
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. AMD64 has special area on stack called red zone. This is 128-byte area beyond the location pointed to by %rsp is considered to be reserved and shall not be modified by signal or interrupt handlers.
Instruction sizes are still 32-bit. 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.
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 cannot be mapped by applications. These restrictions might be relaxed on future operating systems.
The actual addresses in the figure above describe a particular implementation on a particular machine, and are given for illustrative purposes only.
Executables running with the address space layout randomization feature enabled have random unused offsets around their heap, shared libraries, and stack segments.