Arm compilation – (1) How ARM processors are addressed

Source: Internet
Author: User

By:ailson Jack.

date:2016.04.13

Personal blog: www.only2fire.com

This article in my blog address is: http://www.only2fire.com/archives/887.html, typesetting better, easy to learn.

The addressing method is based on the address Code field given in the instruction to find the real operand address. The ARM processor has 9 basic addressing options:

1), register addressing 2), register shift addressing 3), register indirect addressing

4), multi-register addressing 5), immediate addressing 6), base address addressing

7), stack addressing 8), block copy addressing 9), relative addressing

1. Register addressing

The value of the operand is stored in the register, and the Address Code field in the instruction indicates the register number, which can be manipulated by taking the value stored in the register directly when the instruction executes. Examples of register addressing directives are:

MOV r1,r2; R2 value is stored in R1

SUB r0,r1,r2; Subtracts the value of R1 by the value of R2 and saves the result to R0

2. Register Shift Addressing

For more detailed information, see my blog address: http://www.only2fire.com/archives/887.html

Note: Reproduced please indicate the source, thank you. ^_^

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.