ARM Architecture - Subroutines and Stack
Given this ARM assembly snippet for a recursive sum function:
What is the main issue with this code?
sum:
CMP R0, #0
BEQ end
PUSH {LR}
SUB R0, R0, #1
BL sum
POP {LR}
ADD R0, R0, R1
end:
BX LRWhat is the main issue with this code?
