I am learning ARM assembly and compiled a code which simply ran a loop 5 times but when ran it goes to infinite loop
.global main
main:
push {ip.lr}
sub r1,r1,r1
well:
ldr r0,=message
bl printf
add r1,r1,#1
cmp r1,#6
bne well
pop {ip,pc}
message:
.ascii "Amit Singh Tomar\n"
Why this code runs in to infinite Loop?