Contents
xi
Contents
3.8.7
Data-Flow Optimizations
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.8.8
Branch Optimizations and Control-Flow Simplification
. . . . . . . . . . . . . . . . . . .
3.8.9
Loop Induction Variable Optimizations and Strength Reduction
3.8.10 Loop Rotation
3.8.11 Loop Invariant Code Motion
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.8.12 Inline Expansion of Runtime-Support Library Functions
. . . . . . . . . . . . . . . . . .
4
Linking C Code
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Describes how to link using a standalone program or with the compiler shell and how to meet
the special requirements of linking C code.
4.1
Invoking the Linker as an Individual Program
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2
Invoking the Linker With the Compiler Shell (
−
z Option)
. . . . . . . . . . . . . . . . . . . . . . . . . .
4.3
Disabling the Linker (
−
c Shell Option)
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.4
Linker Options
4.5
Controlling the Linking Process
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.1
Linking With Runtime-Support Libraries
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.2
Specifying the Type of Initialization
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.3
Specifying Where to Allocate Sections in Memory
. . . . . . . . . . . . . . . . . . . . . .
4.5.4
A Sample Linker Command File
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
TMS320C2x/C2xx/C5x C Language
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Discusses the specific characteristics of the TMS320C2x/C2xx/C5x C compiler as they relate
to the ANSI C specification.
5.1
Characteristics of TMS320C2x/C2xx/C5x C Language
. . . . . . . . . . . . . . . . . . . . . . . . . . .
5.1.1
Identifiers and Constants
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.1.2
Data Types
5.1.3
Conversions
5.1.4
Expressions
5.1.5
Declarations
5.1.6
Preprocessor
5.2
Data Types
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.3
Register Variables
5.4
Pragma Directives
5.4.1
The CODE_SECTION Pragma
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.4.2
The DATA_SECTION Pragma
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.4.3
The FUNC_EXT_CALLED Pragma
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.5
The asm Statement
5.6
Creating Global Register Variables
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.6.1
When to Use a Global Register Variable
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.6.2
Avoiding Corrupting Register Values
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.6.3
Disabling the Compiler From Using AR6 and AR7
. . . . . . . . . . . . . . . . . . . . . .
5.7
Initializing Static and Global Variables
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.7.1
Initializing Static and Global Variables With the const Type Qualifier
5.7.2
Accessing I/O Port Space
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.8
Compatibility with K&R C
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.9
Compiler Limits
Summary of Contents for TMS320C2x
Page 8: ...viii...
Page 69: ...2 47 C Compiler Description...
Page 159: ...6 36...
Page 226: ...8 6...