In x86_64 Linux systems LP64 is the data model used and ILP32 is the model used in x86 systems. The following table will give you the difference,
Datatype | LP64 | ILP64 | LLP64 | ILP32 |
char | 8 | 8 | 8 | 8 |
short | 16 | 16 | 16 | 16 |
int | 32 | 64 | 32 | 32 |
long | 64 | 64 | 32 | 32 |
long long | 64 | 64 | 64 | 64 |
pointer | 64 | 64 | 64 | 32 |
In 32bit and 64bit Linux systems, we are concerned only with ILP32 and LP64. long and pointer are the only difference between the two data models, so when we port applications from 32bit to 64 bit we must be concerned about part of the code which uses long and pointer data types. If we can uses int data type instead of long then it is very easy to port applications from 32 bit to 64 bit.
Now we covered the higher level languages part, let's move on to assembly language.
The above table is will guide you to write instructions for GAS (GNU Assembler), say push rax(64bit extension of eax register in x86) register, then the instruction is pushq %rax.
The register sets on a x86_64 platform is given below.
In x86_64, sixteen general purpose registers are available, i.e. rax, rbx, rcx, rdx, rdi, rsi, rbp, rsp and 8 additional registers r8-r15.
In x86 architecture we have segmentation, so we have difference between far call and near call.
x86_64 has different method of passing arguments during function calls, x86_64 uses mainly GP registers for passing arguments, in x86 we use stack for passing arguments.
x86_64 application binary interface is here. Best reference is AMD64 architecture Programmer's Manuals and Intel architecture system Programmer's Manuals.