Keil Logo

Technical Support

On-Line Manuals

Compiler Reference Guide

Preface Arm Compiler Tools Overview armclang Reference armclang Command-line Options Summary of armclang command-line options -C (armclang) -c (armclang) -D -E -e -fbare-metal-pie -fbracket-depth=N -fcommon, -fno-common -fdata-sections, -fno-data-sections -ffast-math, -fno-fast-math -ffixed-rN -ffp-mode -ffunction-sections, -fno-function-sections -fident, -fno-ident @file -fldm-stm, -fno-ldm-stm -fno-builtin -fno-inline-functions -flto, -fno-lto -fexceptions, -fno-exceptions -fomit-frame-pointer, -fno-omit-frame-pointer -fpic, -fno-pic -fropi, -fno-ropi -fropi-lowering, -fno-ropi-lowering -frwpi, -fno-rwpi -frwpi-lowering, -fno-rwpi-lowering -fsanitize -fshort-enums, -fno-short-enums -fshort-wchar, -fno-short-wchar -fstack-protector, -fstack-protector-all, -fstack- -fstrict-aliasing, -fno-strict-aliasing -fsysv, -fno-sysv -ftrapv -fvectorize, -fno-vectorize -fvisibility -fwrapv -g, -gdwarf-2, -gdwarf-3, -gdwarf-4 (armclang) -I -include -L -l -M, -MM -MD, -MMD -MF -MG -MP -MT -march -marm -masm -mbig-endian -mbranch-protection -mcmodel -mcmse -mcpu -mexecute-only -mfloat-abi -mfpu -mimplicit-it -mlittle-endian -mno-neg-immediates -moutline, -mno-outline -mpixolib -munaligned-access, -mno-unaligned-access -mthumb -nostdlib -nostdlibinc -o (armclang) -O (armclang) -pedantic -pedantic-errors -Rpass -S -save-temps -shared (armclang) -std --target -U -u (armclang) -v (armclang) --version (armclang) --version_number (armclang) --vsn (armclang) -W -Wl -Xlinker -x (armclang) -### Compiler-specific Keywords and Operators Compiler-specific keywords and operators __alignof__ __asm __declspec attributes __declspec(noinline) __declspec(noreturn) __declspec(nothrow) __inline __promise __unaligned Global named register variables Compiler-specific Function, Variable, and Type Att Function attributes __attribute__((always_inline)) function attribute __attribute__((cmse_nonsecure_call)) function attr __attribute__((cmse_nonsecure_entry)) function att __attribute__((const)) function attribute __attribute__((constructor(priority))) function at __attribute__((format_arg(string-index))) function __attribute__((interrupt("type"))) function attrib __attribute__((malloc)) function attribute __attribute__((naked)) function attribute __attribute__((noinline)) function attribute __attribute__((nonnull)) function attribute __attribute__((noreturn)) function attribute __attribute__((nothrow)) function attribute __attribute__((pcs("calling_convention"))) functio __attribute__((pure)) function attribute __attribute__((section("name"))) function attribut __attribute__((unused)) function attribute __attribute__((used)) function attribute __attribute__((value_in_regs)) function attribute __attribute__((visibility("visibility_type"))) fun __attribute__((weak)) function attribute __attribute__((weakref("target"))) function attrib Type attributes __attribute__((aligned)) type attribute __attribute__((packed)) type attribute __attribute__((transparent_union)) type attribute Variable attributes __attribute__((alias)) variable attribute __attribute__((aligned)) variable attribute __attribute__((deprecated)) variable attribute __attribute__((packed)) variable attribute __attribute__((section("name"))) variable attribut __attribute__((unused)) variable attribute __attribute__((used)) variable attribute __attribute__((visibility("visibility_type"))) var __attribute__((weak)) variable attribute __attribute__((weakref("target"))) variable attrib Compiler-specific Intrinsics __breakpoint intrinsic __current_pc intrinsic __current_sp intrinsic __disable_fiq intrinsic __disable_irq intrinsic __enable_fiq intrinsic __enable_irq intrinsic __force_stores intrinsic __memory_changed intrinsic __schedule_barrier intrinsic __semihost intrinsic __vfp_status intrinsic Compiler-specific Pragmas #pragma clang system_header #pragma clang diagnostic #pragma clang section #pragma once #pragma pack(...) #pragma unroll[(n)], #pragma unroll_completely #pragma weak symbol, #pragma weak symbol1 = symbol Other Compiler-specific Features ACLE support Predefined macros Inline functions Half-precision floating-point data types Half-precision floating-point number format Half-precision floating-point intrinsics Library support for _Float16 data type BFloat16 floating-point number format TT instruction intrinsics Non-secure function pointer intrinsics armclang Integrated Assembler Syntax of assembly files for integrated assembler Assembly expressions Alignment directives Data definition directives String definition directives Floating-point data definition directives Section directives Conditional assembly directives Macro directives Symbol binding directives Org directive AArch32 Target selection directives AArch64 Target selection directives Space-filling directives Type directive Integrated assembler support for the CSDB instruct armclang Inline Assembler Inline Assembly File-scope inline assembly Inline assembly statements within a function Assembly string Output and input operands Clobber list volatile Inline assembly constraint strings Constraint modifiers Constraint codes Constraint codes common to AArch32 state and AArch Constraint codes for AArch32 state Constraint codes for AArch64 state Using multiple alternative operand constraints Inline assembly template modifiers Template modifiers common to AArch32 state and AAr Template modifiers for AArch32 state Template modifiers for AArch64 state Forcing inline assembly operands into specific reg Symbol references and branches into and out of inl Duplication of labels in inline assembly statement armlink Reference fromelf Reference armar Reference armasm Legacy Assembler Reference Appendixes

