Keil Logo

ARM Compiler v5.06 for µVision armcc User Guide

ARM® Compiler v5.06 for µVision® armcc User Guide

Version 5


Table of Contents

Preface
About this book
Using this book
Glossary
Typographic conventions
Feedback
Other information
1 Overview of the Compiler
1.1 The compiler
1.2 Source language modes of the compiler
1.3 Language extensions
1.4 Language compliance
1.5 The C and C++ libraries
2 Getting Started with the Compiler
2.1 Compiler command-line syntax
2.2 Compiler command-line options listed by group
2.3 Default compiler behavior
2.4 Order of compiler command-line options
2.5 Using stdin to input source code to the compiler
2.6 Directing output to stdout
2.7 Filename suffixes recognized by the compiler
2.8 Compiler output files
2.9 Factors influencing how the compiler searches for header files
2.10 Compiler command-line options and search paths
2.11 Compiler search rules and the current place
2.12 The ARMCC5INC environment variable
2.13 Code compatibility between separately compiled and assembled modules
2.14 Linker feedback during compilation
2.15 Unused function code
2.16 Minimizing code size by eliminating unused functions during compilation
2.17 Compilation build time
2.17.1 Compilation build time
2.17.2 Minimizing compilation build time
2.17.3 Minimizing compilation build time with a single armcc invocation
2.17.4 Effect of --multifile on compilation build time
2.17.5 Minimizing compilation build time with parallel make
2.17.6 Compilation build time on Windows
3 Compiler Features
3.1 Compiler intrinsics
3.2 Performance benefits of compiler intrinsics
3.3 ARM assembler instruction intrinsics
3.4 Generic intrinsics
3.5 Compiler intrinsics for controlling IRQ and FIQ interrupts
3.6 Compiler intrinsics for inserting optimization barriers
3.7 Compiler intrinsics for inserting native instructions
3.8 Compiler intrinsics for Digital Signal Processing (DSP)
3.9 Compiler support for European Telecommunications Standards Institute (ETSI) basic operations
3.10 Overflow and carry status flags for C and C++ code
3.11 Texas Instruments (TI) C55x intrinsics for optimizing C code
3.12 Compiler support for accessing registers using named register variables
3.13 Pragmas recognized by the compiler
3.14 Compiler and processor support for bit-banding
3.15 Compiler type attribute, __attribute__((bitband))
3.16 --bitband compiler command-line option
3.17 How the compiler handles bit-band objects placed outside bit-band regions
3.18 Compiler support for thread-local storage
3.19 Compiler support for literal pools
3.20 Compiler eight-byte alignment features
3.21 Precompiled Header (PCH) files
3.22 Automatic Precompiled Header (PCH) file processing
3.23 Precompiled Header (PCH) file processing and the header stop point
3.24 Precompiled Header (PCH) file creation requirements
3.25 Compilation with multiple Precompiled Header (PCH) files
3.26 Obsolete Precompiled Header (PCH) files
3.27 Manually specifying the filename and location of a Precompiled Header (PCH) file
3.28 Selectively applying Precompiled Header (PCH) file processing
3.29 Suppressing Precompiled Header (PCH) file processing
3.30 Message output during Precompiled Header (PCH) processing
3.31 Performance issues with Precompiled Header (PCH) files
3.32 Default compiler options that are affected by optimization level
4 Compiler Coding Practices
4.1 The compiler as an optimizing compiler
4.2 Compiler optimization for code size versus speed
4.3 Compiler optimization levels and the debug view
4.4 Selecting the target processor at compile time
4.5 Enabling FPU for bare-metal
4.6 Optimization of loop termination in C code
4.7 Loop unrolling in C code
4.8 Compiler optimization and the volatile keyword
4.9 Code metrics
4.10 Code metrics for measurement of code size and data size
4.11 Stack use in C and C++
4.12 Benefits of reducing debug information in objects and libraries
4.13 Methods of reducing debug information in objects and libraries
4.14 Guarding against multiple inclusion of header files
4.15 Methods of minimizing function parameter passing overhead
4.16 Returning structures from functions through registers
4.17 Functions that return the same result when called with the same arguments
4.18 Comparison of pure and impure functions
4.19 Recommendation of postfix syntax when qualifying functions with ARM function modifiers
4.20 Inline functions
4.21 Compiler decisions on function inlining
4.22 Automatic function inlining and static functions
4.23 Inline functions and removal of unused out-of-line functions at link time
4.24 Automatic function inlining and multifile compilation
4.25 Restriction on overriding compiler decisions about function inlining
4.26 Compiler modes and inline functions
4.27 Inline functions in C++ and C90 mode
4.28 Inline functions in C99 mode
4.29 Inline functions and debugging
4.30 Types of data alignment
4.31 Advantages of natural data alignment
4.32 Compiler storage of data objects by natural byte alignment
4.33 Relevance of natural data alignment at compile time
4.34 Unaligned data access in C and C++ code
4.35 The __packed qualifier and unaligned data access in C and C++ code
4.36 Unaligned fields in structures
4.37 Performance penalty associated with marking whole structures as packed
4.38 Unaligned pointers in C and C++ code
4.39 Unaligned Load Register (LDR) instructions generated by the compiler
4.40 Comparisons of an unpacked struct, a __packed struct, and a struct with individually __packed fields, and of a __packed struct and a #pragma packed struct
4.41 Compiler support for floating-point arithmetic
4.42 Default selection of hardware or software floating-point support
4.43 Example of hardware and software support differences for floating-point arithmetic
4.44 Vector Floating-Point (VFP) architectures
4.45 Limitations on hardware handling of floating-point arithmetic
4.46 Implementation of Vector Floating-Point (VFP) support code
4.47 Compiler and library support for half-precision floating-point numbers
4.48 Half-precision floating-point number format
4.49 Compiler support for floating-point computations and linkage
4.50 Types of floating-point linkage
4.51 Compiler options for floating-point linkage and computations
4.52 Floating-point linkage and computational requirements of compiler options
4.53 Processors and their implicit Floating-Point Units (FPUs)
4.54 Integer division-by-zero errors in C code
4.55 Software floating-point division-by-zero errors in C code
4.56 About trapping software floating-point division-by-zero errors
4.57 Identification of software floating-point division-by-zero errors
4.58 Software floating-point division-by-zero debugging
4.59 New language features of C99
4.60 New library features of C99
4.61 // comments in C99 and C90
4.62 Compound literals in C99
4.63 Designated initializers in C99
4.64 Hexadecimal floating-point numbers in C99
4.65 Flexible array members in C99
4.66 __func__ predefined identifier in C99
4.67 inline functions in C99
4.68 long long data type in C99 and C90
4.69 Macros with a variable number of arguments in C99
4.70 Mixed declarations and statements in C99
4.71 New block scopes for selection and iteration statements in C99
4.72 _Pragma preprocessing operator in C99
4.73 Restricted pointers in C99
4.74 Additional <math.h> library functions in C99
4.75 Complex numbers in C99
4.76 Boolean type and <stdbool.h> in C99
4.77 Extended integer types and functions in <inttypes.h> and <stdint.h> in C99
4.78 <fenv.h> floating-point environment access in C99
4.79 <stdio.h> snprintf family of functions in C99
4.80 <tgmath.h> type-generic math macros in C99
4.81 <wchar.h> wide character I/O functions in C99
4.82 How to prevent uninitialized data from being initialized to zero
5 Compiler Diagnostic Messages
5.1 Severity of compiler diagnostic messages
5.2 Options that change the severity of compiler diagnostic messages
5.3 Controlling compiler diagnostic messages with pragmas
5.4 Prefix letters in compiler diagnostic messages
5.5 Compiler exit status codes and termination messages
5.6 Compiler data flow warnings
6 Using the Inline and Embedded Assemblers of the ARM Compiler
6.1 Compiler support for inline assembly language
6.2 Inline assembler support in the compiler
6.3 Restrictions on inline assembler support in the compiler
6.4 Inline assembly language syntax with the __asm keyword in C and C++
6.5 Inline assembly language syntax with the asm keyword in C++
6.6 Inline assembler rules for compiler keywords __asm and asm
6.7 Restrictions on inline assembly operations in C and C++ code
6.8 Inline assembler register restrictions in C and C++ code
6.9 Inline assembler processor mode restrictions in C and C++ code
6.10 Inline assembler Thumb instruction set restrictions in C and C++ code
6.11 Inline assembler Vector Floating-Point (VFP) restrictions in C and C++ code
6.12 Inline assembler instruction restrictions in C and C++ code
6.13 Miscellaneous inline assembler restrictions in C and C++ code
6.14 Inline assembler and register access in C and C++ code
6.15 Inline assembler and the # constant expression specifier in C and C++ code
6.16 Inline assembler and instruction expansion in C and C++ code
6.17 Expansion of inline assembler instructions that use constants
6.18 Expansion of inline assembler load and store instructions
6.19 Inline assembler effect on processor condition flags in C and C++ code
6.20 Inline assembler expression operands in C and C++ code
6.21 Inline assembler register list operands in C and C++ code
6.22 Inline assembler intermediate operands in C and C++ code
6.23 Inline assembler function calls and branches in C and C++ code
6.24 Inline assembler branches and labels in C and C++ code
6.25 Inline assembler and virtual registers
6.26 Embedded assembler support in the compiler
6.27 Embedded assembler syntax in C and C++
6.28 Effect of compiler ARM and Thumb states on embedded assembler
6.29 Restrictions on embedded assembly language functions in C and C++ code
6.30 Compiler generation of embedded assembly language functions
6.31 Access to C and C++ compile-time constant expressions from embedded assembler
6.32 Differences between expressions in embedded assembler and C or C++
6.33 Manual overload resolution in embedded assembler
6.34 __offsetof_base keyword for related base classes in embedded assembler
6.35 Compiler-supported keywords for calling class member functions in embedded assembler
6.36 __mcall_is_virtual(D, f)
6.37 __mcall_is_in_vbase(D, f)
6.38 __mcall_offsetof_vbase(D, f)
6.39 __mcall_this_offset(D, f)
6.40 __vcall_offsetof_vfunc(D, f)
6.41 Calling nonstatic member functions in embedded assembler
6.42 Calling a nonvirtual member function
6.43 Calling a virtual member function
6.44 Accessing sp (r13), lr (r14), and pc (r15)
6.45 Differences in compiler support for inline and embedded assembly code
7 Compiler Command-line Options
7.1 -Aopt
7.2 --allow_fpreg_for_nonfpdata, --no_allow_fpreg_for_nonfpdata
7.3 --allow_null_this, --no_allow_null_this
7.4 --alternative_tokens, --no_alternative_tokens
7.5 --anachronisms, --no_anachronisms
7.6 --apcs=qualifier...qualifier
7.7 --arm
7.8 --arm_only
7.9 --asm
7.10 --asm_dir=directory_name
7.11 --autoinline, --no_autoinline
7.12 --bigend
7.13 --bitband
7.14 --branch_tables, --no_branch_tables
7.15 --brief_diagnostics, --no_brief_diagnostics
7.16 --bss_threshold=num
7.17 -c
7.18 -C
7.19 --c90
7.20 --c99
7.21 --code_gen, --no_code_gen
7.22 --comment_section, --no_comment_section
7.23 --compatible=name
7.24 --compile_all_input, --no_compile_all_input
7.25 --conditionalize, --no_conditionalize
7.26 --cpp
7.27 --cpp11
7.28 --cpp_compat
7.29 --cpu=list
7.30 --cpu=name
7.31 --create_pch=filename
7.32 -Dname[(parm-list)][=def]
7.33 --data_reorder, --no_data_reorder
7.34 --debug, --no_debug
7.35 --debug_macros, --no_debug_macros
7.36 --default_extension=ext
7.37 --dep_name, --no_dep_name
7.38 --depend=filename
7.39 --depend_dir=directory_name
7.40 --depend_format=string
7.41 --depend_single_line, --no_depend_single_line
7.42 --depend_system_headers, --no_depend_system_headers
7.43 --depend_target=target
7.44 --diag_error=tag[,tag,...]
7.45 --diag_remark=tag[,tag,...]
7.46 --diag_style=arm|ide|gnu compiler option
7.47 --diag_suppress=tag[,tag,...]
7.48 --diag_suppress=optimizations
7.49 --diag_warning=tag[,tag,...]
7.50 --diag_warning=optimizations
7.51 --dollar, --no_dollar
7.52 --dwarf2
7.53 --dwarf3
7.54 -E
7.55 --echo
7.56 --emit_frame_directives, --no_emit_frame_directives
7.57 --enum_is_int
7.58 --errors=filename
7.59 --exceptions, --no_exceptions
7.60 --exceptions_unwind, --no_exceptions_unwind
7.61 --execute_only
7.62 --extended_initializers, --no_extended_initializers
7.63 --feedback=filename
7.64 --float_literal_pools, --no_float_literal_pools
7.65 --force_new_nothrow, --no_force_new_nothrow
7.66 --forceinline
7.67 --fp16_format=format
7.68 --fpmode=model
7.69 --fpu=list
7.70 --fpu=name
7.71 --friend_injection, --no_friend_injection
7.72 -g
7.73 --global_reg=reg_name[,reg_name,...]
7.74 --gnu
7.75 --guiding_decls, --no_guiding_decls
7.76 --help
7.77 -Idir[,dir,...]
7.78 --ignore_missing_headers
7.79 --implicit_include, --no_implicit_include
7.80 --implicit_include_searches, --no_implicit_include_searches
7.81 --implicit_key_function, --no_implicit_key_function
7.82 --implicit_typename, --no_implicit_typename
7.83 --info=totals
7.84 --inline, --no_inline
7.85 --integer_literal_pools, --no_integer_literal_pools
7.86 --interface_enums_are_32_bit
7.87 --interleave
7.88 -Jdir[,dir,...]
7.89 --kandr_include
7.90 -Lopt
7.91 --library_interface=lib
7.92 --library_type=lib
7.93 --liclinger=seconds
7.94 --link_all_input, --no_link_all_input
7.95 --list
7.96 --list_dir=directory_name
7.97 --list_macros
7.98 --littleend
7.99 --locale=lang_country
7.100 --long_long
7.101 --loop_optimization_level=opt
7.102 --loose_implicit_cast
7.103 --lower_ropi, --no_lower_ropi
7.104 --lower_rwpi, --no_lower_rwpi
7.105 -M
7.106 --md
7.107 --message_locale=lang_country[.codepage]
7.108 --min_array_alignment=opt
7.109 --mm
7.110 --multibyte_chars, --no_multibyte_chars
7.111 --multifile, --no_multifile
7.112 --multiply_latency=cycles
7.113 --narrow_volatile_bitfields
7.114 --nonstd_qualifier_deduction, --no_nonstd_qualifier_deduction
7.115 -o filename
7.116 -Onum
7.117 --old_specializations, --no_old_specializations
7.118 --old_style_preprocessing
7.119 --omf_browse
7.120 --ool_section_name, --no_ool_section_name
7.121 -Ospace
7.122 -Otime
7.123 --output_dir=directory_name
7.124 -P
7.125 --parse_templates, --no_parse_templates
7.126 --pch
7.127 --pch_dir=dir
7.128 --pch_messages, --no_pch_messages
7.129 --pch_verbose, --no_pch_verbose
7.130 --pending_instantiations=n
7.131 --phony_targets
7.132 --pointer_alignment=num
7.133 --preinclude=filename
7.134 --preprocess_assembly
7.135 --preprocessed
7.136 --protect_stack, --no_protect_stack
7.137 --reassociate_saturation, --no_reassociate_saturation
7.138 --reduce_paths, --no_reduce_paths
7.139 --remarks
7.140 --remove_unneeded_entities, --no_remove_unneeded_entities
7.141 --restrict, --no_restrict
7.142 --retain=option
7.143 --rtti, --no_rtti
7.144 --rtti_data, --no_rtti_data
7.145 -S
7.146 --share_inlineable_strings, --no_share_inlineable_strings
7.147 --show_cmdline
7.148 --signed_bitfields, --unsigned_bitfields
7.149 --signed_chars, --unsigned_chars
7.150 --split_ldm
7.151 --split_sections
7.152 --strict, --no_strict
7.153 --strict_warnings
7.154 --string_literal_pools, --no_string_literal_pools
7.155 --sys_include
7.156 --thumb
7.157 --trigraphs, --no_trigraphs
7.158 --type_traits_helpers, --no_type_traits_helpers
7.159 -Uname
7.160 --unaligned_access, --no_unaligned_access
7.161 --use_frame_pointer, --no_use_frame_pointer
7.162 --use_pch=filename
7.163 --using_std, --no_using_std
7.164 --version_number
7.165 --vfe, --no_vfe
7.166 --via=filename
7.167 --vla, --no_vla
7.168 --vsn
7.169 -W
7.170 --wchar, --no_wchar
7.171 --wchar16
7.172 --wchar32
7.173 --whole_program
7.174 --wrap_diagnostics, --no_wrap_diagnostics
8 Language Extensions
8.1 Preprocessor extensions
8.2 #assert
8.3 #include_next
8.4 #unassert
8.5 #warning
8.6 C99 language features available in C90
8.7 // comments
8.8 Subscripting struct
8.9 Flexible array members
8.10 C99 language features available in C++ and C90
8.11 Variadic macros
8.12 long long
8.13 restrict
8.14 Hexadecimal floats
8.15 Standard C language extensions
8.16 Constant expressions
8.17 Array and pointer extensions
8.18 Block scope function declarations
8.19 Dollar signs in identifiers
8.20 Top-level declarations
8.21 Benign redeclarations
8.22 External entities
8.23 Function prototypes
8.24 Standard C++ language extensions
8.25 ? operator
8.26 Declaration of a class member
8.27 friend
8.28 Read/write constants
8.29 Scalar type constants
8.30 Specialization of nonmember function templates
8.31 Type conversions
8.32 Standard C and Standard C++ language extensions
8.33 Address of a register variable
8.34 Arguments to functions
8.35 Anonymous classes, structures and unions
8.36 Assembler labels
8.37 Empty declaration
8.38 Hexadecimal floating-point constants
8.39 Incomplete enums
8.40 Integral type extensions
8.41 Label definitions
8.42 Long float
8.43 Nonstatic local variables
8.44 Structure, union, enum, and bitfield extensions
8.45 GNU extensions to the C and C++ languages
9 Compiler-specific Features
9.1 Keywords and operators
9.2 __align
9.3 __ALIGNOF__
9.4 __alignof__
9.5 __asm
9.6 __forceinline
9.7 __global_reg
9.8 __inline
9.9 __int64
9.10 __INTADDR__
9.11 __irq
9.12 __packed
9.13 __pure
9.14 __smc
9.15 __softfp
9.16 __svc
9.17 __svc_indirect
9.18 __svc_indirect_r7
9.19 __value_in_regs
9.20 __weak
9.21 __writeonly
9.22 __declspec attributes
9.23 __declspec(noinline)
9.24 __declspec(noreturn)
9.25 __declspec(nothrow)
9.26 __declspec(notshared)
9.27 __declspec(thread)
9.28 Function attributes
9.29 __attribute__((alias)) function attribute
9.30 __attribute__((always_inline)) function attribute
9.31 __attribute__((const)) function attribute
9.32 __attribute__((deprecated)) function attribute
9.33 __attribute__((destructor[(priority)])) function attribute
9.34 __attribute__((format)) function attribute
9.35 __attribute__((format_arg(string-index))) function attribute
9.36 __attribute__((malloc)) function attribute
9.37 __attribute__((noinline)) function attribute
9.38 __attribute__((no_instrument_function)) function attribute
9.39 __attribute__((nomerge)) function attribute
9.40 __attribute__((nonnull)) function attribute
9.41 __attribute__((noreturn)) function attribute
9.42 __attribute__((notailcall)) function attribute
9.43 __attribute__((nothrow)) function attribute
9.44 __attribute__((pcs("calling_convention"))) function attribute
9.45 __attribute__((pure)) function attribute
9.46 __attribute__((section("name"))) function attribute
9.47 __attribute__((sentinel)) function attribute
9.48 __attribute__((unused)) function attribute
9.49 __attribute__((used)) function attribute
9.50 __attribute__((visibility("visibility_type"))) function attribute
9.51 __attribute__((warn_unused_result))
9.52 __attribute__((weak)) function attribute
9.53 __attribute__((weakref("target"))) function attribute
9.54 Type attributes
9.55 __attribute__((bitband)) type attribute
9.56 __attribute__((aligned)) type attribute
9.57 __attribute__((packed)) type attribute
9.58 Variable attributes
9.59 __attribute__((alias)) variable attribute
9.60 __attribute__((at(address))) variable attribute
9.61 __attribute__((aligned)) variable attribute
9.62 __attribute__((deprecated)) variable attribute
9.63 __attribute__((noinline)) constant variable attribute
9.64 __attribute__((packed)) variable attribute
9.65 __attribute__((section("name"))) variable attribute
9.66 __attribute__((unused)) variable attribute
9.67 __attribute__((used)) variable attribute
9.68 __attribute__((visibility("visibility_type"))) variable attribute
9.69 __attribute__((weak)) variable attribute
9.70 __attribute__((weakref("target"))) variable attribute
9.71 __attribute__((zero_init)) variable attribute
9.72 Pragmas
9.73 #pragma anon_unions, #pragma no_anon_unions
9.74 #pragma arm
9.75 #pragma arm section [section_type_list]
9.76 #pragma diag_default tag[,tag,...]
9.77 #pragma diag_error tag[,tag,...]
9.78 #pragma diag_remark tag[,tag,...]
9.79 #pragma diag_suppress tag[,tag,...]
9.80 #pragma diag_warning tag[, tag, ...]
9.81 #pragma exceptions_unwind, #pragma no_exceptions_unwind
9.82 #pragma GCC system_header
9.83 #pragma hdrstop
9.84 #pragma import symbol_name
9.85 #pragma import(__use_full_stdio)
9.86 #pragma import(__use_smaller_memcpy)
9.87 #pragma inline, #pragma no_inline
9.88 #pragma no_pch
9.89 #pragma Onum
9.90 #pragma once
9.91 #pragma Ospace
9.92 #pragma Otime
9.93 #pragma pack(n)
9.94 #pragma pop
9.95 #pragma push
9.96 #pragma softfp_linkage, #pragma no_softfp_linkage
9.97 #pragma thumb
9.98 #pragma unroll [(n)]
9.99 #pragma unroll_completely
9.100 #pragma weak symbol, #pragma weak symbol1 = symbol2
9.101 Instruction intrinsics
9.102 __breakpoint intrinsic
9.103 __cdp intrinsic
9.104 __clrex intrinsic
9.105 __clz intrinsic
9.106 __current_pc intrinsic
9.107 __current_sp intrinsic
9.108 __disable_fiq intrinsic
9.109 __disable_irq intrinsic
9.110 __dmb intrinsic
9.111 __dsb intrinsic
9.112 __enable_fiq intrinsic
9.113 __enable_irq intrinsic
9.114 __fabs intrinsic
9.115 __fabsf intrinsic
9.116 __force_loads intrinsic
9.117 __force_stores intrinsic
9.118 __isb intrinsic
9.119 __ldrex intrinsic
9.120 __ldrexd intrinsic
9.121 __ldrt intrinsic
9.122 __memory_changed intrinsic
9.123 __nop intrinsic
9.124 __pld intrinsic
9.125 __pli intrinsic
9.126 __qadd intrinsic
9.127 __qdbl intrinsic
9.128 __qsub intrinsic
9.129 __rbit intrinsic
9.130 __rev intrinsic
9.131 __return_address intrinsic
9.132 __ror intrinsic
9.133 __schedule_barrier intrinsic
9.134 __semihost intrinsic
9.135 __sev intrinsic
9.136 __sqrt intrinsic
9.137 __sqrtf intrinsic
9.138 __ssat intrinsic
9.139 __strex intrinsic
9.140 __strexd intrinsic
9.141 __strt intrinsic
9.142 __swp intrinsic
9.143 __usat intrinsic
9.144 __wfe intrinsic
9.145 __wfi intrinsic
9.146 __yield intrinsic
9.147 ARMv6 SIMD intrinsics
9.148 ETSI basic operations
9.149 C55x intrinsics
9.150 VFP status intrinsic
9.151 __vfp_status intrinsic
9.152 Fused Multiply Add (FMA) intrinsics
9.153 Named register variables
9.154 GNU built-in functions
9.155 Predefined macros
9.156 Built-in function name variables
10 C and C++ Implementation Details
10.1 Character sets and identifiers in ARM C and C++
10.2 Basic data types in ARM C and C++
10.3 Operations on basic data types ARM C and C++
10.4 Structures, unions, enumerations, and bitfields in ARM C and C++
10.5 Using the ::operator new function in ARM C++
10.6 Tentative arrays in ARM C++
10.7 Old-style C parameters in ARM C++ functions
10.8 Anachronisms in ARM C++
10.9 Template instantiation in ARM C++
10.10 Namespaces in ARM C++
10.11 C++ exception handling in ARM C++
10.12 Extern inline functions in ARM C++
10.13 C++11 supported features
11 What is Semihosting?
11.1 What is semihosting?
11.2 The semihosting interface
11.3 Can I change the semihosting operation numbers?
11.4 Debug agent interaction SVCs
11.5 angel_SWIreason_EnterSVC (0x17)
11.6 angel_SWIreason_ReportException (0x18)
11.7 SYS_CLOSE (0x02)
11.8 SYS_CLOCK (0x10)
11.9 SYS_ELAPSED (0x30)
11.10 SYS_ERRNO (0x13)
11.11 SYS_FLEN (0x0C)
11.12 SYS_GET_CMDLINE (0x15)
11.13 SYS_HEAPINFO (0x16)
11.14 SYS_ISERROR (0x08)
11.15 SYS_ISTTY (0x09)
11.16 SYS_OPEN (0x01)
11.17 SYS_READ (0x06)
11.18 SYS_READC (0x07)
11.19 SYS_REMOVE (0x0E)
11.20 SYS_RENAME (0x0F)
11.21 SYS_SEEK (0x0A)
11.22 SYS_SYSTEM (0x12)
11.23 SYS_TICKFREQ (0x31)
11.24 SYS_TIME (0x11)
11.25 SYS_TMPNAM (0x0D)
11.26 SYS_WRITE (0x05)
11.27 SYS_WRITEC (0x03)
11.28 SYS_WRITE0 (0x04)
12 Via File Syntax
12.1 Overview of via files
12.2 Via file syntax rules
13 Summary Table of GNU Language Extensions
13.1 Supported GNU extensions
14 Standard C Implementation Definition
14.1 Implementation definition
14.2 Translation
14.3 Environment
14.4 Identifiers
14.5 Characters
14.6 Integers
14.7 Floating-point
14.8 Arrays and pointers
14.9 Registers
14.10 Structures, unions, enumerations, and bitfields
14.11 Qualifiers
14.12 Expression evaluation
14.13 Preprocessing directives
14.14 Library functions
14.15 Behaviors considered undefined by the ISO C Standard
15 Standard C++ Implementation Definition
15.1 Integral conversion
15.2 Calling a pure virtual function
15.3 Major features of language support
15.4 Standard C++ library implementation definition
16 C and C++ Compiler Implementation Limits
16.1 C++ ISO/IEC standard limits
16.2 Limits for integral numbers
16.3 Limits for floating-point numbers

