From 19c5986111a969b71ffdb97006c263b32a91dd38 Mon Sep 17 00:00:00 2001 From: d Date: Fri, 28 Feb 2025 21:44:04 -0800 Subject: [PATCH] Modify assembly file --- section_1/regs/array11.s | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/section_1/regs/array11.s b/section_1/regs/array11.s index eecea8a..1822849 100644 --- a/section_1/regs/array11.s +++ b/section_1/regs/array11.s @@ -20,9 +20,9 @@ FindOldestPerson: b 10f // enter loop 1: ldr w5, [x3, p.age] // fetch loop ptr -> age - cmp w2, w5 // compare to oldest_age - csel w2, w2, w5, gt // update based on cmp - csel x0, x0, x3, gt // update based on cmp + cmp w5, w2 // compare to oldest_age + csel w2, w5, w2, gt // update based on cmp + csel x0, x3, x0, gt // update based on cmp add x3, x3, 24 // increment loop ptr 10: cmp x3, x4 // has loop ptr reached end_ptr? blt 1b // no, not yet