SPRU514Z July 2001 – October 2023 SM320F28335-EP
Table 7-2 summarizes how the compiler uses the TMS320C28x registers and shows which registers are defined to be preserved across function calls. The FPU uses all the C28x registers as well as the registers described in Table 7-3.
See the TMS320C28x CPU and Instruction Set Reference Guide (SPRU430) for details about C28x registers.
Register | Usage | Save on Entry | Save on Call |
---|---|---|---|
AL | Expressions, argument passing, and returns 16-bit results from functions | No | Yes |
AH | Expressions and argument passing | No | Yes |
DP | Data page pointer (used to access global variables) | No | No |
PH | Multiply expressions and Temp variables | No | Yes |
PL | Multiply expressions and Temp variables | No | Yes |
SP | Stack pointer | (1) | (1) |
T | Multiply and shift expressions | No | Yes |
TL | Multiply and shift expressions | No | Yes |
XAR0 | Pointers and expressions | No | Yes |
XAR1 | Pointers and expressions | Yes | No |
XAR2 | Pointers, expressions, and frame pointing (when needed) | Yes | No |
XAR3 | Pointers and expressions | Yes | No |
XAR4 | Pointers, expressions, argument passing, and returns 32-bit pointer values from functions | No | Yes |
XAR5 | Pointers, expressions, and arguments | No | Yes |
XAR6 | Pointers and expressions | No | Yes |
XAR7 | Pointers, expressions, indirect calls and branches (used to implement pointers to functions and switch statements) | No | Yes |
FPU32 Registers | FPU64 Registers | Usage | Save on Entry | Save on Call |
---|---|---|---|---|
R0H | R0 = R0H:R0L | Expressions, argument passing, and returns 32-bit float from functions | No | Yes |
R1H | R1 = R1H:R1L | Expressions and argument passing | No | Yes |
R2H | R2 = R2H:R2L | Expressions and argument passing | No | Yes |
R3H | R3 = R3H:R3L | Expressions and argument passing | No | Yes |
R4H | R4 = R4H:R4L | Expressions | Yes | No |
R5H | R5 = R5H:R5L | Expressions | Yes | No |
R6H | R6 = R6H:R6L | Expressions | Yes | No |
R7H | R7 = R7H:R7L | Expressions | Yes | No |