List of Tables

2-1 Filename suffixes recognized by the compiler
2-2 Include file search paths
4-1 C code for incrementing and decrementing loops
4-2 C Disassembly for incrementing and decrementing loops
4-3 C code for rolled and unrolled bit-counting loops
4-4 Disassembly for rolled and unrolled bit-counting loops
4-5 C code for nonvolatile and volatile buffer loops
4-6 Disassembly for nonvolatile and volatile buffer loop
4-7 C code for pure and impure functions
4-8 Disassembly for pure and impure functions
4-9 Compiler storage of data objects by byte alignment
4-10 C code for an unpacked struct, a packed struct, and a struct with individually packed fields
4-11 Disassembly for an unpacked struct, a packed struct, and a struct with individually packed fields
4-12 C code for a packed struct and a pragma packed struct
4-13 Compiler options for floating-point linkage and floating-point computations
4-14 FPU-option capabilities and requirements
4-15 Implicit FPUs of processors
5-1 Severity of diagnostic messages
5-2 Identifying diagnostic messages
6-1 Differences between inline and embedded assembler
7-1 Compiling with the --asm option
7-2 Compatible processor or architecture combinations
7-3 Compiling with the --interleave option
7-4 Compiling with the -o option
7-5 Compiling without the -o option
8-1 Behavior of constant value initializers in comparison with ISO Standard C
9-1 Keyword extensions that the ARM compiler supports
9-2 __declspec attributes that the compiler supports, and their equivalents
9-3 Function attributes that the compiler supports, and their equivalents
9-4 Type attributes that the compiler supports, and their equivalents
9-5 Variable attributes that the compiler supports, and their equivalents
9-6 Pragmas that the compiler supports
9-7 Instruction intrinsics that the ARM compiler supports
9-8 Access widths that the __ldrex intrinsic supports
9-9 Access widths that the __ldrex intrinsic supports
9-10 Access widths that the __ldrt intrinsic supports
9-11 Access widths that the __strex intrinsic supports
9-12 Access widths that the __strexd intrinsic supports
9-13 Access widths that the __strt intrinsic supports
9-14 Access widths that the __swp intrinsic supports
9-15 ETSI basic operations that the ARM compilation tools support
9-16 ETSI status flags exposed in the ARM compilation tools
9-17 TI C55x intrinsics that the compilation tools support
9-18 Modifying the FPSCR flags
9-19 Named registers available on ARM architecture-based processors
9-20 Named registers available on targets with floating-point hardware
9-21 Predefined macros
9-22 Thumb architecture versions in relation to ARM architecture versions
9-23 built-in variables
10-1 Character escape codes
10-2 Size and alignment of data types
11-1 Hardware vector reason codes
11-2 Software reason codes
11-3 Value of mode
13-1 Supported GNU extensions
14-1 Character escape codes
15-1 Major feature support for language
16-1 Implementation limits
16-2 Integer ranges
16-3 Floating-point limits
16-4 Other floating-point characteristics

