Skip to content

Instantly share code, notes, and snippets.

@anvol
Last active April 14, 2018 14:22
Show Gist options
  • Save anvol/c4632556df002fc00ee5e2780f03ad79 to your computer and use it in GitHub Desktop.
Save anvol/c4632556df002fc00ee5e2780f03ad79 to your computer and use it in GitHub Desktop.
find_max(long*, long):
cmp r1, #1
ldr r2, [r0, #0]
ble .L2
mov r3, #1
.L3:
ldr ip, [r0, #4]!
add r3, r3, #1
cmp r2, ip
movlt r2, ip
cmp r3, r1
bne .L3
.L2:
mov r0, r2
bx lr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment