mirror of
https://github.com/pkivolowitz/asm_book.git
synced 2026-06-23 01:26:53 +08:00
Modify assembly file
This commit is contained in:
parent
7faf3ca119
commit
19c5986111
1 changed files with 3 additions and 3 deletions
|
|
@ -20,9 +20,9 @@ FindOldestPerson:
|
||||||
b 10f // enter loop
|
b 10f // enter loop
|
||||||
|
|
||||||
1: ldr w5, [x3, p.age] // fetch loop ptr -> age
|
1: ldr w5, [x3, p.age] // fetch loop ptr -> age
|
||||||
cmp w2, w5 // compare to oldest_age
|
cmp w5, w2 // compare to oldest_age
|
||||||
csel w2, w2, w5, gt // update based on cmp
|
csel w2, w5, w2, gt // update based on cmp
|
||||||
csel x0, x0, x3, gt // update based on cmp
|
csel x0, x3, x0, gt // update based on cmp
|
||||||
add x3, x3, 24 // increment loop ptr
|
add x3, x3, 24 // increment loop ptr
|
||||||
10: cmp x3, x4 // has loop ptr reached end_ptr?
|
10: cmp x3, x4 // has loop ptr reached end_ptr?
|
||||||
blt 1b // no, not yet
|
blt 1b // no, not yet
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue