|
LLVM 23.0.0git
|
Classes | |
| struct | InstructionMask |
| Instruction mask entry for R_HEX_6_X / R_HEX_16_X lookup. More... | |
Enumerations | |
| enum | EdgeKind_hexagon : Edge::Kind { Pointer32 = Edge::FirstRelocation , PCRel32 , B22_PCREL , B15_PCREL , B13_PCREL , B9_PCREL , B7_PCREL , HI16 , LO16 , Word32_6_X , B32_PCREL_X , B22_PCREL_X , B15_PCREL_X , B13_PCREL_X , B9_PCREL_X , B7_PCREL_X , Word6_X , Word6_PCREL_X , Word8_X , Word9_X , Word10_X , Word11_X , Word12_X , Word16_X } |
| Represents Hexagon fixup kinds. More... | |
Functions | |
| LLVM_ABI const char * | getEdgeKindName (Edge::Kind K) |
| Returns a string name for the given Hexagon edge kind. | |
| constexpr uint32_t | applyMask (uint32_t Mask, uint32_t Data) |
| Spread data bits into instruction word according to mask. | |
| bool | isDuplex (uint32_t Insn) |
| Expected< uint32_t > | findMaskR6 (uint32_t Insn) |
| Expected< uint32_t > | findMaskR8 (uint32_t Insn) |
| Expected< uint32_t > | findMaskR11 (uint32_t Insn) |
| Expected< uint32_t > | findMaskR16 (uint32_t Insn) |
| Error | applyFixup (LinkGraph &G, Block &B, const Edge &E) |
| Apply fixup expression for edge to block content. | |
Variables | |
| constexpr uint32_t | PointerSize = 4 |
| Hexagon pointer size. | |
| constexpr InstructionMask | R6Masks [] |
| Mask table for R_HEX_6_X relocations, indexed by instruction class. | |
| constexpr uint32_t | InstParsePacketEnd = 0x0000c000 |
| enum llvm::jitlink::hexagon::EdgeKind_hexagon : Edge::Kind |
Represents Hexagon fixup kinds.
| Enumerator | |
|---|---|
| Pointer32 | Full 32-bit absolute pointer. Fixup <- Target + Addend : uint32 |
| PCRel32 | 32-bit PC-relative. Fixup <- Target - Fixup + Addend : int32 |
| B22_PCREL | 22-bit PC-relative branch (shifted right by 2). Fixup <- (Target - Fixup + Addend) >> 2 : int22 Mask: 0x01ff3ffe |
| B15_PCREL | 15-bit PC-relative branch (shifted right by 2). Fixup <- (Target - Fixup + Addend) >> 2 : int15 Mask: 0x00df20fe |
| B13_PCREL | 13-bit PC-relative branch (shifted right by 2). Fixup <- (Target - Fixup + Addend) >> 2 : int13 Mask: 0x00202ffe |
| B9_PCREL | 9-bit PC-relative branch (shifted right by 2). Fixup <- (Target - Fixup + Addend) >> 2 : int9 Mask: 0x003000fe |
| B7_PCREL | 7-bit PC-relative branch (shifted right by 2). Fixup <- (Target - Fixup + Addend) >> 2 : int7 Mask: 0x00001f18 |
| HI16 | High 16 bits of absolute address. Fixup <- (Target + Addend) >> 16 Mask: 0x00c03fff |
| LO16 | Low 16 bits of absolute address. Fixup <- (Target + Addend) & 0xffff Mask: 0x00c03fff |
| Word32_6_X | 32-bit absolute, upper 26 bits via constant extender (shifted right by 6). Fixup <- (Target + Addend) >> 6 Mask: 0x0fff3fff |
| B32_PCREL_X | 32-bit PC-relative, upper 26 bits via constant extender (shifted by 6). Fixup <- (Target - Fixup + Addend) >> 6 Mask: 0x0fff3fff |
| B22_PCREL_X | 22-bit PC-relative branch, lower 6 bits via extender. Fixup <- (Target - Fixup + Addend) & 0x3f Mask: 0x01ff3ffe |
| B15_PCREL_X | 15-bit PC-relative branch, lower 6 bits via extender. Fixup <- (Target - Fixup + Addend) & 0x3f Mask: 0x00df20fe |
| B13_PCREL_X | 13-bit PC-relative branch, lower 6 bits via extender. Fixup <- (Target - Fixup + Addend) & 0x3f Mask: 0x00202ffe |
| B9_PCREL_X | 9-bit PC-relative branch, lower 6 bits via extender. Fixup <- (Target - Fixup + Addend) & 0x3f Mask: 0x003000fe |
| B7_PCREL_X | 7-bit PC-relative branch, lower 6 bits via extender. Fixup <- (Target - Fixup + Addend) & 0x3f Mask: 0x00001f18 |
| Word6_X | 6-bit absolute extended. Fixup <- (Target + Addend) & mask (instruction-dependent) |
| Word6_PCREL_X | 6-bit PC-relative extended. Fixup <- (Target - Fixup + Addend) & mask (instruction-dependent) |
| Word8_X | 8-bit absolute extended. |
| Word9_X | 9-bit absolute extended (6 effective bits). |
| Word10_X | 10-bit absolute extended (6 effective bits). |
| Word11_X | 11-bit absolute extended (6 effective bits). |
| Word12_X | 12-bit absolute extended. |
| Word16_X | 16-bit absolute extended (6 effective bits). |
Apply fixup expression for edge to block content.
Definition at line 236 of file hexagon.h.
References applyMask(), B(), B13_PCREL, B13_PCREL_X, B15_PCREL, B15_PCREL_X, B22_PCREL, B22_PCREL_X, B32_PCREL_X, B7_PCREL, B7_PCREL_X, B9_PCREL, B9_PCREL_X, E(), findMaskR11(), findMaskR16(), findMaskR6(), findMaskR8(), G, getEdgeKindName(), HI16, llvm::isInt(), LO16, llvm::make_error(), llvm::jitlink::makeTargetOutOfRangeError(), llvm::or32le(), P, PCRel32, Pointer32, llvm::support::endian::read32le(), llvm::Error::success(), Word10_X, Word11_X, Word12_X, Word16_X, Word32_6_X, Word6_PCREL_X, Word6_X, Word8_X, Word9_X, and llvm::support::endian::write32le().
Spread data bits into instruction word according to mask.
For each set bit in mask (scanning low to high), the corresponding bit position in the result gets the next data bit.
Definition at line 138 of file hexagon.h.
References llvm::Data.
Referenced by applyFixup().
Definition at line 207 of file hexagon.h.
References I, InstParsePacketEnd, isDuplex(), llvm::make_error(), R6Masks, and llvm::utohexstr().
Referenced by applyFixup().
Definition at line 178 of file hexagon.h.
References I, isDuplex(), llvm::make_error(), R6Masks, and llvm::utohexstr().
Referenced by applyFixup().
Returns a string name for the given Hexagon edge kind.
Definition at line 19 of file hexagon.cpp.
References B13_PCREL, B13_PCREL_X, B15_PCREL, B15_PCREL_X, B22_PCREL, B22_PCREL_X, B32_PCREL_X, B7_PCREL, B7_PCREL_X, B9_PCREL, B9_PCREL_X, llvm::jitlink::getGenericEdgeKindName(), HI16, LO16, PCRel32, Pointer32, Word10_X, Word11_X, Word12_X, Word16_X, Word32_6_X, Word6_PCREL_X, Word6_X, Word8_X, and Word9_X.
Referenced by applyFixup().
Definition at line 176 of file hexagon.h.
References InstParsePacketEnd.
Referenced by findMaskR11(), findMaskR16(), findMaskR6(), and findMaskR8().
|
inlineconstexpr |
Definition at line 174 of file hexagon.h.
Referenced by findMaskR16(), and isDuplex().
|
constexpr |
|
inlineconstexpr |
Mask table for R_HEX_6_X relocations, indexed by instruction class.
Definition at line 159 of file hexagon.h.
Referenced by findMaskR16(), and findMaskR6().