ARM pseudo-instruction address read: ADR ADRL LDR

Publisher:温馨的家庭Latest update time:2018-02-16 Source: eefocusKeywords:ARM  ADR  ADRL  LDR Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

    1. ADR pseudo-instruction --- small range of address reading

    The ADR pseudo-instruction reads the address value based on the PC relative offset or the address value based on the register relative offset into the register. When the assembler compiler compiles the source program, the ADR pseudo-instruction is replaced by a suitable instruction by the compiler. Usually, the compiler uses an ADD instruction or a SUB instruction to implement the function of the ADR pseudo-instruction. If it cannot be implemented with one instruction, an error will be generated and the compilation will fail.

    ADR pseudo-instruction format: ADR{cond} register, exp

    The value range of the address expression expr is:

    When the address value is byte aligned, its fetch range is: +255 ~ 255B;

    When the address value is word-aligned, the range of its fetch is: -1020 ~ 1020B;

    2. ADRL pseudo-instruction ---- medium range address reading

    The ADRL pseudo-instruction reads the address value based on the PC relative offset or the address value based on the register relative offset into the register. It can read a wider range of addresses than the ADR pseudo-instruction. When the assembler compiler compiles the source program, the ADRL pseudo-instruction is replaced by two appropriate instructions by the compiler. If it cannot be implemented with two instructions, an error will occur and the compilation will fail.

    ADRL pseudo-instruction format: ADRL{cond} register, expr

    The value range of the address expression expr is:

    When the address value is byte aligned, the range of its fetch is: -64K~64K;

    When the address value is word-aligned, the range of its fetch is: -256K~256K;

    3. LDR pseudo-instruction-----large range of address reading

    The LDR pseudo-instruction is used to load a 32-bit immediate value or an address value into a specified register. When assembling a source program, the LDR pseudo-instruction is replaced by a suitable instruction by the compiler. If the loaded constant does not exceed the range of MOV or MVN, the MOV or MVN instruction is used to replace the LDR pseudo-instruction. Otherwise, the assembler puts the constant into a literal pool and uses a program-relative offset LDR instruction to read the constant from the literal pool.


Keywords:ARM  ADR  ADRL  LDR Reference address:ARM pseudo-instruction address read: ADR ADRL LDR

Previous article:Parameter transfer between BootLoader and kernel
Next article:How to design and compile software in an energy-efficient way on the ARM platform

Recommended ReadingLatest update time:2024-11-16 19:43

Design of Remote Video Monitoring System Based on ARM
0 Introduction In the domestic and foreign markets, video surveillance mainly includes analog video surveillance and digital video surveillance. The former has been developed very maturely and has been widely used in practical engineering applications, but it is only suitable for small-scale regional monitoring
[Microcontroller]
Design of Remote Video Monitoring System Based on ARM
Design of low-power speech denoising system based on ARM
In recent years, the development of electronic technology has promoted the prosperity of multimedia devices. At the same time, with the widespread demand for portable devices and mobile terminals, low power consumption has become one of the biggest technical challenges for such electronic devices. Low power consumption
[Microcontroller]
Design of low-power speech denoising system based on ARM
ARM Basic Learning-ATPCS Subroutine Call Basic Specifications
ATPCS is the abbreviation of Arm Thumb Procedure Call Standard, which means the basic specification of subroutine calls in arm programs and thumb programs. Register usage rules When the number of parameters is less than or equal to 4, the parameters are passed between subroutines through R0~R3, and there is no nee
[Microcontroller]
Why Apple gave up on developing its own Arm architecture processor from Intel
At this year's Apple WWDC conference, in addition to iOS 14 and Mac OS systems, the most watched event was Apple's introduction of Arm processors to replace the 15-year-old x86 processors. It is reported that Apple has tested Arm-based chips on Mac computers and found that their performance has been greatly improved o
[Mobile phone portable]
Why Apple gave up on developing its own Arm architecture processor from Intel
ARM assembly learning registers
------------------------------------------------------------- Author :tiger-john WebSite :blog.csdn.net/tigerjb Email : jibo.tiger@gmail.com Update-Time : Monday, February 14, 2011 Tiger Statement: I despise individuals or groups who directly copy my articles without adding the source, but I do not exclude other
[Microcontroller]
ARM assembly learning registers
ARM assembly command reference AREA
1. AREA The AREA directive instructs the assembler to assemble a new code or data segment. A segment is an independent, named, invisible block of code or data that is handled by the linker. Syntax     AREA sectionname{,attr}{,attr}...     where: sectionname is the name of the section to be assigned.
[Microcontroller]
ARM7 LPC2103 interrupt processing method
        The Vectored Interrupt Controller (VIC) has 32 interrupt request inputs that can be programmed into three categories: FIQ, Vectored IRQ, and Non-Vectored IRQ. The programmable allocation mechanism means that the interrupt priorities of different peripherals can be dynamically allocated and adjusted. Fast inter
[Microcontroller]
Application of ARM and Linux embedded systems in underground coal mines
1 System hardware structure design (1) System structure The system consists of an embedded controller, a remote monitoring station, a front-end data collector and corresponding splitters. The front-end sensors include temperature, pressure and gas concentration collectors. The system st
[Microcontroller]
Application of ARM and Linux embedded systems in underground coal mines
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号