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.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'aarch64/kusswurm_ch11.c') diff --git a/aarch64/kusswurm_ch11.c b/aarch64/kusswurm_ch11.c index e9778f4..a5bb5d0 100644 --- a/aarch64/kusswurm_ch11.c +++ b/aarch64/kusswurm_ch11.c @@ -31,6 +31,9 @@ int32_t test_ldr1(int32_t i, int64_t j, int32_t *tab); // example 5 void test_mov1(uint32_t *tab); +// example 6 +void test_shift1(uint32_t *tab); + int main(int argc, const char* argv[]) { (void)argc; (void)argv; @@ -69,5 +72,15 @@ int main(int argc, const char* argv[]) printf(" out[0] = 0x%X\n", out[0]); printf(" out[1] = 0x%X\n", out[1]); printf(" out[2] = 0x%X\n", out[2]); + + // example 6 + out[0] = 1; // starting val + out[1] = 8; // shift left by + out[2] = 4; // shift right by + test_shift1(out); + printf("test_shift1(out):\n"); + printf(" out[0] = 0x%X\n", out[0]); + printf(" out[1] = 0x%X\n", out[1]); + printf(" out[2] = 0x%X\n", out[2]); } -- cgit v1.2.3