| |||
| Home > Compiler Coding Practices | |||
The compiler, armcc, is a mature, industrial-strength
ISO C and C++ compiler capable of producing highly optimized, high
quality machine code. By using programming practices and techniques
that work well on RISC processors such as ARM cores, you can increase
the portability, efficiency and robustness of your C and C++ source
code. The following topics describe some of these programming practices,
together with some programming techniques that are specific to ARM processors:
Benefits of reducing debug information in objects and libraries
Methods of reducing debug information in objects and libraries
Functions that return the same result when called with the same arguments
Recommendation of postfix syntax when qualifying functions with ARM function modifiers
Inline functions and removal of unused out-of-line functions at link time
Restriction on overriding compiler decisions about function inlining
The __packed qualifier and unaligned data access in C and C++ code
Performance penalty associated with marking whole structures as packed
Unaligned Load Register (LDR) instructions generated by the compiler
Default selection of hardware or software floating-point support
Example of hardware and software support differences for floating-point arithmetic
Limitations on hardware handling of floating-point arithmetic
Compiler and library support for half-precision floating-point numbers
Compiler support for floating-point computations and linkage
Compiler options for floating-point linkage and computations
About trapping integer division-by-zero errors with __aeabi_idiv0()
About trapping integer division-by-zero errors with __rt_raise()
Examining parameters when integer division-by-zero errors occur in C code
About trapping software floating-point division-by-zero errors
Identification of software floating-point division-by-zero errors
New block scopes for selection and iteration statements in C99
Extended integer types and functions in <inttypes.h> and <stdint.h> in C99
How to prevent uninitialized data from being initialized to zero.