没有合适的资源?快使用搜索试试~ 我知道了~
首页Arm Compiler参考指南:从源代码到机器代码的翻译
Arm Compiler参考指南:从源代码到机器代码的翻译
需积分: 9 1 下载量 160 浏览量
更新于2024-07-15
收藏 3.8MB PDF 举报
"compiler_reference_guide.pdf - Arm Compiler Version 6.14 Reference Guide"
这篇文档是关于Arm Compiler的参考指南,版本6.14,由Arm Limited或其关联公司在2019年和2020年发布。该指南详细介绍了编译器的功能和用法,特别是针对ARM架构的编译工具。
Arm Compiler是一款专为ARM架构设计的编译器,它将高级编程语言(如C、C++)转换为特定于ARM处理器的机器代码。编译器的目的是优化代码性能,确保代码在目标硬件上高效运行。版本6.14包含了自版本6.13以来的更新和改进。
编译过程通常包括几个阶段:词法分析、语法分析、语义分析、优化和代码生成。在Arm Compiler中,这些步骤可能涉及到对ARM指令集的深入理解和优化,以充分利用ARM处理器的特性和性能。例如,编译器可能会进行循环展开、死代码消除、常量折叠等优化,以提高代码的运行速度和效率。
该文档的“Release Information”部分列出了版本历史,包括版本6.13和6.14的发布日期。这表明随着每个版本的更新,Arm Compiler可能引入了新的功能、修复了已知问题或者提升了编译器的性能。
“Confidentiality and Proprietary Notice”部分提醒读者,文档受版权保护,未经许可,不得复制或用于非法目的。同时,Arm Compiler可能涉及一项或多项专利,未明确授权的情况下,不得行使任何知识产权。
在实际应用中,开发者可以使用Arm Compiler将源代码编译为适用于各种ARM设备的目标代码。这些目标代码可以单独存在,也可以通过链接器与其他目标文件结合,生成最终的可执行程序。链接过程中,需要确保所有目标文件遵循相同的输出格式,以便正确处理入口点、函数调用和其他依赖关系。
总体来说,Arm Compiler Version 6.14 Reference Guide是开发者在使用ARM架构进行软件开发时的重要参考资料,它提供了详细的技术信息和指导,帮助开发者有效地将源代码转化为高效运行在ARM硬件上的机器代码。
D1.34 --i32 .......................................................... .......................................................... D1-783
D1.35 --i32combined .................................................. .................................................. D1-784
D1.36 --ignore_section=option[,option,…] .................................. .................................. D1-785
D1.37 --ignore_symbol=option[,option,…] .................................. .................................. D1-786
D1.38 --in_place ............................................................................................................ D1-787
D1.39 --info=topic[,topic,…] (fromelf) ...................................... ...................................... D1-788
D1.40 input_file (fromelf) ............................................... ............................................... D1-789
D1.41 --interleave=option .............................................................................................. D1-791
D1.42 --linkview, --no_linkview ...................................................................................... D1-792
D1.43 --localize=option[,option,…] ................................................................................ D1-793
D1.44 --m32 ......................................................... ......................................................... D1-794
D1.45 --m32combined ................................................. ................................................. D1-795
D1.46 --only=section_name ............................................. ............................................. D1-796
D1.47 --output=destination ............................................................................................ D1-797
D1.48 --privacy (fromelf) ................................................................................................ D1-798
D1.49 --qualify ....................................................... ....................................................... D1-799
D1.50 --relax_section=option[,option,…] ................................... ................................... D1-800
D1.51 --relax_symbol=option[,option,…] ................................... ................................... D1-801
D1.52 --rename=option[,option,…] ................................................................................ D1-802
D1.53 --select=select_options ........................................... ........................................... D1-803
D1.54 --show=option[,option,…] .................................................................................... D1-804
D1.55 --show_and_globalize=option[,option,…] ............................................................ D1-805
D1.56 --show_cmdline (fromelf) .................................................................................... D1-806
D1.57 --source_directory=path ...................................................................................... D1-807
D1.58 --strip=option[,option,…] .......................................... .......................................... D1-808
D1.59 --symbolversions, --no_symbolversions .............................................................. D1-810
D1.60 --text .................................................................................................................... D1-811
D1.61 --version_number (fromelf) ........................................ ........................................ D1-814
D1.62 --vhx .................................................................................................................... D1-815
D1.63 --via=file (fromelf) ................................................................................................ D1-816
D1.64 --vsn (fromelf) ...................................................................................................... D1-817
D1.65 -w ........................................................................................................................ D1-818
D1.66 --wide64bit .......................................................................................................... D1-819
D1.67 --widthxbanks ...................................................................................................... D1-820
Part E armar Reference
Chapter E1 armar Command-line Options
E1.1 archive ........................................................ ........................................................ E1-827
E1.2 -a pos_name ................................................... ................................................... E1-828
E1.3 -b pos_name ................................................... ................................................... E1-829
E1.4 -c (armar) ............................................................................................................ E1-830
E1.5 -C (armar) ............................................................................................................ E1-831
E1.6 --create ................................................................................................................ E1-832
E1.7 -d ............................................................ ............................................................ E1-833
E1.8 --debug_symbols ................................................ ................................................ E1-834
E1.9 --diag_error=tag[,tag,…] (armar) .................................... .................................... E1-835
E1.10 --diag_remark=tag[,tag,…] (armar) .................................. .................................. E1-836
E1.11 --diag_style={arm|ide|gnu} (armar) .................................. .................................. E1-837
E1.12 --diag_suppress=tag[,tag,…] (armar) .................................................................. E1-838
101754_0614_00_en Copyright © 2019, 2020 Arm Limited or its affiliates. All rights
reserved.
16
Non-Confidential
E1.13 --diag_warning=tag[,tag,…] (armar) .................................................................... E1-839
E1.14 --entries ....................................................... ....................................................... E1-840
E1.15 file_list ........................................................ ........................................................ E1-841
E1.16 --help (armar) ...................................................................................................... E1-842
E1.17 -i pos_name ........................................................................................................ E1-843
E1.18 -m pos_name (armar) ............................................ ............................................ E1-844
E1.19 -n ............................................................ ............................................................ E1-845
E1.20 --new_files_only .................................................................................................. E1-846
E1.21 -p ............................................................ ............................................................ E1-847
E1.22 -r .......................................................................................................................... E1-848
E1.23 -s ............................................................ ............................................................ E1-849
E1.24 --show_cmdline (armar) ...................................................................................... E1-850
E1.25 --sizes .................................................................................................................. E1-851
E1.26 -t .......................................................................................................................... E1-852
E1.27 -T ............................................................ ............................................................ E1-853
E1.28 -u (armar) ............................................................................................................ E1-854
E1.29 -v (armar) ............................................................................................................ E1-855
E1.30 --version_number (armar) ......................................... ......................................... E1-856
E1.31 --via=filename (armar) ............................................ ............................................ E1-857
E1.32 --vsn (armar) ................................................... ................................................... E1-858
E1.33 -x (armar) ............................................................................................................ E1-859
E1.34 --zs ...................................................................................................................... E1-860
E1.35 --zt ........................................................... ........................................................... E1-861
Part F armasm Legacy Assembler Reference
Chapter F1 armasm Command-line Options
F1.1 --16 ...................................................................................................................... F1-867
F1.2 --32 ...................................................................................................................... F1-868
F1.3 --apcs=qualifier…qualifier ......................................... ......................................... F1-869
F1.4 --arm .................................................................................................................... F1-871
F1.5 --arm_only ..................................................... ..................................................... F1-872
F1.6 --bi ........................................................... ........................................................... F1-873
F1.7 --bigend ....................................................... ....................................................... F1-874
F1.8 --brief_diagnostics, --no_brief_diagnostics .......................................................... F1-875
F1.9 --checkreglist ................................................... ................................................... F1-876
F1.10 --cpreproc ............................................................................................................ F1-877
F1.11 --cpreproc_opts=option[,option,…] ...................................................................... F1-878
F1.12 --cpu=list (armasm) .............................................. .............................................. F1-879
F1.13 --cpu=name (armasm) ............................................ ............................................ F1-880
F1.14 --debug ................................................................................................................ F1-883
F1.15 --depend=dependfile ............................................. ............................................. F1-884
F1.16 --depend_format=string ........................................... ........................................... F1-885
F1.17 --diag_error=tag[,tag,…] (armasm) .................................. .................................. F1-886
F1.18 --diag_remark=tag[,tag,…] (armasm) .................................................................. F1-887
F1.19 --diag_style={arm|ide|gnu} (armasm) .................................................................. F1-888
F1.20 --diag_suppress=tag[,tag,…] (armasm) ............................... ............................... F1-889
F1.21 --diag_warning=tag[,tag,…] (armasm) ................................ ................................ F1-890
F1.22 --dllexport_all ................................................... ................................................... F1-891
F1.23 --dwarf2 ....................................................... ....................................................... F1-892
101754_0614_00_en Copyright © 2019, 2020 Arm Limited or its affiliates. All rights
reserved.
17
Non-Confidential
F1.24 --dwarf3 ....................................................... ....................................................... F1-893
F1.25 --errors=errorfile ................................................. ................................................. F1-894
F1.26 --exceptions, --no_exceptions ...................................... ...................................... F1-895
F1.27 --exceptions_unwind, --no_exceptions_unwind .................................................. F1-896
F1.28 --execstack, --no_execstack ................................................................................ F1-897
F1.29 --execute_only .................................................. .................................................. F1-898
F1.30 --fpmode=model .................................................................................................. F1-899
F1.31 --fpu=list (armasm) .............................................................................................. F1-900
F1.32 --fpu=name (armasm) ............................................ ............................................ F1-901
F1.33 -g (armasm) .................................................... .................................................... F1-902
F1.34 --help (armasm) ................................................. ................................................. F1-903
F1.35 -idir[,dir, …] .......................................................................................................... F1-904
F1.36 --keep (armasm) .................................................................................................. F1-905
F1.37 --length=n ............................................................................................................ F1-906
F1.38 --li ............................................................ ............................................................ F1-907
F1.39 --library_type=lib .................................................................................................. F1-908
F1.40 --list=file ....................................................... ....................................................... F1-909
F1.41 --list= .................................................................................................................... F1-910
F1.42 --littleend .............................................................................................................. F1-911
F1.43 -m (armasm) ........................................................................................................ F1-912
F1.44 --maxcache=n .................................................. .................................................. F1-913
F1.45 --md .......................................................... .......................................................... F1-914
F1.46 --no_code_gen .................................................................................................... F1-915
F1.47 --no_esc ....................................................... ....................................................... F1-916
F1.48 --no_hide_all ........................................................................................................ F1-917
F1.49 --no_regs ...................................................... ...................................................... F1-918
F1.50 --no_terse ............................................................................................................ F1-919
F1.51 --no_warn ............................................................................................................ F1-920
F1.52 -o filename (armasm) .......................................................................................... F1-921
F1.53 --pd ...................................................................................................................... F1-922
F1.54 --predefine "directive" .......................................................................................... F1-923
F1.55 --reduce_paths, --no_reduce_paths .................................................................... F1-924
F1.56 --regnames .......................................................................................................... F1-925
F1.57 --report-if-not-wysiwyg ............................................ ............................................ F1-926
F1.58 --show_cmdline (armasm) ......................................... ......................................... F1-927
F1.59 --thumb ................................................................................................................ F1-928
F1.60 --unaligned_access, --no_unaligned_access ...................................................... F1-929
F1.61 --unsafe ....................................................... ....................................................... F1-930
F1.62 --untyped_local_labels ........................................................................................ F1-931
F1.63 --version_number (armasm) ................................................................................ F1-932
F1.64 --via=filename (armasm) .......................................... .......................................... F1-933
F1.65 --vsn (armasm) .................................................................................................... F1-934
F1.66 --width=n ...................................................... ...................................................... F1-935
F1.67 --xref .................................................................................................................... F1-936
Chapter F2 Structure of armasm Assembly Language Modules
F2.1 Syntax of source lines in armasm syntax assembly language ............................ F2-938
F2.2 Literals ........................................................ ........................................................ F2-940
F2.3 ELF sections and the AREA directive ................................ ................................ F2-941
F2.4 An example armasm syntax assembly language module ................. ................. F2-942
101754_0614_00_en Copyright © 2019, 2020 Arm Limited or its affiliates. All rights
reserved.
18
Non-Confidential
Chapter F3 Writing A32/T32 Instructions in armasm Syntax Assembly Language
F3.1 About the Unified Assembler Language .............................................................. F3-947
F3.2 Syntax differences between UAL and A64 assembly language .......................... F3-948
F3.3 Register usage in subroutine calls ...................................................................... F3-949
F3.4 Load immediate values ........................................... ........................................... F3-950
F3.5 Load immediate values using MOV and MVN .......................... .......................... F3-951
F3.6 Load immediate values using MOV32 ................................ ................................ F3-954
F3.7 Load immediate values using LDR Rd, =const ......................... ......................... F3-955
F3.8 Literal pools .................................................... .................................................... F3-956
F3.9 Load addresses into registers ...................................... ...................................... F3-957
F3.10 Load addresses to a register using ADR .............................. .............................. F3-958
F3.11 Load addresses to a register using ADRL ............................. ............................. F3-960
F3.12 Load addresses to a register using LDR Rd, =label ............................................ F3-961
F3.13 Other ways to load and store registers ................................................................ F3-963
F3.14 Load and store multiple register instructions ........................... ........................... F3-964
F3.15 Load and store multiple register instructions in A32 and T32 .............. .............. F3-965
F3.16 Stack implementation using LDM and STM ........................................................ F3-966
F3.17 Stack operations for nested subroutines .............................. .............................. F3-968
F3.18 Block copy with LDM and STM ..................................... ..................................... F3-969
F3.19 Memory accesses ............................................... ............................................... F3-971
F3.20 The Read-Modify-Write operation ................................... ................................... F3-972
F3.21 Optional hash with immediate constants .............................. .............................. F3-973
F3.22 Use of macros .................................................. .................................................. F3-974
F3.23 Test-and-branch macro example .................................... .................................... F3-975
F3.24 Unsigned integer division macro example ............................. ............................. F3-976
F3.25 Instruction and directive relocations .................................................................... F3-978
F3.26 Symbol versions .................................................................................................. F3-980
F3.27 Frame directives .................................................................................................. F3-981
F3.28 Exception tables and Unwind tables ................................. ................................. F3-982
Chapter F4 Using armasm
F4.1 armasm command-line syntax ............................................................................ F4-984
F4.2 Specify command-line options with an environment variable .............................. F4-985
F4.3 Using stdin to input source code to the assembler .............................................. F4-986
F4.4 Built-in variables and constants ..................................... ..................................... F4-987
F4.5 Identifying versions of armasm in source code ......................... ......................... F4-991
F4.6 Diagnostic messages .......................................................................................... F4-992
F4.7 Interlocks diagnostics .......................................................................................... F4-993
F4.8 Automatic IT block generation in T32 code ............................ ............................ F4-994
F4.9 T32 branch target alignment ....................................... ....................................... F4-995
F4.10 T32 code size diagnostics ......................................... ......................................... F4-996
F4.11 A32 and T32 instruction portability diagnostics ......................... ......................... F4-997
F4.12 T32 instruction width diagnostics .................................... .................................... F4-998
F4.13 Two pass assembler diagnostics .................................... .................................... F4-999
F4.14 Using the C preprocessor .................................................................................. F4-1000
F4.15 Address alignment in A32/T32 code ................................ ................................ F4-1002
F4.16 Address alignment in A64 code .................................... .................................... F4-1003
F4.17 Instruction width selection in T32 code .............................. .............................. F4-1004
101754_0614_00_en Copyright © 2019, 2020 Arm Limited or its affiliates. All rights
reserved.
19
Non-Confidential
Chapter F5 Symbols, Literals, Expressions, and Operators in armasm Assembly
Language
F5.1 Symbol naming rules ............................................ ............................................ F5-1007
F5.2 Variables ............................................................................................................ F5-1008
F5.3 Numeric constants .............................................. .............................................. F5-1009
F5.4 Assembly time substitution of variables ............................................................ F5-1010
F5.5 Register-relative and PC-relative expressions ......................... ......................... F5-1011
F5.6 Labels ................................................................................................................ F5-1012
F5.7 Labels for PC-relative addresses ...................................................................... F5-1013
F5.8 Labels for register-relative addresses ............................... ............................... F5-1014
F5.9 Labels for absolute addresses .......................................................................... F5-1015
F5.10 Numeric local labels .......................................................................................... F5-1016
F5.11 Syntax of numeric local labels ..................................... ..................................... F5-1017
F5.12 String expressions .............................................. .............................................. F5-1018
F5.13 String literals ...................................................................................................... F5-1019
F5.14 Numeric expressions ............................................ ............................................ F5-1020
F5.15 Syntax of numeric literals .................................................................................. F5-1021
F5.16 Syntax of floating-point literals ..................................... ..................................... F5-1022
F5.17 Logical expressions ............................................. ............................................. F5-1023
F5.18 Logical literals .................................................................................................... F5-1024
F5.19 Unary operators ................................................ ................................................ F5-1025
F5.20 Binary operators ................................................................................................ F5-1026
F5.21 Multiplicative operators ...................................................................................... F5-1027
F5.22 String manipulation operators ..................................... ..................................... F5-1028
F5.23 Shift operators ................................................. ................................................. F5-1029
F5.24 Addition, subtraction, and logical operators ...................................................... F5-1030
F5.25 Relational operators .......................................................................................... F5-1031
F5.26 Boolean operators .............................................. .............................................. F5-1032
F5.27 Operator precedence ............................................ ............................................ F5-1033
F5.28 Difference between operator precedence in assembly language and C ..... ..... F5-1034
Chapter F6 armasm Directives Reference
F6.1 Alphabetical list of directives armasm assembly language directives ....... ....... F6-1039
F6.2 About armasm assembly language control directives ................... ................... F6-1040
F6.3 About frame directives ........................................... ........................................... F6-1041
F6.4 Directives that can be omitted in pass 2 of the assembler ................................ F6-1042
F6.5 ALIAS ................................................................................................................ F6-1044
F6.6 ALIGN ................................................................................................................ F6-1045
F6.7 AREA ........................................................ ........................................................ F6-1047
F6.8 ARM or CODE32 directive ................................................................................ F6-1051
F6.9 ASSERT ............................................................................................................ F6-1052
F6.10 ATTR ........................................................ ........................................................ F6-1053
F6.11 CN .......................................................... .......................................................... F6-1054
F6.12 CODE16 directive .............................................................................................. F6-1055
F6.13 COMMON .......................................................................................................... F6-1056
F6.14 CP .......................................................... .......................................................... F6-1057
F6.15 DATA ........................................................ ........................................................ F6-1058
F6.16 DCB ......................................................... ......................................................... F6-1059
F6.17 DCD and DCDU ................................................................................................ F6-1060
F6.18 DCDO ................................................................................................................ F6-1061
101754_0614_00_en Copyright © 2019, 2020 Arm Limited or its affiliates. All rights
reserved.
20
Non-Confidential
剩余1195页未读,继续阅读
101 浏览量
691 浏览量
117 浏览量
140 浏览量
563 浏览量
133 浏览量
2023-08-03 上传
522 浏览量
1514 浏览量
hkd_ywg
- 粉丝: 5
- 资源: 93
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功