bcctr (and its unconditional version, bctr ) is commonly used for branches in a function pointer.
The Power ISA instruction set has two instructions¹ that are available for branching to an address in the register: blr (branch to the link register) and bctr (branch register to the counter). Using bctr means that we can keep case references.
In this case, there is nothing special about using the ctr register - it’s just the address we are leading to. There will be an mtctr instruction in the mtctr , where we load the address into the ctr register.
You will bctrl also see bctrl : this sets the register of links to the current address + 4, and then leads the branch to the counter. This allows the call (via the function pointer) to return, returning back to the link register.
¹: in unprivileged mode, at least
source share