From a2c2408d431a55d5b1db44fbb2495a83f52cfcaf Mon Sep 17 00:00:00 2001 From: johannst Date: Mon, 22 Feb 2021 23:39:28 +0000 Subject: deploy: d44d6c1efdf8bf0d43b98e512503d66521b2be00 --- print.html | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'print.html') diff --git a/print.html b/print.html index 820fe00..8464508 100644 --- a/print.html +++ b/print.html @@ -2606,6 +2606,24 @@ sp_el3 stack pointer EL3 elr_el3 exception link register EL3 spsr_el3 saved process status register EL3 +

Instructions cheatsheet

+

Accessing system registers

+

Reading from system registers:

+
mrs x0, vbar_el1      // move vbar_el1 into x0
+
+

Writing to system registers:

+
msr vbar_el1, x0      // move x0 into vbar_el1
+
+

Control Flow

+
b <offset>    // relative forward/back branch
+br <Xn>       // absolute branch to address in register Xn
+
+// branch & link, store return address in X30 (LR)
+bl <offset>   // relative forward/back branch
+blr <Xn>      // absolute branch to address in register Xn
+
+ret {Xn}      // return to address in X30, or Xn if supplied
+

Addressing

Offset

ldr x0, [x1]                // x0 = [x1]
@@ -2754,13 +2772,16 @@ greeting_len:
 Hi ASM-World!
 
-

Cross-compiling on Ubuntu 20.04, paths might differ on other distributions. -Compiling natively on arm64, specifying the dynamic linker should not be required.

+

Cross-compiling on Ubuntu 20.04 (x86_64), paths might differ on other +distributions. Explicitly specifying the dynamic linker should not be +required when compiling natively on arm64.

References

-- cgit v1.2.3