Skip to content

Instantly share code, notes, and snippets.

@nomaddo
Created May 31, 2017 15:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nomaddo/d264b28995a6ce6d0845d3c6a845f9b2 to your computer and use it in GitHub Desktop.
Save nomaddo/d264b28995a6ce6d0845d3c6a845f9b2 to your computer and use it in GitHub Desktop.
分岐命令の実行時間 => 3.1s
.global main
.type main, %function
main:
push {r3, lr}
bl test
mov r0, #0
pop {r3, pc}
.global test
.type test, %function
test:
mov r0, #0
ldr r3, =120000000
b l1
l1:
bne l2
l2:
bne l3
l3:
bne l4
l4:
bne l5
l5:
bne l6
l6:
bne l7
l7:
bne l8
l8:
bne l9
l9:
bne l10
l10:
add r0, r0, #1
cmp r0, r3
bne l1
bx lr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment