ARM Optimizing C/C++ Compiler V5.2 (Rev. J) TI Manual
User Manual:
Open the PDF directly: View PDF
Page Count: 202 [warning: Documents this large are best viewed by clicking the View PDF Link!]
- Table of Contents
- Preface
- 1 Introduction to the Software Development Tools
- 2 Using the C/C++ Compiler
- 2.1 About the Compiler
- 2.2 Invoking the C/C++ Compiler
- 2.3 Changing the Compiler's Behavior with Options
- 2.3.1 Linker Options
- 2.3.2 Frequently Used Options
- 2.3.3 Miscellaneous Useful Options
- 2.3.4 Run-Time Model Options
- 2.3.5 Symbolic Debugging and Profiling Options
- 2.3.6 Specifying Filenames
- 2.3.7 Changing How the Compiler Interprets Filenames
- 2.3.8 Changing How the Compiler Processes C Files
- 2.3.9 Changing How the Compiler Interprets and Names Extensions
- 2.3.10 Specifying Directories
- 2.3.11 Assembler Options
- 2.3.12 Deprecated Options
- 2.4 Controlling the Compiler Through Environment Variables
- 2.5 Controlling the Preprocessor
- 2.5.1 Predefined Macro Names
- 2.5.2 The Search Path for #include Files
- 2.5.3 Support for the #warning and #warn Directives
- 2.5.4 Generating a Preprocessed Listing File (--preproc_only Option)
- 2.5.5 Continuing Compilation After Preprocessing (--preproc_with_compile Option)
- 2.5.6 Generating a Preprocessed Listing File with Comments (--preproc_with_comment Option)
- 2.5.7 Generating a Preprocessed Listing File with Line-Control Information (--preproc_with_line Option)
- 2.5.8 Generating Preprocessed Output for a Make Utility (--preproc_dependency Option)
- 2.5.9 Generating a List of Files Included with the #include Directive (--preproc_includes Option)
- 2.5.10 Generating a List of Macros in a File (--preproc_macros Option)
- 2.6 Passing Arguments to main()
- 2.7 Understanding Diagnostic Messages
- 2.8 Other Messages
- 2.9 Generating Cross-Reference Listing Information (--gen_acp_xref Option)
- 2.10 Generating a Raw Listing File (--gen_acp_raw Option)
- 2.11 Using Inline Function Expansion
- 2.12 Using Interlist
- 2.13 Controlling Application Binary Interface
- 2.14 VFP Support
- 2.15 Enabling Entry Hook and Exit Hook Functions
- 3 Optimizing Your Code
- 3.1 Invoking Optimization
- 3.2 Performing File-Level Optimization (--opt_level=3 option)
- 3.3 Program-Level Optimization (--program_level_compile and --opt_level=3 options)
- 3.4 Link-Time Optimization (--opt_level=4 Option)
- 3.5 Accessing Aliased Variables in Optimized Code
- 3.6 Use Caution With asm Statements in Optimized Code
- 3.7 Automatic Inline Expansion (--auto_inline Option)
- 3.8 Using the Interlist Feature With Optimization
- 3.9 Debugging and Profiling Optimized Code
- 3.10 Controlling Code Size Versus Speed
- 3.11 What Kind of Optimization Is Being Performed?
- 3.11.1 Cost-Based Register Allocation
- 3.11.2 Alias Disambiguation
- 3.11.3 Branch Optimizations and Control-Flow Simplification
- 3.11.4 Data Flow Optimizations
- 3.11.5 Expression Simplification
- 3.11.6 Inline Expansion of Functions
- 3.11.7 Function Symbol Aliasing
- 3.11.8 Induction Variables and Strength Reduction
- 3.11.9 Loop-Invariant Code Motion
- 3.11.10 Loop Rotation
- 3.11.11 Instruction Scheduling
- 3.11.12 Tail Merging
- 3.11.13 Autoincrement Addressing
- 3.11.14 Block Conditionalizing
- 3.11.15 Epilog Inlining
- 3.11.16 Removing Comparisons to Zero
- 3.11.17 Integer Division With Constant Divisor
- 3.11.18 Branch Chaining
- 4 Linking C/C++ Code
- 4.1 Invoking the Linker Through the Compiler (-z Option)
- 4.2 Linker Code Optimizations
- 4.3 Controlling the Linking Process
- 4.3.1 Including the Run-Time-Support Library
- 4.3.2 Run-Time Initialization
- 4.3.3 Initialization of Cinit and Watchdog Timer Hold
- 4.3.4 Global Object Constructors
- 4.3.5 Specifying the Type of Global Variable Initialization
- 4.3.6 Specifying Where to Allocate Sections in Memory
- 4.3.7 A Sample Linker Command File
- 5 ARM C/C++ Language Implementation
- 5.1 Characteristics of ARM C
- 5.2 Characteristics of ARM C++
- 5.3 Using MISRA-C:2004
- 5.4 Using the ULP Advisor
- 5.5 Data Types
- 5.6 Keywords
- 5.7 C++ Exception Handling
- 5.8 Register Variables and Parameters
- 5.9 The __asm Statement
- 5.10 Pragma Directives
- 5.10.1 The CHECK_MISRA Pragma
- 5.10.2 The CHECK_ULP Pragma
- 5.10.3 The CLINK Pragma
- 5.10.4 The CODE_SECTION Pragma
- 5.10.5 The CODE_STATE Pragma
- 5.10.6 The DATA_ALIGN Pragma
- 5.10.7 The DATA_SECTION Pragma
- 5.10.8 The Diagnostic Message Pragmas
- 5.10.9 The DUAL_STATE Pragma
- 5.10.10 The FUNC_ALWAYS_INLINE Pragma
- 5.10.11 The FUNC_CANNOT_INLINE Pragma
- 5.10.12 The FUNC_EXT_CALLED Pragma
- 5.10.13 The FUNCTION_OPTIONS Pragma
- 5.10.14 The INTERRUPT Pragma
- 5.10.15 The LOCATION Pragma
- 5.10.16 The MUST_ITERATE Pragma
- 5.10.17 The NOINIT and PERSISTENT Pragmas
- 5.10.18 The NO_HOOKS Pragma
- 5.10.19 The PACK Pragma
- 5.10.20 The RESET_MISRA Pragma
- 5.10.21 The RESET_ULP Pragma
- 5.10.22 The RETAIN Pragma
- 5.10.23 The SET_CODE_SECTION and SET_DATA_SECTION Pragmas
- 5.10.24 The SWI_ALIAS Pragma
- 5.10.25 The TASK Pragma
- 5.10.26 The UNROLL Pragma
- 5.10.27 The WEAK Pragma
- 5.11 The _Pragma Operator
- 5.12 Application Binary Interface
- 5.13 ARM Instruction Intrinsics
- 5.14 Object File Symbol Naming Conventions (Linknames)
- 5.15 Initializing Static and Global Variables in TI ARM9 ABI and TIABI Modes
- 5.16 Changing the ANSI/ISO C/C++ Language Mode
- 5.17 GNU Language Extensions
- 5.18 AUTOSAR
- 5.19 Compiler Limits
- 6 Run-Time Environment
- 6.1 Memory Model
- 6.2 Object Representation
- 6.2.1 Data Type Storage
- 6.2.1.1 char and short Data Types (signed and unsigned)
- 6.2.1.2 enum (TI_ARM9_ABI or TIABI), float, int, and long Data Types (signed and unsigned)
- 6.2.1.3 double, long double, and long long Data Types (signed and unsigned)
- 6.2.1.4 Pointer to Data Member Types
- 6.2.1.5 Pointer to Member Function Types
- 6.2.1.6 Structure and Array Alignment
- 6.2.2 Bit Fields
- 6.2.3 Character String Constants
- 6.2.1 Data Type Storage
- 6.3 Register Conventions
- 6.4 Function Structure and Calling Conventions
- 6.5 Accessing Linker Symbols in C and C++
- 6.6 Interfacing C and C++ With Assembly Language
- 6.7 Interrupt Handling
- 6.8 Intrinsic Run-Time-Support Arithmetic and Conversion Routines
- 6.9 Built-In Functions
- 6.10 System Initialization
- 6.10.1 System Pre-Initialization
- 6.10.2 Run-Time Stack
- 6.10.3 TI ARM9 ABI/TIABI Automatic Initialization of Variables
- 6.10.4 EABI Automatic Initialization of Variables
- 6.10.5 Initialization Tables
- 6.11 Dual-State Interworking Under TIABI (Deprecated)
- 7 Using Run-Time-Support Functions and Building Libraries
- 8 C++ Name Demangler
- A Glossary
- B Revision History
- Important Notice