1
0
mirror of https://github.com/ioacademy-jikim/debugging synced 2025-06-08 08:26:14 +00:00
2015-12-13 22:34:58 +09:00

23 lines
491 B
ArmAsm

# count for 1 million instructions
# total is 2 + 1 + 499997*2 + 3
.globl _start
_start:
xor %rcx,%rcx # not needed, pads total to 1M
xor %rax,%rax # not needed, pads total to 1M
mov $499997,%rcx # load counter
test_loop:
dec %rcx # repeat count times
jnz test_loop
#================================
# Exit
#================================
exit:
xor %rdi,%rdi # we return 0
mov $60,%rax # put exit syscall number (60) in rax
syscall