armclang Reference

Part B armclang Reference

Table of Contents

B1 armclang Command-line Options
B1.1 Summary of armclang command-line options
B1.2 -C (armclang)
B1.3 -c (armclang)
B1.4 -D
B1.5 -E
B1.6 -e
B1.7 -fbare-metal-pie
B1.8 -fbracket-depth=N
B1.9 -fcommon, -fno-common
B1.10 -fdata-sections, -fno-data-sections
B1.11 -ffast-math, -fno-fast-math
B1.12 -ffixed-rN
B1.13 -ffp-mode
B1.14 -ffunction-sections, -fno-function-sections
B1.15 -fident, -fno-ident
B1.16 @file
B1.17 -fldm-stm, -fno-ldm-stm
B1.18 -fno-builtin
B1.19 -fno-inline-functions
B1.20 -flto, -fno-lto
B1.21 -fexceptions, -fno-exceptions
B1.22 -fomit-frame-pointer, -fno-omit-frame-pointer
B1.23 -fpic, -fno-pic
B1.24 -fropi, -fno-ropi
B1.25 -fropi-lowering, -fno-ropi-lowering
B1.26 -frwpi, -fno-rwpi
B1.27 -frwpi-lowering, -fno-rwpi-lowering
B1.28 -fsanitize
B1.29 -fshort-enums, -fno-short-enums
B1.30 -fshort-wchar, -fno-short-wchar
B1.31 -fstack-protector, -fstack-protector-all, -fstack-protector-strong, -fno-stack-protector
B1.32 -fstrict-aliasing, -fno-strict-aliasing
B1.33 -fsysv, -fno-sysv
B1.34 -ftrapv
B1.35 -fvectorize, -fno-vectorize
B1.36 -fvisibility
B1.37 -fwrapv
B1.38 -g, -gdwarf-2, -gdwarf-3, -gdwarf-4 (armclang)
B1.39 -I
B1.40 -include
B1.41 -L
B1.42 -l
B1.43 -M, -MM
B1.44 -MD, -MMD
B1.45 -MF
B1.46 -MG
B1.47 -MP
B1.48 -MT
B1.49 -march
B1.50 -marm
B1.51 -masm
B1.52 -mbig-endian
B1.53 -mbranch-protection
B1.54 -mcmodel
B1.55 -mcmse
B1.56 -mcpu
B1.57 -mexecute-only
B1.58 -mfloat-abi
B1.59 -mfpu
B1.60 -mimplicit-it
B1.61 -mlittle-endian
B1.62 -mno-neg-immediates
B1.63 -moutline, -mno-outline
B1.64 -mpixolib
B1.65 -munaligned-access, -mno-unaligned-access
B1.66 -mthumb
B1.67 -nostdlib
B1.68 -nostdlibinc
B1.69 -o (armclang)
B1.70 -O (armclang)
B1.71 -pedantic
B1.72 -pedantic-errors
B1.73 -Rpass
B1.74 -S
B1.75 -save-temps
B1.76 -shared (armclang)
B1.77 -std
B1.78 --target
B1.79 -U
B1.80 -u (armclang)
B1.81 -v (armclang)
B1.82 --version (armclang)
B1.83 --version_number (armclang)
B1.84 --vsn (armclang)
B1.85 -W
B1.86 -Wl
B1.87 -Xlinker
B1.88 -x (armclang)
B1.89 -###
B2 Compiler-specific Keywords and Operators
B2.1 Compiler-specific keywords and operators
B2.2 __alignof__
B2.3 __asm
B2.4 __declspec attributes
B2.5 __declspec(noinline)
B2.6 __declspec(noreturn)
B2.7 __declspec(nothrow)
B2.8 __inline
B2.9 __promise
B2.10 __unaligned
B2.11 Global named register variables
B3 Compiler-specific Function, Variable, and Type Attributes
B3.1 Function attributes
B3.2 __attribute__((always_inline)) function attribute
B3.3 __attribute__((cmse_nonsecure_call)) function attribute
B3.4 __attribute__((cmse_nonsecure_entry)) function attribute
B3.5 __attribute__((const)) function attribute
B3.6 __attribute__((constructor(priority))) function attribute
B3.7 __attribute__((format_arg(string-index))) function attribute
B3.8 __attribute__((interrupt("type"))) function attribute
B3.9 __attribute__((malloc)) function attribute
B3.10 __attribute__((naked)) function attribute
B3.11 __attribute__((noinline)) function attribute
B3.12 __attribute__((nonnull)) function attribute
B3.13 __attribute__((noreturn)) function attribute
B3.14 __attribute__((nothrow)) function attribute
B3.15 __attribute__((pcs("calling_convention"))) function attribute
B3.16 __attribute__((pure)) function attribute
B3.17 __attribute__((section("name"))) function attribute
B3.18 __attribute__((unused)) function attribute
B3.19 __attribute__((used)) function attribute
B3.20 __attribute__((value_in_regs)) function attribute
B3.21 __attribute__((visibility("visibility_type"))) function attribute
B3.22 __attribute__((weak)) function attribute
B3.23 __attribute__((weakref("target"))) function attribute
B3.24 Type attributes
B3.25 __attribute__((aligned)) type attribute
B3.26 __attribute__((packed)) type attribute
B3.27 __attribute__((transparent_union)) type attribute
B3.28 Variable attributes
B3.29 __attribute__((alias)) variable attribute
B3.30 __attribute__((aligned)) variable attribute
B3.31 __attribute__((deprecated)) variable attribute
B3.32 __attribute__((packed)) variable attribute
B3.33 __attribute__((section("name"))) variable attribute
B3.34 __attribute__((unused)) variable attribute
B3.35 __attribute__((used)) variable attribute
B3.36 __attribute__((visibility("visibility_type"))) variable attribute
B3.37 __attribute__((weak)) variable attribute
B3.38 __attribute__((weakref("target"))) variable attribute
B4 Compiler-specific Intrinsics
B4.1 __breakpoint intrinsic
B4.2 __current_pc intrinsic
B4.3 __current_sp intrinsic
B4.4 __disable_fiq intrinsic
B4.5 __disable_irq intrinsic
B4.6 __enable_fiq intrinsic
B4.7 __enable_irq intrinsic
B4.8 __force_stores intrinsic
B4.9 __memory_changed intrinsic
B4.10 __schedule_barrier intrinsic
B4.11 __semihost intrinsic
B4.12 __vfp_status intrinsic
B5 Compiler-specific Pragmas
B5.1 #pragma clang system_header
B5.2 #pragma clang diagnostic
B5.3 #pragma clang section
B5.4 #pragma once
B5.5 #pragma pack(...)
B5.6 #pragma unroll[(n)], #pragma unroll_completely
B5.7 #pragma weak symbol, #pragma weak symbol1 = symbol2
B6 Other Compiler-specific Features
B6.1 ACLE support
B6.2 Predefined macros
B6.3 Inline functions
B6.4 Half-precision floating-point data types
B6.5 Half-precision floating-point number format
B6.6 Half-precision floating-point intrinsics
B6.7 Library support for _Float16 data type
B6.8 BFloat16 floating-point number format
B6.9 TT instruction intrinsics
B6.10 Non-secure function pointer intrinsics
B7 armclang Integrated Assembler
B7.1 Syntax of assembly files for integrated assembler
B7.2 Assembly expressions
B7.3 Alignment directives
B7.4 Data definition directives
B7.5 String definition directives
B7.6 Floating-point data definition directives
B7.7 Section directives
B7.8 Conditional assembly directives
B7.9 Macro directives
B7.10 Symbol binding directives
B7.11 Org directive
B7.12 AArch32 Target selection directives
B7.13 AArch64 Target selection directives
B7.14 Space-filling directives
B7.15 Type directive
B7.16 Integrated assembler support for the CSDB instruction
B8 armclang Inline Assembler
B8.1 Inline Assembly
B8.2 File-scope inline assembly
B8.3 Inline assembly statements within a function
B8.3.1 Assembly string
B8.3.2 Output and input operands
B8.3.3 Clobber list
B8.3.4 volatile
B8.4 Inline assembly constraint strings
B8.4.1 Constraint modifiers
B8.4.2 Constraint codes
B8.4.3 Constraint codes common to AArch32 state and AArch64 state
B8.4.4 Constraint codes for AArch32 state
B8.4.5 Constraint codes for AArch64 state
B8.4.6 Using multiple alternative operand constraints
B8.5 Inline assembly template modifiers
B8.5.1 Template modifiers common to AArch32 state and AArch64 state
B8.5.2 Template modifiers for AArch32 state
B8.5.3 Template modifiers for AArch64 state
B8.6 Forcing inline assembly operands into specific registers
B8.7 Symbol references and branches into and out of inline assembly
B8.8 Duplication of labels in inline assembly statements
Non-ConfidentialPDF file icon PDF version101754_0613_00_en
Copyright © 2019 Arm Limited or its affiliates. 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.