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

Version 5

Table of Contents

About this book
Using this book
Typographic conventions
Other information
1 Overview of the Compiler
1.1 The compiler
1.2 Source language modes of the compiler
1.3 ISO C90
1.4 ISO C99
1.5 ISO C++
1.6 Language extensions
1.7 Language compliance
1.8 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.18 Minimizing compilation build time
2.19 Minimizing compilation build time with a single armcc invocation
2.20 Effect of --multifile on compilation build time
2.21 Minimizing compilation build time with parallel make
2.22 Compilation build time and operating system choice
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 Using compiler and linker support for symbol versions
3.22 Precompiled Header (PCH) files
3.23 Automatic Precompiled Header (PCH) file processing
3.24 Precompiled Header (PCH) file processing and the header stop point
3.25 Precompiled Header (PCH) file creation requirements
3.26 Compilation with multiple Precompiled Header (PCH) files
3.27 Obsolete Precompiled Header (PCH) files
3.28 Manually specifying the filename and location of a Precompiled Header (PCH) file
3.29 Selectively applying Precompiled Header (PCH) file processing
3.30 Suppressing Precompiled Header (PCH) file processing
3.31 Message output during Precompiled Header (PCH) processing
3.32 Performance issues with Precompiled Header (PCH) files
3.33 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 Optimization of loop termination in C code
4.6 Loop unrolling in C code
4.7 Compiler optimization and the volatile keyword
4.8 Code metrics
4.9 Code metrics for measurement of code size and data size
4.10 Stack use in C and C++
4.11 Benefits of reducing debug information in objects and libraries
4.12 Methods of reducing debug information in objects and libraries
4.13 Guarding against multiple inclusion of header files
4.14 Methods of minimizing function parameter passing overhead
4.15 Returning structures from functions through registers
4.16 Functions that return the same result when called with the same arguments
4.17 Comparison of pure and impure functions
4.18 Recommendation of postfix syntax when qualifying functions with ARM function modifiers
4.19 Inline functions
4.20 Compiler decisions on function inlining
4.21 Automatic function inlining and static functions
4.22 Inline functions and removal of unused out-of-line functions at link time
4.23 Automatic function inlining and multifile compilation
4.24 Restriction on overriding compiler decisions about function inlining
4.25 Compiler modes and inline functions
4.26 Inline functions in C++ and C90 mode
4.27 Inline functions in C99 mode
4.28 Inline functions and debugging
4.29 Types of data alignment
4.30 Advantages of natural data alignment
4.31 Compiler storage of data objects by natural byte alignment
4.32 Relevance of natural data alignment at compile time
4.33 Unaligned data access in C and C++ code
4.34 The __packed qualifier and unaligned data access in C and C++ code
4.35 Unaligned fields in structures
4.36 Performance penalty associated with marking whole structures as packed
4.37 Unaligned pointers in C and C++ code
4.38 Unaligned Load Register (LDR) instructions generated by the compiler
4.39 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.40 Compiler support for floating-point arithmetic
4.41 Default selection of hardware or software floating-point support
4.42 Example of hardware and software support differences for floating-point arithmetic
4.43 Vector Floating-Point (VFP) architectures
4.44 Limitations on hardware handling of floating-point arithmetic
4.45 Implementation of Vector Floating-Point (VFP) support code
4.46 Compiler and library support for half-precision floating-point numbers
4.47 Half-precision floating-point number format
4.48 Compiler support for floating-point computations and linkage
4.49 Types of floating-point linkage
4.50 Compiler options for floating-point linkage and computations
4.51 Floating-point linkage and computational requirements of compiler options
4.52 Processors and their implicit Floating-Point Units (FPUs)
4.53 Integer division-by-zero errors in C code
4.54 About trapping integer division-by-zero errors with __aeabi_idiv0()
4.55 About trapping integer division-by-zero errors with __rt_raise()
4.56 Identification of integer division-by-zero errors in C code
4.57 Examining parameters when integer division-by-zero errors occur in C code
4.58 Software floating-point division-by-zero errors in C code
4.59 About trapping software floating-point division-by-zero errors
4.60 Identification of software floating-point division-by-zero errors
4.61 Software floating-point division-by-zero debugging
4.62 New language features of C99
4.63 New library features of C99
4.64 // comments in C99 and C90
4.65 Compound literals in C99
4.66 Designated initializers in C99
4.67 Hexadecimal floating-point numbers in C99
4.68 Flexible array members in C99
4.69 __func__ predefined identifier in C99
4.70 inline functions in C99
4.71 long long data type in C99 and C90
4.72 Macros with a variable number of arguments in C99
4.73 Mixed declarations and statements in C99
4.74 New block scopes for selection and iteration statements in C99
4.75 _Pragma preprocessing operator in C99
4.76 Restricted pointers in C99
4.77 Additional <math.h> library functions in C99
4.78 Complex numbers in C99
4.79 Boolean type and <stdbool.h> in C99
4.80 Extended integer types and functions in <inttypes.h> and <stdint.h> in C99
4.81 <fenv.h> floating-point environment access in C99
4.82 <stdio.h> snprintf family of functions in C99
4.83 <tgmath.h> type-generic math macros in C99
4.84 <wchar.h> wide character I/O functions in C99
4.85 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 --compatible=name
7.23 --compile_all_input, --no_compile_all_input
7.24 --conditionalize, --no_conditionalize
7.25 --cpp
7.26 --cpu=list
7.27 --cpu=name compiler option
7.28 --create_pch=filename
7.29 -Dname[(parm-list)][=def]
7.30 --data_reorder, --no_data_reorder
7.31 --debug, --no_debug
7.32 --debug_macros, --no_debug_macros
7.33 --default_extension=ext
7.34 --dep_name, --no_dep_name
7.35 --depend=filename
7.36 --depend_dir=directory_name
7.37 --depend_format=string
7.38 --depend_single_line, --no_depend_single_line
7.39 --depend_system_headers, --no_depend_system_headers
7.40 --depend_target=target
7.41 --diag_error=tag[,tag,...]
7.42 --diag_remark=tag[,tag,...]
7.43 --diag_style=arm|ide|gnu compiler option
7.44 --diag_suppress=tag[,tag,...]
7.45 --diag_suppress=optimizations
7.46 --diag_warning=tag[,tag,...]
7.47 --diag_warning=optimizations
7.48 --dollar, --no_dollar
7.49 --dwarf2
7.50 --dwarf3
7.51 -E
7.52 --echo
7.53 --emit_frame_directives, --no_emit_frame_directives
7.54 --enum_is_int
7.55 --errors=filename
7.56 --exceptions, --no_exceptions
7.57 --exceptions_unwind, --no_exceptions_unwind
7.58 --execute_only
7.59 --extended_initializers, --no_extended_initializers
7.60 --feedback=filename
7.61 --float_literal_pools, --no_float_literal_pools
7.62 --force_new_nothrow, --no_force_new_nothrow
7.63 --forceinline
7.64 --fp16_format=format
7.65 --fpmode=model
7.66 --fpu=list
7.67 --fpu=name compiler option
7.68 --friend_injection, --no_friend_injection
7.69 -g
7.70 --global_reg=reg_name[,reg_name,...]
7.71 --guiding_decls, --no_guiding_decls
7.72 --help
7.73 -Idir[,dir,...]
7.74 --ignore_missing_headers
7.75 --implicit_include, --no_implicit_include
7.76 --implicit_include_searches, --no_implicit_include_searches
7.77 --implicit_key_function, --no_implicit_key_function
7.78 --implicit_typename, --no_implicit_typename
7.79 --info=totals
7.80 --inline, --no_inline
7.81 --integer_literal_pools, --no_integer_literal_pools
7.82 --interface_enums_are_32_bit
7.83 --interleave
7.84 -Jdir[,dir,...]
7.85 --kandr_include
7.86 -Lopt
7.87 --library_interface=lib
7.88 --library_type=lib
7.89 --licretry
7.90 --link_all_input, --no_link_all_input
7.91 --list
7.92 --list_dir=directory_name
7.93 --list_macros
7.94 --littleend
7.95 --locale=lang_country
7.96 --long_long
7.97 --loop_optimization_level=opt
7.98 --loose_implicit_cast
7.99 --lower_ropi, --no_lower_ropi
7.100 --lower_rwpi, --no_lower_rwpi
7.101 -M
7.102 --md
7.103 --message_locale=lang_country[.codepage]
7.104 --min_array_alignment=opt
7.105 --mm
7.106 --multibyte_chars, --no_multibyte_chars
7.107 --multifile, --no_multifile
7.108 --multiply_latency=cycles
7.109 --nonstd_qualifier_deduction, --no_nonstd_qualifier_deduction
7.110 -o filename
7.111 -Onum
7.112 --old_specializations, --no_old_specializations
7.113 --old_style_preprocessing
7.114 --omf_browse
7.115 -Ospace
7.116 -Otime
7.117 --output_dir=directory_name
7.118 -P
7.119 --parse_templates, --no_parse_templates
7.120 --pch
7.121 --pch_dir=dir
7.122 --pch_messages, --no_pch_messages
7.123 --pch_verbose, --no_pch_verbose
7.124 --pending_instantiations=n
7.125 --phony_targets
7.126 --pointer_alignment=num
7.127 --preinclude=filename
7.128 --preprocess_assembly
7.129 --preprocessed
7.130 --protect_stack, --no_protect_stack
7.131 --reassociate_saturation, --no_reassociate_saturation
7.132 --reduce_paths, --no_reduce_paths
7.133 --remarks
7.134 --remove_unneeded_entities, --no_remove_unneeded_entities
7.135 --restrict, --no_restrict
7.136 --retain=option
7.137 --rtti, --no_rtti
7.138 --rtti_data, --no_rtti_data
7.139 -S
7.140 --show_cmdline
7.141 --signed_bitfields, --unsigned_bitfields
7.142 --signed_chars, --unsigned_chars
7.143 --split_ldm
7.144 --split_sections
7.145 --strict, --no_strict
7.146 --strict_warnings
7.147 --string_literal_pools, --no_string_literal_pools
7.148 --sys_include
7.149 --thumb
7.150 --trigraphs, --no_trigraphs
7.151 --type_traits_helpers, --no_type_traits_helpers
7.152 -Uname
7.153 --unaligned_access, --no_unaligned_access
7.154 --use_frame_pointer
7.155 --use_pch=filename
7.156 --using_std, --no_using_std
7.157 --version_number
7.158 --vfe, --no_vfe
7.159 --via=filename
7.160 --vla, --no_vla
7.161 --vsn
7.162 -W
7.163 --wchar, --no_wchar
7.164 --wchar16
7.165 --wchar32
7.166 --whole_program
7.167 --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
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(dllexport)
9.24 __declspec(dllimport)
9.25 __declspec(noinline)
9.26 __declspec(noreturn)
9.27 __declspec(nothrow)
9.28 __declspec(notshared)
9.29 __declspec(thread)
9.30 Function attributes
9.31 __attribute__((alias)) function attribute
9.32 __attribute__((always_inline)) function attribute
9.33 __attribute__((const)) function attribute
9.34 __attribute__((constructor[(priority)])) function attribute
9.35 __attribute__((deprecated)) function attribute
9.36 __attribute__((destructor[(priority)])) function attribute
9.37 __attribute__((format_arg(string-index))) function attribute
9.38 __attribute__((malloc)) function attribute
9.39 __attribute__((noinline)) function attribute
9.40 __attribute__((nomerge)) function attribute
9.41 __attribute__((nonnull)) function attribute
9.42 __attribute__((noreturn)) function attribute
9.43 __attribute__((notailcall)) 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__((weak)) function attribute
9.52 __attribute__((weakref("target"))) function attribute
9.53 Type attributes
9.54 __attribute__((bitband)) type attribute
9.55 __attribute__((aligned)) type attribute
9.56 __attribute__((packed)) type attribute
9.57 Variable attributes
9.58 __attribute__((alias)) variable attribute
9.59 __attribute__((at(address))) variable attribute
9.60 __attribute__((aligned)) variable attribute
9.61 __attribute__((deprecated)) variable attribute
9.62 __attribute__((noinline)) constant variable attribute
9.63 __attribute__((packed)) variable attribute
9.64 __attribute__((section("name"))) variable attribute
9.65 __attribute__((unused)) variable attribute
9.66 __attribute__((used)) variable attribute
9.67 __attribute__((visibility("visibility_type"))) variable attribute
9.68 __attribute__((weak)) variable attribute
9.69 __attribute__((weakref("target"))) variable attribute
9.70 __attribute__((zero_init)) variable attribute
9.71 Pragmas
9.72 #pragma anon_unions, #pragma no_anon_unions
9.73 #pragma arm
9.74 #pragma arm section [section_type_list]
9.75 #pragma diag_default tag[,tag,...]
9.76 #pragma diag_error tag[,tag,...]
9.77 #pragma diag_remark tag[,tag,...]
9.78 #pragma diag_suppress tag[,tag,...]
9.79 #pragma diag_warning tag[, tag, ...]
9.80 #pragma exceptions_unwind, #pragma no_exceptions_unwind
9.81 #pragma hdrstop
9.82 #pragma import symbol_name
9.83 #pragma import(__use_full_stdio)
9.84 #pragma import(__use_smaller_memcpy)
9.85 #pragma inline, #pragma no_inline
9.86 #pragma no_pch
9.87 #pragma Onum
9.88 #pragma once
9.89 #pragma Ospace
9.90 #pragma Otime
9.91 #pragma pack(n)
9.92 #pragma pop
9.93 #pragma push
9.94 #pragma softfp_linkage, #pragma no_softfp_linkage
9.95 #pragma thumb
9.96 #pragma unroll [(n)]
9.97 #pragma unroll_completely
9.98 #pragma weak symbol, #pragma weak symbol1 = symbol2
9.99 Instruction intrinsics
9.100 __breakpoint intrinsic
9.101 __cdp intrinsic
9.102 __clrex intrinsic
9.103 __clz intrinsic
9.104 __current_pc intrinsic
9.105 __current_sp intrinsic
9.106 __disable_fiq intrinsic
9.107 __disable_irq intrinsic
9.108 __enable_fiq intrinsic
9.109 __enable_irq intrinsic
9.110 __fabs intrinsic
9.111 __fabsf intrinsic
9.112 __force_stores intrinsic
9.113 __ldrex intrinsic
9.114 __ldrexd intrinsic
9.115 __ldrt intrinsic
9.116 __memory_changed intrinsic
9.117 __nop intrinsic
9.118 __pld intrinsic
9.119 __pldw intrinsic
9.120 __pli intrinsic
9.121 __promise intrinsic
9.122 __qadd intrinsic
9.123 __qdbl intrinsic
9.124 __qsub intrinsic
9.125 __rbit intrinsic
9.126 __rev intrinsic
9.127 __return_address intrinsic
9.128 __ror intrinsic
9.129 __schedule_barrier intrinsic
9.130 __semihost intrinsic
9.131 __sev intrinsic
9.132 __sqrt intrinsic
9.133 __sqrtf intrinsic
9.134 __ssat intrinsic
9.135 __strex intrinsic
9.136 __strexd intrinsic
9.137 __strt intrinsic
9.138 __swp intrinsic
9.139 __usat intrinsic
9.140 __wfe intrinsic
9.141 __wfi intrinsic
9.142 __yield intrinsic
9.143 ARMv6 SIMD intrinsics
9.144 ETSI basic operations
9.145 C55x intrinsics
9.146 VFP status intrinsic
9.147 __vfp_status intrinsic
9.148 Fused Multiply Add (FMA) intrinsics
9.149 Named register variables
9.150 Predefined macros
9.151 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++
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 ARMv6 SIMD Instruction Intrinsics
12.1 ARMv6 SIMD intrinsics by prefix
12.2 ARMv6 SIMD intrinsics, summary descriptions, byte lanes, affected flags
12.3 ARMv6 SIMD intrinsics, compatible processors and architectures
12.4 ARMv6 SIMD instruction intrinsics and APSR GE flags
12.5 __qadd16 intrinsic
12.6 __qadd8 intrinsic
12.7 __qasx intrinsic
12.8 __qsax intrinsic
12.9 __qsub16 intrinsic
12.10 __qsub8 intrinsic
12.11 __sadd16 intrinsic
12.12 __sadd8 intrinsic
12.13 __sasx intrinsic
12.14 __sel intrinsic
12.15 __shadd16 intrinsic
12.16 __shadd8 intrinsic
12.17 __shasx intrinsic
12.18 __shsax intrinsic
12.19 __shsub16 intrinsic
12.20 __shsub8 intrinsic
12.21 __smlad intrinsic
12.22 __smladx intrinsic
12.23 __smlald intrinsic
12.24 __smlaldx intrinsic
12.25 __smlsd intrinsic
12.26 __smlsdx intrinsic
12.27 __smlsld intrinsic
12.28 __smlsldx intrinsic
12.29 __smuad intrinsic
12.30 __smuadx intrinsic
12.31 __smusd intrinsic
12.32 __smusdx intrinsic
12.33 __ssat16 intrinsic
12.34 __ssax intrinsic
12.35 __ssub16 intrinsic
12.36 __ssub8 intrinsic
12.37 __sxtab16 intrinsic
12.38 __sxtb16 intrinsic
12.39 __uadd16 intrinsic
12.40 __uadd8 intrinsic
12.41 __uasx intrinsic
12.42 __uhadd16 intrinsic
12.43 __uhadd8 intrinsic
12.44 __uhasx intrinsic
12.45 __uhsax intrinsic
12.46 __uhsub16 intrinsic
12.47 __uhsub8 intrinsic
12.48 __uqadd16 intrinsic
12.49 __uqadd8 intrinsic
12.50 __uqasx intrinsic
12.51 __uqsax intrinsic
12.52 __uqsub16 intrinsic
12.53 __uqsub8 intrinsic
12.54 __usad8 intrinsic
12.55 __usada8 intrinsic
12.56 __usat16 intrinsic
12.57 __usax intrinsic
12.58 __usub16 intrinsic
12.59 __usub8 intrinsic
12.60 __uxtab16 intrinsic
12.61 __uxtb16 intrinsic
13 Via File Syntax
13.1 Overview of via files
13.2 Via file syntax rules
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 Figures

4-1 Half-precision floating-point format
9-1 Nonpacked structure S
9-2 Packed structure SP
10-1 Conventional nonpacked structure example
10-2 Bitfield allocation 1
10-3 Bitfield allocation 2
11-1 Semihosting overview
14-1 Conventional nonpacked structure example
14-2 Bitfield allocation 1
14-3 Bitfield allocation 2

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 Supported ARM architectures
7-4 Compiling with the --interleave option
7-5 Compiling with the -o option
7-6 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
12-1 ARMv6 SIMD intrinsics by prefix
12-2 ARMv6 SIMD intrinsics, summary descriptions, byte lanes, affected flags
12-3 ARMv6 SIMD intrinsics, compatible processors and architectures
12-4 ARMv6 SIMD instruction intrinsics and APSR GE flags
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

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.
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.
Copyright © [2007, 2008, 2011, 2012, 2014], ARM Limited or its affiliates. All rights reserved.
ARM Limited. Company 02557590 registered in England.
110 Fulbourn Road, Cambridge, England CB1 9NJ.

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-ConfidentialPDF file icon PDF versionARM DUI0375E
Copyright © 2007, 2008, 2011, 2012, 2014 ARM. All rights reserved.