Changes

Jump to: navigation, search

AArch64 Register and Instruction Quick Start

275 bytes added, 14:06, 2 March 2020
Starter Kit
mov r0,r1 // move data from r1 to r0
mov r0,99 // load r0 with 99 (only certain immediate values are possible)
ret // return from subroutine (counterpart to bl)
str r0,[r1,0] // store register r0 to address pointed to by (r1 + (0 * ''size'')) where ''size'' is 8 bytes for 64-bit stores
strb w0,[r1,0] // like str but writes one byte only - note the use of w0 for the source register name
* Character values are indicated by quotation marks. Escapes (such as '\n') are permitted.
* Destinations are given as the first argument (mov r0, r1 moves INTO r0 FROM r1; you can think of this as r0=r1).
* For the LDR/STR instructions: you can append a character indicating the number of bits (lowest) to be loaded or stored:
** Q = Quadword = 64 bits
** D = Double word = 32 bits
** W = Word = 16 bits
** B = Byte = 8 bits
== Resources ==
* ARM Aarch64 documentation
** [http://developer.arm.com / ARM Developer Information Centre]<!-- *** [https://developer.arm.com/products/architecture/a-profile/docs/den0024/a latest ARM Cortex-A Series Programmer’s Guide for ARMv8-A] -->*** The ''short'' guide to the ARMv8 instruction set: [https://www.element14.com/community/servlet/JiveServlet/previewBody/41836-102-1-229511/ARM.Reference_Manual.pdf ARMv8 Instruction Set Overview] ("ARM ISA Overview")*** The ''long'' guide to the ARMv8 instruction set: [https://developer.arm.com/docs/ddi0487/latest/arm-architecture-reference-manual-armv8-for-armv8-a-architecture-profile ARM Architecture Reference Manual ARMv8, for ARMv8-A architecture profile] ("ARM ARM")** [httphttps://infocenterdeveloper.arm.com/helpdocs/topicihi0055/com.latest/procedure-call-standard-for-the-arm.doc.ihi0055b/IHI0055B_aapcs64.pdf -64-bit-architecture Procedure Call Standard for the ARM 64-bit Architecture (AArch64)]
* GAS Manual - Using as, The GNU Assembler: https://sourceware.org/binutils/docs/as/

Navigation menu