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.
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
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Master Python web crawler core technology, framework and project practice PDF HD full version free download
- position2Go Review 2: Interlude
- Design of AC voltage measurement based on MSP430 microcontroller
- 【Beetle ESP32-C3】4. Luat-OS environment deployment
- A brief discussion on the differences between x86, DSP and SPARC
- ESP32-C3 RISC-V microcontroller information leak
- Review summary: Flathead RVB2601
- EEWORLD University ---- Using lithium-ion batteries more safely and efficiently - Battery Management System (BMS) Solution
- Talk: Small capital investment
- Where does the EG8010 dead time go?