C6000 DSP/BIOS Register Usage
This document provides tables describing the TMS320C6000TM register conventions in terms of preservation across multi-threaded context switching and preconditions.
Overview
In a multi-threaded application using DSP/BIOS, it is necessary to know which registers can or cannot be modified. Furthermore, users need to understand which registers need to be saved/restored across a function call or an interrupt.
The following definitions describe the various possible register handling behaviors:
- Scratch register. These registers are saved/restored by the Hwi dispatcher with temporary register bit masks.
- Preserved register. These registers are saved/restored during a Task context switch.
- Initialized register. These registers are set to a particular value during Hwi processing and restored to their incoming value upon exiting from the interrupt routine.
- Read-Only register. These registers may be read but must not be modified.
- Global register. These registers are shared across all threads in the system. To make a temporary change, save the register, make the change, and then restore it.
- Other. These registers do not fit into one of the categories above.
Register Conventions
* - Denotes registers available on the `C67x, `C67x+ to support floating point operations.
** - Denotes registers available on the `C64x, `C67x+ only.
+ - Denotes registers available on the `C64x+ only.
The General purpose registers follow the 'C' compiler conventions. IRP can be used as a scratch register only when interrupts are disabled. ITSR and NTSR are identical copies of TSR, see TSR for details on each individual status bit.
For the `C67x FADCR, FAUCR, and FMCR registers, the compiler assumes the nearest rounding mode is used. This is assumed to be the default mode at power-up. The compiler does not actually do anything to set it up that way, nor does it ever write or read these registers. These registers are completely under user control. Code may generate slightly different results if you change these registers.