LLVM 20.0.0git
Functions
llvm::AVR::fixups Namespace Reference

Functions

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

Function Documentation

◆ adjustBranchTarget()

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

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.

Parameters
[in,out]valThe target to adjust.

Definition at line 141 of file AVRFixupKinds.h.

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