GNU Assembler Directives
Directives are used mainly to define symbols, allocate storage, and control the behavior of the assembler. Directives allow the programmer to control how the assembler does its job.
Directives are used mainly to define symbols, allocate storage, and control the behavior of the assembler. Directives allow the programmer to control how the assembler does its job.
Previously, we've introduced the basic concepts associated with AAPCS (AArch64 Procedure Call Standard).
In this article we'll have a closer look at the ARM64 PCS, with demonstrations of the call conventions and stack layout.
In this article we'll introduce the basic concepts of AAPCS (AArch64 PCS), including program flow, function/subroutine and the Procedure Call Standard.
In this article, we'll explore ARM program flow based on conditional execution.
In this article, we'll explore the stack modes, activities and accesses in ARM(A32/A64).
In this article, we'll comb through the Load/Store addressing modes based on offset and index in ARM(A32/A64).
There are three fundamental addressing modes in AArch64 instructions: register offset, immediate offset, and literal.
For information about addressing modes, see Load/Store addressing modes.
In linux arm64 kernel, the transition of the PC from the physical address space to the real virtual address space is completed with the last three instructions of head.S after MMU enabled.
ldr x8, =__primary_switched
adrp x0, KERNEL_START // __pa(KERNEL_START)
br x8 // executed with the MMU enabled
Since both the LDR
pseudo-instruction and the ADRP
instruction can load the address of a label, and the LDR
pseudo-instruction can address the 64-bit address space, and the addressing range of the ADRP
instruction is the current PC address ±4GB, then what is the necessity of having an ADRP
instruction when there's already an LDR
pseudo-instruction?
The pseudo addressing mode instruction LDR
allows an immediate data value or the address of a label to be loaded into a register. The ADR
instruction forms address of a label at a PC-relative offset.
In the previous two articles(ARM ADR (PC-relative) & ARM ADRP and ADRL pseudo-instruction), we've combed AMR ADR
instructions to load a pc-relative label address to a register.
Here we collect some enlightening demos from some classic textbooks to consolidate knowledge that is not solid.