Arm data stack usage rules

Source: Internet
Author: User

Arm data stack usage rules
The data stack has two growth directions: When the memory address is reduced, it is called the descending stack; when the memory address is increased, it is called the ascending stack.
The growth direction of the data stack is the mobile Stack pointer. When the stack pointer points to the top element of the stack (the data in the last stack), it is called the full stack; when the stack pointer points to the top element of the stack (the data in the last stack) an adjacent empty data unit is called the empty stack.
Based on these two points, data stacks can be divided into the following four types.
1. FD: Full descending, full decrease.
2. ED: Empty descending, empty decreasing.
3. Fa: Full ascending, increasing at full scale.
4. Ea: Empty ascending, with null increments.
Arm's atpcs stipulate that the data stack is of the FD type and the operations on the data stack are 8-byte aligned. Use the batch dB/ldmia command to access the memory in batches to operate the FD data stack.
When you use the analytic dB command to save the content to the data stack, first decrease the SP pointer, then save the data. When you use the ldmia command to restore data from the data stack, first obtain the data and then increase the SP pointer, the SP pointer always points to the top element of the stack, which is exactly the definition of the FD stack.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.