Register Conventions
6-11
Run-Time Environment
6.2.1 Status Register Fields
2 shows all of the status fields used by the compiler. Presumed value
is the value the compiler expects in that field upon entry to, or return from, a
function. A dash in this column indicates that the compiler does not expect a
particular value. The modified column indicates if code generated by the
compiler ever modifies this field.
Table 6
−
2. Status Register Fields
(a) TMS320C2x, TMS320C2xx and TMS320C5x fields
Field
Name
Presumed Value
Modified
ARP
Auxiliary-register pointer
1
Yes
C
Carry
−
Yes
DP
Data page
−
Yes
OV
Overflow
−
Yes
OVM
Overflow mode
0
No
PM
Product shift mode
0
No
SXM
Sign-extension mode
−
Yes
TC
Test-control bit
−
Yes
(b) TMS320C5x-only fields
Field
Name
Presumed Value
Modified
BRAF
Block-repeat active flag
−
Yes
NDX
Index-register enable bit
0
No
TRM
Enable multiple TREGs
0
No
6.2.2 Stack Pointer, Frame Pointer, and Local Variable Pointer
The compiler creates and uses its own software stack for saving the function
return addresses, allocating local (automatic) variables, and passing argu-
ments to functions. The internal hardware stack is not used to save the function
return address except in cases where the compiler can be certain the call
depth (the number of function invocations on the stack at the same time) does
not exceed eight levels. When a function requires local storage, it creates its
own working space (local frame) from the stack. The local frame is allocated
during the function’s entry sequence and deallocated during the return
sequence.
Three registers, the stack pointer (SP), the frame pointer (FP), and the local
variable pointer (LVP), manage the stack and the local frame.
Summary of Contents for TMS320C2x
Page 8: ...viii...
Page 69: ...2 47 C Compiler Description...
Page 159: ...6 36...
Page 226: ...8 6...