SPRU514Z July 2001 – October 2023 SM320F28335-EP
Strict conventions associate specific registers with specific operations in the C/C++ environment. If you plan to interface an assembly language routine to a C/C++ program, you must understand and follow these register conventions.
The register conventions dictate how the compiler uses registers and how values are preserved across function calls. There are two types of register variable registers, save on entry and save on call. The distinction between these two types of registers is the method by which they are preserved across function calls. It is the called function’s responsibility to preserve save-on-entry registers, and the calling function’s responsibility to preserve save-on-call registers if you need to preserve that register’s value.