LLVM  15.0.0git
llvm::AVR::fixups Namespace Reference


template<typename T >
void adjustBranchTarget (T &val)
 Adjusts the value of a branch target. More...

Function Documentation

◆ adjustBranchTarget()

template<typename T >
void llvm::AVR::fixups::adjustBranchTarget ( T val)

Adjusts the value of a branch target.

All branch targets in AVR are rightshifted by 1 to take advantage of the fact that all instructions are aligned to addresses of size 2, so bit 0 of an address is always 0. This gives us another bit of precision.

[in,out]valThe target to adjust.

Definition at line 141 of file AVRFixupKinds.h.

References val.

Referenced by adjust::adjustBranch(), and adjust::adjustRelativeBranch().