A calling convention dictates which registers are volatile, which registers are non-volatile, which registers are used for parameter passing and in which order, and which register is used to return the result of a function.
A non-volatile register is a register that is restored to its original value just prior to a function leave (that is, in its epilog). The System V ABI defines rbx, rbp, r12, r13, r14, and r15 as non-volatile. By contrast, a volatile register is one that a called function can change at will, without having to restore its value on return.
To demonstrate this, let's look at the following example:
0000000000000630 <__libc_csu_init>:push %r15push %r14mov %rdx,%r15push %r13push %r12
As shown in the previous ...