RealView® 编译工具 3.1 版 编译器参考指南
目录
前言
关于本手册
适用对象
使用本手册
更多参考出版物
反馈
RealView 编译工具反馈信息
关于本手册的反馈
简介
1.1 关于 ARM 编译器
1.2 源语言模式
1.2.1 ISO C90
1.2.2 ISO C99
1.2.3 ISO C++
1.3 语言扩展和语言遵从性
1.3.1 语言扩展
1.3.2 语言遵从性
1.4 C 和 C++ 库
编译器命令行选项
2.1 命令行选项
2.1.1 -Aopt
2.1.2 --[no_]alternative_tokens
2.1.3 --[no_]anachronisms
2.1.4 --apcs=qualifer...qualifier
2.1.5 --arm
2.1.6 --asm
2.1.7 --[no_]autoinline
2.1.8 --bigend
2.1.9 --[no_]brief_diagnostics
2.1.10 --bss_threshold=num
2.1.11 -c
2.1.12 -C
2.1.13 --c90
2.1.14 --c99
2.1.15 --[no_]code_gen
2.1.16 --[no_]compile_all_input
2.1.17 --cpp
2.1.18 --cpu=list
2.1.19 --cpu=name
2.1.20 --create_pch=filename
2.1.21 -Dname[(parm-list)][=def]
2.1.22 --[no_]data_reorder
2.1.23 --[no_]debug
2.1.24 --[no_]debug_macros
2.1.25 --default_extension=ext
2.1.26 --[no_]dep_name
2.1.27 --depend=filename
2.1.28 --depend_format=string
2.1.29 --[no_]depend_system_headers
2.1.30 --diag_error=tag[,tag,...]
2.1.31 --diag_remark=tag[,tag,... ]
2.1.32 --diag_style={arm|ide|gnu}
2.1.33 --diag_suppress=tag[,tag,...]
2.1.34 --diag_suppress=optimizations
2.1.35 --diag_warning=tag[,tag,...]
2.1.36 --diag_warning=optimizations
2.1.37 --[no_]dllexport_all
2.1.38 --[no_]dllimport_runtime
2.1.39 --[no_]dollar
2.1.40 --dwarf2
2.1.41 --dwarf3
2.1.42 -E
2.1.43 --enum_is_int
2.1.44 --errors=filename
2.1.45 --[no_]exceptions
2.1.46 --[no_]exceptions_unwind
2.1.47 --[no_]export_all_vtbl
2.1.48 --[no_]export_defs_implicitly
2.1.49 --[no_]extended_initializers
2.1.50 --feedback=filename
2.1.51 --[no_]force_new_nothrow
2.1.52 --forceinline
2.1.53 --fpmode=model
2.1.54 --fpu=list
2.1.55 --fpu=name
2.1.56 --[no_]friend_injection
2.1.57 --gnu
2.1.58 --[no_]guiding_decls
2.1.59 --help
2.1.60 --[no_]hide_all
2.1.61 -Idir[,dir,...]
2.1.62 --[no_]implicit_include
2.1.63 --[no_]implicit_include_searches
2.1.64 --[no_]implicit_typename
2.1.65 --info=totals
2.1.66 --[no_]inline
2.1.67 --interleave
2.1.68 -Jdir[,dir,...]
2.1.69 --kandr_include
2.1.70 -Lopt
2.1.71 --library_interface=lib
2.1.72 --library_type=lib
2.1.73 --list
2.1.74 --littleend
2.1.75 --locale=lang_country
2.1.76 --loose_implicit_cast
2.1.77 --[no_]lower_ropi
2.1.78 --[no_]lower_rwpi
2.1.79 -M
2.1.80 --md
2.1.81 --message_locale=lang_country[.codepage]
2.1.82 --min_array_alignment=opt
2.1.83 --[no_]multibyte_chars
2.1.84 --[no_]multifile
2.1.85 --[no_]nonstd_qualifier_deduction
2.1.86 -o filename
2.1.87 -Onum
2.1.88 --[no_]old_specializations
2.1.89 -Ospace
2.1.90 -Otime
2.1.91 --[no_]parse_templates
2.1.92 --pch
2.1.93 --pch_dir=dir
2.1.94 --[no_]pch_messages
2.1.95 --[no_]pch_verbose
2.1.96 --pending_instantiations=n
2.1.97 --pointer_alignment=num
2.1.98 --[no_]project=filename
2.1.99 --preinclude=filename
2.1.100 --[no_]reduce_paths
2.1.101 --reinitialize_workdir
2.1.102 --remarks
2.1.103 --[no_]restrict
2.1.104 --[no_]rtti
2.1.105 -S
2.1.106 --[un]signed_bitfields
2.1.107 --[un]signed_chars
2.1.108 --show_cmdline
2.1.109 --split_ldm
2.1.110 --split_sections
2.1.111 --[no_]strict
2.1.112 --strict_warnings
2.1.113 --sys_include
2.1.114 --thumb
2.1.115 -Uname
2.1.116 --[no_]unaligned_access
2.1.117 --use_pch=filename
2.1.118 --[no_]using_std
2.1.119 --[no_]vectorize
2.1.120 --[no_]vfe
2.1.121 --via=filename
2.1.122 --[no_]vla
2.1.123 --vsn
2.1.124 -W
2.1.125 --wchar16
2.1.126 --wchar32
2.1.127 --workdir=directory
2.1.128 --[no_]wrap_diagnostics
语言扩展
3.1 预处理程序扩展
3.1.1 #assert
3.1.2 #include_next
3.1.3 #unassert
3.1.4 #warning
3.2 C90 中提供的 C99 语言功能
3.2.1 // 注释
3.2.2 下标结构
3.2.3 可变数组成员
3.3 C++ 和 C90 中提供的 C99 语言功能
3.3.1 可变参数宏
3.3.2 long long
3.3.3 restrict
3.3.4 十六进制浮点
3.4 标准 C 语言扩展
3.4.1 常数表达式
3.4.2 数组和指针扩展
3.4.3 块范围函数声明
3.4.4 标识符中的美元符号
3.4.5 顶级声明
3.4.6 良性重声明
3.4.7 外部实体
3.4.8 函数原型
3.5 标准 C++ 语言扩展
3.5.1 ? 运算符
3.5.2 类成员声明
3.5.3 friend
3.5.4 读/写常数
3.5.5 标量类型常数
3.5.6 类型转换
3.6 标准 C 和标准 C++ 语言扩展
3.6.1 寄存器变量地址
3.6.2 函数自变量
3.6.3 匿名类、结构和联合
3.6.4 汇编程序标签
3.6.5 空声明
3.6.6 十六进制浮点常数
3.6.7 不完整的枚举
3.6.8 整型扩展
3.6.9 标签定义
3.6.10 long float
3.6.11 非静态局部变量
3.6.12 结构、联合、枚举和位域扩展
3.7 GNU 语言扩展
3.7.1 替代关键字
3.7.2 asm 关键字
3.7.3 条件范围
3.7.4 union 类型转换
3.7.5 字符转义序列
3.7.6 复合文字
3.7.7 指定的初始值设定项
3.7.8 条件语句
3.7.9 初始值设定项
3.7.10 内联
3.7.11 扩展的左值
3.7.12 指针算法
3.7.13 语句表达式
3.7.14 未命名的字段
编译器特有的功能
4.1 关键字和运算符
4.1.1 __align
4.1.2 __alignof__
4.1.3 __ALIGNOF__
4.1.4 __asm
4.1.5 __forceinline
4.1.6 __global_reg
4.1.7 __inline
4.1.8 __int64
4.1.9 __INTADDR__
4.1.10 __irq
4.1.11 __packed
4.1.12 __pure
4.1.13 __smc
4.1.14 __softfp
4.1.15 __svc
4.1.16 __svc_indirect
4.1.17 __svc_indirect_r7
4.1.18 __value_in_regs
4.1.19 __weak
4.1.20 __writeonly
4.2 __declspec 属性
4.2.1 __declspec(dllexport)
4.2.2 __declspec(dllimport)
4.2.3 __declspec(noinline)
4.2.4 __declspec(noreturn)
4.2.5 __declspec(nothrow)
4.2.6 __declspec(notshared)
4.2.7 __declspec(thread)
4.3 函数属性
4.3.1 __attribute__((alias))
4.3.2 __attribute__((always_inline))
4.3.3 __attribute__((const))
4.3.4 __attribute__((deprecated))
4.3.5 __attribute__((malloc))
4.3.6 __attribute__((noinline))
4.3.7 __attribute__((noreturn))
4.3.8 __attribute__((pure))
4.3.9 __attribute__((section))
4.3.10 __attribute__((unused))
4.3.11 __attribute__((used))
4.3.12 __attribute__((weak))
4.4 类型属性
4.4.1 __attribute__((aligned))
4.4.2 __attribute((packed))
4.4.3 __attribute__((transparent_union))
4.5 变量属性
4.5.1 __attribute__((alias))
4.5.2 __attribute__((at(address)))
4.5.3 __attribute__((aligned))
4.5.4 __attribute__((deprecated))
4.5.5 __attribute__((packed))
4.5.6 __attribute__((section))
4.5.7 __attribute__((transparent_union))
4.5.8 __attribute__((unused))
4.5.9 __attribute__((used))
4.5.10 __attribute__((weak))
4.5.11 __attribute__((zero_init))
4.6 编译指示
4.6.1 #pragma [no_]anon_unions
4.6.2 #pragma arm
4.6.3 #pragma arm section [section_sort_list]
4.6.4 #pragma diag_default tag[,tag,...]
4.6.5 #pragma diag_error tag[,tag,...]
4.6.6 #pragma diag_remark tag[,tag,...]
4.6.7 #pragma diag_suppress tag[,tag,...]
4.6.8 #pragma diag_warning tag[, tag, ...]
4.6.9 #pragma [no_]exceptions_unwind
4.6.10 #pragma hdrstop
4.6.11 #pragma import symbol_name
4.6.12 #pragma [no_]inline
4.6.13 #pragma no_pch
4.6.14 #pragma Onum
4.6.15 #pragma once
4.6.16 #pragma Ospace
4.6.17 #pragma Otime
4.6.18 #pragma pop
4.6.19 #pragma push
4.6.20 #pragma [no_]softfp_linkage
4.6.21 #pragma unroll [(n)]
4.6.22 #pragma unroll_completely
4.6.23 #pragma thumb
4.7 指令内在函数
4.7.1 __breakpoint
4.7.2 __builtin_clz
4.7.3 __builtin_constant_p
4.7.4 __builtin_expect
4.7.5 __builtin_frame_address
4.7.6 __builtin_return_address
4.7.7 __builtin_popcount
4.7.8 __cdp
4.7.9 __clrex
4.7.10 __clz
4.7.11 __current_pc
4.7.12 __current_sp
4.7.13 __disable_fiq
4.7.14 __disable_irq
4.7.15 __enable_fiq
4.7.16 __enable_irq
4.7.17 __fabs
4.7.18 __fabsf
4.7.19 __force_stores
4.7.20 __ldrex
4.7.21 __ldrt
4.7.22 __memory_changed
4.7.23 __nop
4.7.24 __pld
4.7.25 __pli
4.7.26 __qadd
4.7.27 __qdbl
4.7.28 __qsub
4.7.29 __rbit
4.7.30 __rev
4.7.31 __return_address
4.7.32 __ror
4.7.33 __schedule_barrier
4.7.34 __semihost
4.7.35 __sev
4.7.36 __sqrt
4.7.37 __sqrtf
4.7.38 __ssat
4.7.39 __strex
4.7.40 __strt
4.7.41 __swp
4.7.42 __usat
4.7.43 __wfe
4.7.44 __wfi
4.7.45 __yield
4.7.46 ARMv6 SIMD 内在函数
4.7.47 ETSI 基本运算
4.7.48 C55x 内在函数
4.7.49 已命名的寄存器变量
4.8 编译器预定义
4.8.1 预定义宏
4.8.2 函数名称
C 和 C++ 实现细节
5.1 C 和 C++ 实现细节
5.1.1 字符集和标识符
5.1.2 基本数据类型
5.1.3 基本数据类型运算
5.1.4 结构、联合、枚举和位域
5.2 C++ 实现细节
5.2.1 使用 ::operator new 函数
5.2.2 试验数组
5.2.3 C++ 函数中的旧式 C 参数
5.2.4 过时功能
5.2.5 模板实例化
5.2.6 名称空间
5.2.7 C++ 异常处理
5.2.8 外部内联函数
via 文件语法
A.1 via 文件概述
A.1.1 via 文件求值
A.2 语法
标准 C 实现定义
B.1 执行定义
B.1.1 转换
B.1.2 环境
B.1.3 标识符
B.1.4 字符
B.1.5 整数
B.1.6 浮点数
B.1.7 数组和指针
B.1.8 寄存器
B.1.9 结构、联合、枚举和位域
B.1.10 限定符
B.1.11 表达式求值
B.1.12 预处理指令
B.1.13 库函数
B.2 被视为 ISO C 标准未定义的行为
标准 C++ 实现定义
C.1 整型转换
C.2 调用纯虚函数
C.3 主要的语言支持特性
C.4 标准 C++ 库实现定义
C 和 C++ 编译器实现限制
D.1 C++ ISO/IEC 标准限制
D.2 整数限制
D.3 浮点数限制
使用 NEON 支持
E.1 简介
E.2 向量数据类型
E.3 内在函数
E.3.1 加法
E.3.2 乘法
E.3.3 减法
E.3.4 比较
E.3.5 差值绝对值
E.3.6 最大值/最小值
E.3.7 按对加
E.3.8 折叠最大值
E.3.9 折叠最小值
E.3.10 倒数/平方根
E.3.11 按有符号变量移位
E.3.12 按常数移位
E.3.13 移位并插入
E.3.14 载入并存储单个向量
E.3.15 载入并存储 N 元素结构
E.3.16 从向量提取向量线
E.3.17 在向量内设置向量线
E.3.18 从位模式初始化向量
E.3.19 将所有向量线设置为相同的值
E.3.20 组合向量
E.3.21 拆分向量
E.3.22 转换向量
E.3.23 表查找
E.3.24 扩展表查找内在函数
E.3.25 针对标量值的运算
E.3.26 向量提取
E.3.27 反转向量元素(交换端标记)
E.3.28 其他单操作数算法
E.3.29 逻辑运算
E.3.30 转置运算
E.3.31 向量重新解释类型转换运算