Release Information

Document History
Issue Date Confidentiality Change
A May 2007 Non-Confidential Release for RVCT v3.1 Release for µVision
B December 2008 Non-Confidential Release for RVCT v4.0 Release for µVision
C June 2011 Non-Confidential Release for ARM Compiler v4.1 for µVision
D July 2012 Non-Confidential Release for ARM Compiler v5.02 for µVision
E 30 May 2014 Non-Confidential Release for ARM Compiler v5.04 for µVision
F 12 December 2014 Non-Confidential Release for ARM Compiler v5.05 for µVision
G 15 August 2015 Non-Confidential Release for ARM Compiler v5.06 for µVision
H 17 June 2016 Non-Confidential Release for ARM Compiler v5.06 update 3 and update 5 for µVision

Non-Confidential Proprietary Notice

This document is protected by copyright and other related rights and the practice or implementation of the information contained in this document may be protected by one or more patents or pending patent applications. No part of this document may be reproduced in any form by any means without the express prior written permission of ARM. No license, express or implied, by estoppel or otherwise to any intellectual property rights is granted by this document unless specifically stated.
Your access to the information in this document is conditional upon your acceptance that you will not use or permit others to use the information for the purposes of determining whether implementations infringe any third party patents.
THIS DOCUMENT IS PROVIDED “AS IS”. ARM PROVIDES NO REPRESENTATIONS AND NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, NON-INFRINGEMENT OR FITNESS FOR A PARTICULAR PURPOSE WITH RESPECT TO THE DOCUMENT. For the avoidance of doubt, ARM makes no representation with respect to, and has undertaken no analysis to identify or understand the scope and content of, third party patents, copyrights, trade secrets, or other rights.
This document may include technical inaccuracies or typographical errors.
TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL ARM BE LIABLE FOR ANY DAMAGES, INCLUDING WITHOUT LIMITATION ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF ANY USE OF THIS DOCUMENT, EVEN IF ARM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
This document consists solely of commercial items. You shall be responsible for ensuring that any use, duplication or disclosure of this document complies fully with any relevant export laws and regulations to assure that this document or any portion thereof is not exported, directly or indirectly, in violation of such export laws. Use of the word “partner” in reference to ARM’s customers is not intended to create or refer to any partnership relationship with any other company. ARM may make changes to this document at any time and without notice.
If any of the provisions contained in these terms conflict with any of the provisions of any signed written agreement covering this document with ARM, then the signed written agreement prevails over and supersedes the conflicting provisions of these terms. This document may be translated into other languages for convenience, and you agree that if there is any conflict between the English version of this document and any translation, the terms of the English version of the Agreement shall prevail.
Words and logos marked with ® or ™ are registered trademarks or trademarks of ARM Limited or its affiliates in the EU and/or elsewhere. All rights reserved. Other brands and names mentioned in this document may be the trademarks of their respective owners. Please follow ARM’s trademark usage guidelines at http://www.arm.com/about/trademark-usage-guidelines.php
Copyright © 2007, 2008, 2011, 2012, 2014-2016, ARM Limited or its affiliates. All rights reserved.
ARM Limited. Company 02557590 registered in England.
110 Fulbourn Road, Cambridge, England CB1 9NJ.
LES-PRE-20349

Additional Notices

Some material in this document is based on IEEE 754-1985 IEEE Standard for Binary Floating-Point Arithmetic. The IEEE disclaims any responsibility or liability resulting from the placement and use in the described manner.

Confidentiality Status

This document is Non-Confidential. The right to use, copy and disclose this document may be subject to license restrictions in accordance with the terms of the agreement entered into by ARM and the party that ARM delivered this document to.
Unrestricted Access is an ARM internal classification.

Product Status

The information in this document is Final, that is for a developed product.

Web Address

Non-Confidential PDF file icon PDF version ARM DUI0375H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved.  
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.