A brief discussion on ARM pseudo-instruction address reading

Publisher:mb5362443Latest update time:2020-04-27 Source: eefocusKeywords:ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. ADR pseudo-instruction --- small range 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;

A brief discussion on ARM pseudo-instruction address reading

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 Reference address:A brief discussion on ARM pseudo-instruction address reading

Previous article:Design of remote controllable power socket based on ARM-Linux architecture
Next article:Wireless weather data communication based on ARM microprocessor and Linux

Recommended ReadingLatest update time:2024-11-16 13:07

Design of microwave frequency automatic measurement system based on ARM
  1 Introduction   Microwaves usually refer to decimeter waves, centimeter waves and millimeter waves. Regarding its frequency range, one statement is:   300MHz ~ 300GHz (1MHz = 106Hz, 1GHz = 109) The corresponding wavelength in free space is about 1m~1mm.   The rise and vigorous development of microwave technolog
[Test Measurement]
Design of microwave frequency automatic measurement system based on ARM
ARM-Linux kernel transplantation--based on FL2440 development board (modified to Linux single system)
Hardware platform: FL2440 development board Kernel version: 2.6.28 Host: Ubuntu 11.04 Kernel version: 2.6.39   I originally thought that the size of the nand flash of fl2440 was 128M. I asked the customer service and found out that FL2440 now uses modern flash, which is now 256M. However, Feiling's bootloader
[Microcontroller]
ARM-Linux kernel transplantation--based on FL2440 development board (modified to Linux single system)
GlobalFoundries: Developed 3D Arm chips with 12nm FinFET packaging
According to a report by foreign media Tom's Hardware on August 10, GlobalFoundries announced this week that it has successfully produced a high-performance 3D Arm chip using its 12nm FinFET process. "These high-density 3D chips will bring new levels of performance and energy efficiency to computing applications suc
[Mobile phone portable]
Nvidia CEO Huang Renxun: Regulators will soon approve ARM acquisition
Huang Renxun said: "By bringing ARM under our umbrella, we will increase customer choice and increase market innovation. Our assessment shows that regulators will approve the transaction very soon."     Tencent Technology News: On November 22, chip giant Nvidia ended another gratifying quarter. The company previous
[Embedded]
Nvidia CEO Huang Renxun: Regulators will soon approve ARM acquisition
Signal Acquisition System Designed with ARM7 and UC/OS-II
In some industrial sites, equipment is prone to failure after long-term operation. In order to monitor these devices, data acquisition devices are usually used to collect data from them during operation and send them to the PC. The data is analyzed by specific software running on the PC to determine the status of the
[Microcontroller]
Signal Acquisition System Designed with ARM7 and UC/OS-II
Working mode of ARM processor (I)
Experimental purpose: 1.                Master the various working modes of ARM 2.                Be familiar with the registers in various working modes of ARM 3.                Learn to use software to switch between ARM working modes. Experimental content: Use MSR/MRS instructions to switch working modes and i
[Microcontroller]
Application development based on ARM+DSP
  In view of the complexity of current applications, SOC chips can better meet the needs of applications and media, integrate many interfaces, use ARM as an application processor for diversified application development and user interfaces and interfaces, and use DSP for algorithm acceleration, especially media encodin
[Microcontroller]
Learn ARM development(19)
After many days of hard work, we can finally use interrupts. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two ways to implement such interrupts in S3C44B0, one is through timer interrupts, and the other is through RTC TICK timer interrupts. Sinc
[Microcontroller]
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号