User Tools

Site Tools


spo600:aarch64_register_and_instruction_quick_start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
spo600:aarch64_register_and_instruction_quick_start [2025/02/11 19:16] – [General-Purpose Integer Registers] chrisspo600:aarch64_register_and_instruction_quick_start [2025/02/19 16:54] (current) – [General-Purpose Integer Registers] chris
Line 1: Line 1:
 =====  AArch64 Register and Instruction Quick Start  ===== =====  AArch64 Register and Instruction Quick Start  =====
  
-This page contains very basic information on the AArch64 mode of the [[ARMv8]]/ARMv9 architecture: the [[Register|register]] layout and naming and some basic instructions. For more comprehensive information, see the references listed below.+This page contains very basic information on the AArch64 mode of the [[ARMv8|ARMv8/ARMv9]] architecture: the [[Register|register]] layout and naming and some basic instructions. For more comprehensive information, see the references listed below.
  
 =====   Registers  ===== =====   Registers  =====
Line 16: Line 16:
   *  For all other instructions, it is a "zero" register, which returns 0 when read and discards data when written - named rzr (xzr, wzr)   *  For all other instructions, it is a "zero" register, which returns 0 when read and discards data when written - named rzr (xzr, wzr)
  
-Usage during [[Syscalls|syscall]]/function call: +Usage during [[Syscalls|syscall]] or [[procedure call]]
-  *  **r0-r7 are used for integer and pointer arguments; additional arguments are on the stack. Return value is in r0 (if an integer or pointer)** +  *  r0-r7 are used for integer and pointer arguments; additional arguments are on the stack. Return value is in r0 (if an integer or pointer) 
-  *  **For syscalls, the syscall number is in r8** +  *  For syscalls, the syscall number is in r8 
-  *  **r9-r15 are for temporary values (may get trampled)**   r16-r18 are used for intra-procedure-call and platform values (avoid) +  *  r9-r15 are for temporary values - called function may clobber these values 
-  *  **The called routine is expected to preserve r19-r28. These registers are generally safe to use in a program that calls other procedures (functions/methods/subroutines). If you are writing a procedure, you must either avoid using these registers, or save the values in these registers and restore them before returning.**+   r16-r18 are used for intra-procedure-call and platform values (avoid) 
 +  *  r19-r28 must be preserved by a called procedure. These registers are generally safe to use in a program that calls other procedures (functions/methods/subroutines). If you are writing a procedure, you must either avoid using these registers, or save the values in these registers and restore them before returning.
   *  r29 and r30 are used as the frame register and link register (avoid)   *  r29 and r30 are used as the frame register and link register (avoid)
  
spo600/aarch64_register_and_instruction_quick_start.1739301393.txt.gz · Last modified: 2025/02/11 19:16 by chris

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki