From b3b3aa1adeae48b2dc78db54fc740bbabf65a172 Mon Sep 17 00:00:00 2001 From: Hunter Kvalevog Date: Mon, 12 Oct 2026 17:51:31 -0500 Subject: --- aarch64/kusswurm_ch11.S | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'aarch64/kusswurm_ch11.S') diff --git a/aarch64/kusswurm_ch11.S b/aarch64/kusswurm_ch11.S index 9c10ae6..926decc 100644 --- a/aarch64/kusswurm_ch11.S +++ b/aarch64/kusswurm_ch11.S @@ -122,3 +122,24 @@ SYM(test_mov1): ret +// example 6 + +.global SYM(test_shift1) + +SYM(test_shift1): + // x0: *out + + ldr x9, [x0] // x9 = out[0] + ldr x10, [x0, #4] // x10 = out[1] + ldr x11, [x0, #8] // x11 = out[2] + + lsl x10, x9, x10 + lsr x11, x10, x11 + + str x10, [x0, #4] + str x11, [x0, #8] + + ret + +// skipping example 7 because it's very obvious + -- cgit v1.2.3