LLVM: llvm::jitlink::loongarch Namespace Reference (original) (raw)

Represents loongarch fixups.

Enumerator

Pointer64

A plain 64-bit pointer value relocation.

Fixup expression: Fixup <- Target + Addend : uint64

Pointer32

A plain 32-bit pointer value relocation.

Fixup expression: Fixup <- Target + Addend : uint32

Errors:

Branch16PCRel

A 16-bit PC-relative branch.

Represents a PC-relative branch to a target within +/-128Kb. The target must be 4-byte aligned.

Fixup expression: Fixup <- (Target - Fixup + Addend) >> 2 : int16

Notes: The '16' in the name refers to the number operand bits and follows the naming convention used by the corresponding ELF relocations. Since the low two bits must be zero (because of the 4-byte alignment of the target) the operand is effectively a signed 18-bit number.

Errors:

Branch21PCRel

A 21-bit PC-relative branch.

Represents a PC-relative branch to a target within +/-4Mb. The Target must be 4-byte aligned.

Fixup expression: Fixup <- (Target - Fixup + Addend) >> 2 : int21

Notes: The '21' in the name refers to the number operand bits and follows the naming convention used by the corresponding ELF relocations. Since the low two bits must be zero (because of the 4-byte alignment of the target) the operand is effectively a signed 23-bit number.

Errors:

Branch26PCRel

A 26-bit PC-relative branch.

Represents a PC-relative call or branch to a target within +/-128Mb. The target must be 4-byte aligned.

Fixup expression: Fixup <- (Target - Fixup + Addend) >> 2 : int26

Notes: The '26' in the name refers to the number operand bits and follows the naming convention used by the corresponding ELF relocations. Since the low two bits must be zero (because of the 4-byte alignment of the target) the operand is effectively a signed 28-bit number.

Errors:

Delta32

A 32-bit delta.

Delta from the fixup to the target.

Fixup expression: Fixup <- Target - Fixup + Addend : int32

Errors:

NegDelta32

A 32-bit negative delta.

Delta from the target back to the fixup.

Fixup expression: Fixup <- Fixup - Target + Addend : int32

Errors:

Delta64

A 64-bit delta.

Delta from the fixup to the target.

Fixup expression: Fixup <- Target - Fixup + Addend : int64

Page20

The signed 20-bit delta from the fixup page to the page containing the target.

Fixup expression: Fixup <- (((Target + Addend + ((Target + Addend) & 0x800)) & ~0xfff) Notes: For PCALAU12I fixups.

Errors:

PageOffset12

The 12-bit offset of the target within its page.

Typically used to fix up ADDI/LD_W/LD_D immediates.

Fixup expression: Fixup <- ((Target + Addend) >> Shift) & 0xfff : int12

RequestGOTAndTransformToPage20

A GOT entry getter/constructor, transformed to Page20 pointing at the GOT entry for the original target.

Indicates that this edge should be transformed into a Page20 targeting the GOT entry for the edge's current target, maintaining the same addend. A GOT entry for the target should be created if one does not already exist.

Edges of this kind are usually handled by a GOT/PLT builder pass inserted by default.

Fixup expression: NONE

Errors:

RequestGOTAndTransformToPageOffset12

A GOT entry getter/constructor, transformed to Pageoffset12 pointing at the GOT entry for the original target.

Indicates that this edge should be transformed into a PageOffset12 targeting the GOT entry for the edge's current target, maintaining the same addend. A GOT entry for the target should be created if one does not already exist.

Edges of this kind are usually handled by a GOT/PLT builder pass inserted by default.

Fixup expression: NONE

Call36PCRel

A 36-bit PC-relative call.

Represents a PC-relative call to a target within [-128G - 0x20000, +128G

Fixup expression: Fixup <- (Target - Fixup + Addend) >> 2 : int36

Notes: The '36' in the name refers to the number operand bits and follows the naming convention used by the corresponding ELF relocations. Since the low two bits must be zero (because of the 4-byte alignment of the target) the operand is effectively a signed 38-bit number.

Errors:

Add6

low 6 bits label addition

Fixup expression: Fixup <- (*{1}Fixup + (Target + Addend) & 0x3f) : int8

Add8

8 bits label addition

Fixup expression: Fixup <- (*{1}Fixup + Target + Addend) : int8

Add16

16 bits label addition

Fixup expression: Fixup <- (*{2}Fixup + Target + Addend) : int16

Add32

32 bits label addition

Fixup expression: Fixup <- (*{4}Fixup + Target + Addend) : int32

Add64

64 bits label addition

Fixup expression: Fixup <- (*{8}Fixup + Target + Addend) : int64

AddUleb128

ULEB128 bits label addition.

Fixup expression: Fixup <- (Fixup + Target + Addend) : uleb128

Sub6

low 6 bits label subtraction

Fixup expression: Fixup <- (*{1}Fixup - (Target + Addend) & 0x3f) : int8

Sub8

8 bits label subtraction

Fixup expression: Fixup <- (*{1}Fixup - Target - Addend) : int8

Sub16

16 bits label subtraction

Fixup expression: Fixup <- (*{2}Fixup - Target - Addend) : int16

Sub32

32 bits label subtraction

Fixup expression: Fixup <- (*{4}Fixup - Target - Addend) : int32

Sub64

64 bits label subtraction

Fixup expression: Fixup <- (*{8}Fixup - Target - Addend) : int64

SubUleb128

ULEB128 bits label subtraction.

Fixup expression: Fixup <- (Fixup - Target - Addend) : uleb128

AlignRelaxable

Alignment requirement used by linker relaxation.

Linker relaxation will use this to ensure all code sequences are properly aligned and then remove these edges from the graph.