Lines Matching defs:Thunk
9 // This file contains Thunk subclasses.
55 class AArch64Thunk : public Thunk {
57 AArch64Thunk(Symbol &dest, int64_t addend) : Thunk(dest, addend) {}
96 class ARMThunk : public Thunk {
98 ARMThunk(Symbol &dest, int64_t addend) : Thunk(dest, addend) {}
126 class ThumbThunk : public Thunk {
128 ThumbThunk(Symbol &dest, int64_t addend) : Thunk(dest, addend) {
149 // Specific ARM Thunk implementations. The naming convention is:
307 class AVRThunk : public Thunk {
309 AVRThunk(Symbol &dest, int64_t addend) : Thunk(dest, addend) {}
316 class MipsThunk final : public Thunk {
318 MipsThunk(Symbol &dest) : Thunk(dest, 0) {}
327 class MicroMipsThunk final : public Thunk {
329 MicroMipsThunk(Symbol &dest) : Thunk(dest, 0) {}
338 class MicroMipsR6Thunk final : public Thunk {
340 MicroMipsR6Thunk(Symbol &dest) : Thunk(dest, 0) {}
348 class PPC32PltCallStub final : public Thunk {
350 // For R_PPC_PLTREL24, Thunk::addend records the addend which will be used to
354 : Thunk(dest, rel.addend), file(isec.file) {}
365 class PPC32LongThunk final : public Thunk {
367 PPC32LongThunk(Symbol &dest, int64_t addend) : Thunk(dest, addend) {}
381 class PPC64PltCallStub final : public Thunk {
383 PPC64PltCallStub(Symbol &dest) : Thunk(dest, 0) {}
397 class PPC64R2SaveStub final : public Thunk {
399 PPC64R2SaveStub(Symbol &dest, int64_t addend) : Thunk(dest, addend) {
434 class PPC64R12SetupStub final : public Thunk {
437 : Thunk(dest, 0), gotPlt(gotPlt) {
458 class PPC64LongBranchThunk : public Thunk {
467 PPC64LongBranchThunk(Symbol &dest, int64_t addend) : Thunk(dest, addend) {}
495 Defined *Thunk::addSymbol(StringRef name, uint8_t type, uint64_t value,
502 void Thunk::setOffset(uint64_t newOffset) {
508 // AArch64 Thunk base class.
555 // This Thunk has a maximum range of 4Gb, this is sufficient for all programs
1251 Thunk::Thunk(Symbol &d, int64_t a) : destination(d), addend(a), offset(0) {
1255 Thunk::~Thunk() = default;
1257 static Thunk *addThunkAArch64(RelType type, Symbol &s, int64_t a) {
1274 static Thunk *addThunkArmv4(RelType reloc, Symbol &s, int64_t a) {
1307 // - Only Thumb relocation that can generate a Thunk is a BL, this can always
1309 static Thunk *addThunkArmv5v6(RelType reloc, Symbol &s, int64_t a) {
1329 static Thunk *addThunkV6M(const InputSection &isec, RelType reloc, Symbol &s,
1353 static Thunk *addThunkArm(const InputSection &isec, RelType reloc, Symbol &s,
1355 // Decide which Thunk is needed based on:
1357 // - An Arm Thunk can only be used if Arm state is available.
1358 // - A Thumb Thunk can only be used if Thumb state is available.
1359 // - Can only use a Thunk if it uses instructions that the Target supports.
1361 // - Branch instructions cannot change state, can only select Thunk that
1398 static Thunk *addThunkAVR(RelType type, Symbol &s, int64_t a) {
1408 static Thunk *addThunkMips(RelType type, Symbol &s) {
1416 static Thunk *addThunkPPC32(const InputSection &isec, const Relocation &rel,
1426 static Thunk *addThunkPPC64(RelType type, Symbol &s, int64_t a) {
1438 ? (Thunk *)make<PPC64R12SetupStub>(s, /*gotPlt=*/true)
1439 : (Thunk *)make<PPC64PltCallStub>(s);
1456 Thunk *elf::addThunk(const InputSection &isec, Relocation &rel) {
1474 llvm_unreachable("add Thunk only supported for ARM, AVR, Mips and PowerPC");