Segment #1
LDMED sp!, {r5-r8, r12}
Segment #2
LDMED sp!, {r5-r9, r12}
8. In the following ARM assembly language subroutine using the ARM Procedure Call Standard, we take a value n found in R0 and raise it to the tenth power (n^10), placing the result back into R0. The subroutine accomplishes this by calling a subroutine pow, which takes the value in R0 and raises it to the power found in R1, placing the value of a^b into R0.
toTenth:
MOV R1, #10
BL pow
MOV PC, LR
Even though pow abides by the ARM Procedure Call Standard and works correctly, we find that this toTenth subroutine never returns. Explain why precisely this happens, and describe what you would do to repair it.