LLVM  6.0.0svn
Namespaces | Functions
adjust Namespace Reference

Namespaces

 ldi
 Fixups relating to the LDI instruction.
 

Functions

void signed_width (unsigned Width, uint64_t Value, std::string Description, const MCFixup &Fixup, MCContext *Ctx=nullptr)
 
void unsigned_width (unsigned Width, uint64_t Value, std::string Description, const MCFixup &Fixup, MCContext *Ctx=nullptr)
 
void adjustBranch (unsigned Size, const MCFixup &Fixup, uint64_t &Value, MCContext *Ctx=nullptr)
 Adjusts the value of a branch target before fixup application. More...
 
void adjustRelativeBranch (unsigned Size, const MCFixup &Fixup, uint64_t &Value, MCContext *Ctx=nullptr)
 Adjusts the value of a relative branch target before fixup application. More...
 
void fixup_call (unsigned Size, const MCFixup &Fixup, uint64_t &Value, MCContext *Ctx=nullptr)
 22-bit absolute fixup. More...
 
void fixup_7_pcrel (unsigned Size, const MCFixup &Fixup, uint64_t &Value, MCContext *Ctx=nullptr)
 7-bit PC-relative fixup. More...
 
void fixup_13_pcrel (unsigned Size, const MCFixup &Fixup, uint64_t &Value, MCContext *Ctx=nullptr)
 12-bit PC-relative fixup. More...
 
void fixup_6_adiw (const MCFixup &Fixup, uint64_t &Value, MCContext *Ctx=nullptr)
 6-bit fixup for the immediate operand of the ADIW family of instructions. More...
 
void fixup_port5 (const MCFixup &Fixup, uint64_t &Value, MCContext *Ctx=nullptr)
 5-bit port number fixup on the SBIC family of instructions. More...
 
void fixup_port6 (const MCFixup &Fixup, uint64_t &Value, MCContext *Ctx=nullptr)
 6-bit port number fixup on the IN family of instructions. More...
 
void pm (uint64_t &Value)
 Adjusts a program memory address. More...
 

Function Documentation

◆ adjustBranch()

void adjust::adjustBranch ( unsigned  Size,
const MCFixup Fixup,
uint64_t &  Value,
MCContext Ctx = nullptr 
)

Adjusts the value of a branch target before fixup application.

Definition at line 76 of file AVRAsmBackend.cpp.

References llvm::AVR::fixups::adjustBranchTarget(), and unsigned_width().

Referenced by fixup_call().

◆ adjustRelativeBranch()

void adjust::adjustRelativeBranch ( unsigned  Size,
const MCFixup Fixup,
uint64_t &  Value,
MCContext Ctx = nullptr 
)

Adjusts the value of a relative branch target before fixup application.

Definition at line 87 of file AVRAsmBackend.cpp.

References llvm::AVR::fixups::adjustBranchTarget(), and signed_width().

Referenced by fixup_13_pcrel(), and fixup_7_pcrel().

◆ fixup_13_pcrel()

void adjust::fixup_13_pcrel ( unsigned  Size,
const MCFixup Fixup,
uint64_t &  Value,
MCContext Ctx = nullptr 
)

12-bit PC-relative fixup.

Yes, the fixup is 12 bits even though the name says otherwise.

Resolves to: 0000 kkkk kkkk kkkk Offset of 0 (so the result isn't left-shifted before application).

Definition at line 135 of file AVRAsmBackend.cpp.

References adjustRelativeBranch().

Referenced by llvm::AVRAsmBackend::adjustFixupValue(), and llvm::AVRAsmBackend::shouldForceRelocation().

◆ fixup_6_adiw()

void adjust::fixup_6_adiw ( const MCFixup Fixup,
uint64_t &  Value,
MCContext Ctx = nullptr 
)

6-bit fixup for the immediate operand of the ADIW family of instructions.

Resolves to: 0000 0000 kk00 kkkk

Definition at line 148 of file AVRAsmBackend.cpp.

References unsigned_width().

Referenced by llvm::AVRAsmBackend::adjustFixupValue().

◆ fixup_7_pcrel()

void adjust::fixup_7_pcrel ( unsigned  Size,
const MCFixup Fixup,
uint64_t &  Value,
MCContext Ctx = nullptr 
)

7-bit PC-relative fixup.

Resolves to: 0000 00kk kkkk k000 Offset of 0 (so the result is left shifted by 3 bits before application).

Definition at line 121 of file AVRAsmBackend.cpp.

References adjustRelativeBranch().

Referenced by llvm::AVRAsmBackend::adjustFixupValue(), and llvm::AVRAsmBackend::shouldForceRelocation().

◆ fixup_call()

void adjust::fixup_call ( unsigned  Size,
const MCFixup Fixup,
uint64_t &  Value,
MCContext Ctx = nullptr 
)

22-bit absolute fixup.

Resolves to: 1001 kkkk 010k kkkk kkkk kkkk 111k kkkk

Offset of 0 (so the result is left shifted by 3 bits before application).

Definition at line 105 of file AVRAsmBackend.cpp.

References adjustBranch().

Referenced by llvm::AVRAsmBackend::adjustFixupValue(), and llvm::AVRAsmBackend::shouldForceRelocation().

◆ fixup_port5()

void adjust::fixup_port5 ( const MCFixup Fixup,
uint64_t &  Value,
MCContext Ctx = nullptr 
)

5-bit port number fixup on the SBIC family of instructions.

Resolves to: 0000 0000 AAAA A000

Definition at line 159 of file AVRAsmBackend.cpp.

References unsigned_width().

Referenced by llvm::AVRAsmBackend::adjustFixupValue().

◆ fixup_port6()

void adjust::fixup_port6 ( const MCFixup Fixup,
uint64_t &  Value,
MCContext Ctx = nullptr 
)

6-bit port number fixup on the IN family of instructions.

Resolves to: 1011 0AAd dddd AAAA

Definition at line 172 of file AVRAsmBackend.cpp.

References unsigned_width().

Referenced by llvm::AVRAsmBackend::adjustFixupValue().

◆ pm()

void adjust::pm ( uint64_t &  Value)

Adjusts a program memory address.

This is a simple right-shift.

Definition at line 181 of file AVRAsmBackend.cpp.

Referenced by llvm::AVRAsmBackend::adjustFixupValue(), and llvm::Regex::match().

◆ signed_width()

void adjust::signed_width ( unsigned  Width,
uint64_t  Value,
std::string  Description,
const MCFixup Fixup,
MCContext Ctx = nullptr 
)

◆ unsigned_width()

void adjust::unsigned_width ( unsigned  Width,
uint64_t  Value,
std::string  Description,
const MCFixup Fixup,
MCContext Ctx = nullptr 
)