LLVM  6.0.0svn
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]Thetarget to adjust.

Definition at line 143 of file AVRFixupKinds.h.

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