summaryrefslogtreecommitdiff
path: root/tools/src/chainload_asm.S
diff options
context:
space:
mode:
authormagh <magh@maghmogh.com>2023-03-06 18:44:55 -0600
committermagh <magh@maghmogh.com>2023-03-06 18:44:55 -0600
commite80d9d8871b325a04b18f90a9ea4bb7fd148fb25 (patch)
tree79dbdb8506b7ff1e92549188d1b94cfc0b3503ae /tools/src/chainload_asm.S
add m1n1HEADmaster
Diffstat (limited to 'tools/src/chainload_asm.S')
-rw-r--r--tools/src/chainload_asm.S20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/src/chainload_asm.S b/tools/src/chainload_asm.S
new file mode 100644
index 0000000..361ec8f
--- /dev/null
+++ b/tools/src/chainload_asm.S
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: MIT */
+
+.text
+
+.globl _chainload_stub_start
+.globl _chainload_stub_end
+.type _chainload_stub_start, @function
+
+_chainload_stub_start:
+1:
+ ldp x5, x6, [x1], #16
+ stp x5, x6, [x2]
+ dc cvau, x2
+ ic ivau, x2
+ add x2, x2, #16
+ sub x3, x3, #16
+ cbnz x3, 1b
+
+ br x4
+_chainload_stub_end: