ARM处理器相关知识点总结
2012-08-20 01:17
267 查看
摘录自:ARM® Developer Suite Version 1.2 Assembler Guide
1、ARM processors always start executing code in ARM state.
2、ARM processors support up to seven processor modes, depending on the architecture version.
3、ARM processors have 37 registers.
4、By convention, r13 is used as a stack pointer(sp) in ARM assembly language. The C and C++ compilers always use r13 as the stack pointer.
5、In
User mode, r14 is used as a link register(lr) to store the return address when a subroutine call is made. It can also be used as a general-purpose register if the return
address is stored on the stack.
6、In the exception handling modes, r14 holds the return address for the exception, or a subroutine return address if subroutine callsare executed within an exception. r14 can be used as a general-purpose
register if the return address is stored on the stack.
7、The SPSRs are used to store the CPSR when an exception is taken.
8、Labels are symbols that represent addresses.The address given by a label is calculated during assembly.
9、The assembler calculates the address of a labelrelative to the origin of the section where the label is defined.A reference to a label within
the same section can use the program counter plus or minus anoffset. This is called program-relative addressing.
10、Addresses of labels in other sections are calculated at link time, when the linker has allocated specific locations in memory for each section.
11、Labels can be defined in a map. See Describing data structures with MAP and FIELD directiveson page 2-51. You can place the origin ofthe map in a specified register at runtime, and references to the label
use the specified register plus an offset. This is called
register-relative addressing.
12、BL destination
destinationis usually the label on the first instruction of the subroutine
The BLinstruction:
places the return address in the link register(lr)
sets pc to the address of the subroutine.
After the subroutine code is executed you can use a MOV pc,lrinstruction to return. By convention, registers r0 to r3 are used to pass parameters to subroutines, and to pass results
back to the callers.
13、You can include the C preprocessor command #include in your assembly language source file. If you do this, you must preprocess the file using the C preprocessor, before using armasmto assemble it.
armcpp -E < sourcefile.s > preprocessedfile.s
armasm preprocessedfile.s
14、
待续...
1、ARM processors always start executing code in ARM state.
2、ARM processors support up to seven processor modes, depending on the architecture version.
3、ARM processors have 37 registers.
4、By convention, r13 is used as a stack pointer(sp) in ARM assembly language. The C and C++ compilers always use r13 as the stack pointer.
5、In
User mode, r14 is used as a link register(lr) to store the return address when a subroutine call is made. It can also be used as a general-purpose register if the return
address is stored on the stack.
6、In the exception handling modes, r14 holds the return address for the exception, or a subroutine return address if subroutine callsare executed within an exception. r14 can be used as a general-purpose
register if the return address is stored on the stack.
7、The SPSRs are used to store the CPSR when an exception is taken.
8、Labels are symbols that represent addresses.The address given by a label is calculated during assembly.
9、The assembler calculates the address of a labelrelative to the origin of the section where the label is defined.A reference to a label within
the same section can use the program counter plus or minus anoffset. This is called program-relative addressing.
10、Addresses of labels in other sections are calculated at link time, when the linker has allocated specific locations in memory for each section.
11、Labels can be defined in a map. See Describing data structures with MAP and FIELD directiveson page 2-51. You can place the origin ofthe map in a specified register at runtime, and references to the label
use the specified register plus an offset. This is called
register-relative addressing.
12、BL destination
destinationis usually the label on the first instruction of the subroutine
The BLinstruction:
places the return address in the link register(lr)
sets pc to the address of the subroutine.
After the subroutine code is executed you can use a MOV pc,lrinstruction to return. By convention, registers r0 to r3 are used to pass parameters to subroutines, and to pass results
back to the callers.
13、You can include the C preprocessor command #include in your assembly language source file. If you do this, you must preprocess the file using the C preprocessor, before using armasmto assemble it.
armcpp -E < sourcefile.s > preprocessedfile.s
armasm preprocessedfile.s
14、
待续...
相关文章推荐
- 数据库相关知识点总结
- 多线程相关知识点总结--黄彬
- MMU内存管理单元相关知识点总结
- UE4 蓝图之相关知识点总结
- javaweb学习第八天:Tomcat相关知识点总结
- hadoop相关知识点新总结
- C++ 虚函数、纯虚函数、继承、虚表、多态原理相关知识点总结
- 自适应网页设计是怎么做到的的相关知识点总结
- 第八章 高效算法设计相关知识点总结
- mybatis相关知识点的总结
- JQuery相关知识点总结回顾
- JDBC相关的知识点总结
- Hibernate相关知识点总结
- MySQL数据库以及相关知识点总结大全
- 垂直搜索的相关知识点总结
- 【数据结构——树】二叉树面试相关知识点总结(二)
- 关于socket编程相关知识点总结
- 动态规划相关知识点总结
- 数据库相关知识点总结
- HTTP相关知识点总结