About Arudino zero (ARMV6-M) assembly principle

I know that PC jumps can be implemented using the B, BL, and BX instructions, such as

B loop_start ; jump to the loop_start label,

or `

BX LR ; return from a subroutine

But I also learned that PC jumps can also be realized using the MOV PC instruction, for example

; Calculate the destination address and store it in R0
MOV PC, R0 ; Jump to the address in R0

`
I want to know when the compiler generates the first B, BL, BX instructions? And when does it generate the MOV PC instruction?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.