Some registers are guaranteed to have the same values before and after a function call, and others are not. The rules for guaranteeing register values are as follows.
Registers guaranteed to have the same values before and after function call (Callee-Save registers) |
Registers not guaranteed to have the same values before and after function call (Caller-Save registers) |