Download "TMS320C6000 Optimizing C Compiler User's Guide"

Transcript
Define a Procedure
.proc/.endproc
The following types of instructions are not allowed in .proc or .cproc (see page
4-19 and 4-26) regions:
- Instructions that reference the stack pointer (register B15) are not allowed
in a .proc or .cproc region. Stack space can be allocated by the assembly
optimizer in a .proc or .cproc region for storage of temporary values. To
allocate this storage area the stack pointer is decremented on entry to the
region and incremented on exit from the region. Since the stack pointer
can change value on entry to the region, the assembly optimizer does not
allow code that references the stack pointer register.
- Indirect branches are not allowed in a .proc or .cproc region so that the
.proc or .cproc region exit protocols cannot be bypassed. Here is an
example of an indirect branch:
B
B4 <=
illegal
- Direct branches to labels not defined in the .proc or .cproc region are not
allowed so that the .proc or .cproc region exit protocols cannot be
bypassed. Here is an example of a direct branch outside of a .proc region:
.proc
...
B outside
.endproc
<= illegal
outside:
Using the Assembly Optimizer
4-27