LLVM  17.0.0git
RISCVFixupKinds.h
Go to the documentation of this file.
1 //===-- RISCVFixupKinds.h - RISCV Specific Fixup Entries --------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_LIB_TARGET_RISCV_MCTARGETDESC_RISCVFIXUPKINDS_H
10 #define LLVM_LIB_TARGET_RISCV_MCTARGETDESC_RISCVFIXUPKINDS_H
11 
12 #include "llvm/MC/MCFixup.h"
13 
14 #undef RISCV
15 
16 namespace llvm::RISCV {
17 enum Fixups {
18  // 20-bit fixup corresponding to %hi(foo) for instructions like lui
20  // 12-bit fixup corresponding to %lo(foo) for instructions like addi
22  // 12-bit fixup corresponding to %lo(foo) for the S-type store instructions
24  // 20-bit fixup corresponding to %pcrel_hi(foo) for instructions like auipc
26  // 12-bit fixup corresponding to %pcrel_lo(foo) for instructions like addi
28  // 12-bit fixup corresponding to %pcrel_lo(foo) for the S-type store
29  // instructions
31  // 20-bit fixup corresponding to %got_pcrel_hi(foo) for instructions like
32  // auipc
34  // 20-bit fixup corresponding to %tprel_hi(foo) for instructions like lui
36  // 12-bit fixup corresponding to %tprel_lo(foo) for instructions like addi
38  // 12-bit fixup corresponding to %tprel_lo(foo) for the S-type store
39  // instructions
41  // Fixup corresponding to %tprel_add(foo) for PseudoAddTPRel, used as a linker
42  // hint
44  // 20-bit fixup corresponding to %tls_ie_pcrel_hi(foo) for instructions like
45  // auipc
47  // 20-bit fixup corresponding to %tls_gd_pcrel_hi(foo) for instructions like
48  // auipc
50  // 20-bit fixup for symbol references in the jal instruction
52  // 12-bit fixup for symbol references in the branch instructions
54  // 11-bit fixup for symbol references in the compressed jump instruction
56  // 8-bit fixup for symbol references in the compressed branch instruction
58  // Fixup representing a legacy no-pic function call attached to the auipc
59  // instruction in a pair composed of adjacent auipc+jalr instructions.
61  // Fixup representing a function call attached to the auipc instruction in a
62  // pair composed of adjacent auipc+jalr instructions.
64  // Used to generate an R_RISCV_RELAX relocation, which indicates the linker
65  // may relax the instruction pair.
67  // Used to generate an R_RISCV_ALIGN relocation, which indicates the linker
68  // should fixup the alignment after linker relaxation.
70  // 8-bit fixup corresponding to R_RISCV_SET8 for local label assignment.
72  // 8-bit fixup corresponding to R_RISCV_ADD8 for 8-bit symbolic difference
73  // paired relocations.
75  // 8-bit fixup corresponding to R_RISCV_SUB8 for 8-bit symbolic difference
76  // paired relocations.
78  // 16-bit fixup corresponding to R_RISCV_SET16 for local label assignment.
80  // 16-bit fixup corresponding to R_RISCV_ADD16 for 16-bit symbolic difference
81  // paired reloctions.
83  // 16-bit fixup corresponding to R_RISCV_SUB16 for 16-bit symbolic difference
84  // paired reloctions.
86  // 32-bit fixup corresponding to R_RISCV_SET32 for local label assignment.
88  // 32-bit fixup corresponding to R_RISCV_ADD32 for 32-bit symbolic difference
89  // paired relocations.
91  // 32-bit fixup corresponding to R_RISCV_SUB32 for 32-bit symbolic difference
92  // paired relocations.
94  // 64-bit fixup corresponding to R_RISCV_ADD64 for 64-bit symbolic difference
95  // paired relocations.
97  // 64-bit fixup corresponding to R_RISCV_SUB64 for 64-bit symbolic difference
98  // paired relocations.
100  // 6-bit fixup corresponding to R_RISCV_SET6 for local label assignment in
101  // DWARF CFA.
103  // 6-bit fixup corresponding to R_RISCV_SUB6 for local label assignment in
104  // DWARF CFA.
106 
107  // Used as a sentinel, must be the last
110 };
111 } // end namespace llvm::RISCV
112 
113 #endif
llvm::RISCV::fixup_riscv_pcrel_lo12_i
@ fixup_riscv_pcrel_lo12_i
Definition: RISCVFixupKinds.h:27
llvm::RISCV::fixup_riscv_call_plt
@ fixup_riscv_call_plt
Definition: RISCVFixupKinds.h:63
llvm::FirstTargetFixupKind
@ FirstTargetFixupKind
Definition: MCFixup.h:45
llvm::RISCV::fixup_riscv_tls_gd_hi20
@ fixup_riscv_tls_gd_hi20
Definition: RISCVFixupKinds.h:49
llvm::RISCV::fixup_riscv_lo12_s
@ fixup_riscv_lo12_s
Definition: RISCVFixupKinds.h:23
llvm::RISCV::fixup_riscv_call
@ fixup_riscv_call
Definition: RISCVFixupKinds.h:60
llvm::RISCV::fixup_riscv_sub_64
@ fixup_riscv_sub_64
Definition: RISCVFixupKinds.h:99
llvm::RISCV::fixup_riscv_add_32
@ fixup_riscv_add_32
Definition: RISCVFixupKinds.h:90
llvm::RISCV::fixup_riscv_pcrel_lo12_s
@ fixup_riscv_pcrel_lo12_s
Definition: RISCVFixupKinds.h:30
llvm::RISCV::fixup_riscv_jal
@ fixup_riscv_jal
Definition: RISCVFixupKinds.h:51
llvm::RISCV::fixup_riscv_hi20
@ fixup_riscv_hi20
Definition: RISCVFixupKinds.h:19
llvm::RISCV::fixup_riscv_rvc_jump
@ fixup_riscv_rvc_jump
Definition: RISCVFixupKinds.h:55
llvm::RISCV::fixup_riscv_tls_got_hi20
@ fixup_riscv_tls_got_hi20
Definition: RISCVFixupKinds.h:46
llvm::RISCV::fixup_riscv_lo12_i
@ fixup_riscv_lo12_i
Definition: RISCVFixupKinds.h:21
llvm::RISCV::fixup_riscv_got_hi20
@ fixup_riscv_got_hi20
Definition: RISCVFixupKinds.h:33
llvm::RISCV::fixup_riscv_relax
@ fixup_riscv_relax
Definition: RISCVFixupKinds.h:66
llvm::RISCV::fixup_riscv_sub_8
@ fixup_riscv_sub_8
Definition: RISCVFixupKinds.h:77
llvm::RISCV::fixup_riscv_branch
@ fixup_riscv_branch
Definition: RISCVFixupKinds.h:53
llvm::RISCV::fixup_riscv_align
@ fixup_riscv_align
Definition: RISCVFixupKinds.h:69
llvm::RISCV::fixup_riscv_tprel_lo12_s
@ fixup_riscv_tprel_lo12_s
Definition: RISCVFixupKinds.h:40
llvm::RISCV::fixup_riscv_tprel_lo12_i
@ fixup_riscv_tprel_lo12_i
Definition: RISCVFixupKinds.h:37
llvm::RISCV::fixup_riscv_add_8
@ fixup_riscv_add_8
Definition: RISCVFixupKinds.h:74
llvm::RISCV::fixup_riscv_pcrel_hi20
@ fixup_riscv_pcrel_hi20
Definition: RISCVFixupKinds.h:25
llvm::RISCV::fixup_riscv_sub_16
@ fixup_riscv_sub_16
Definition: RISCVFixupKinds.h:85
MCFixup.h
llvm::RISCV::fixup_riscv_set_8
@ fixup_riscv_set_8
Definition: RISCVFixupKinds.h:71
llvm::RISCV
Definition: RISCVTargetParser.h:21
llvm::RISCV::NumTargetFixupKinds
@ NumTargetFixupKinds
Definition: RISCVFixupKinds.h:109
llvm::RISCV::fixup_riscv_sub_32
@ fixup_riscv_sub_32
Definition: RISCVFixupKinds.h:93
llvm::RISCV::fixup_riscv_tprel_add
@ fixup_riscv_tprel_add
Definition: RISCVFixupKinds.h:43
llvm::RISCV::fixup_riscv_add_64
@ fixup_riscv_add_64
Definition: RISCVFixupKinds.h:96
llvm::RISCV::fixup_riscv_add_16
@ fixup_riscv_add_16
Definition: RISCVFixupKinds.h:82
llvm::RISCV::fixup_riscv_sub_6b
@ fixup_riscv_sub_6b
Definition: RISCVFixupKinds.h:105
llvm::RISCV::fixup_riscv_set_16
@ fixup_riscv_set_16
Definition: RISCVFixupKinds.h:79
llvm::RISCV::fixup_riscv_set_32
@ fixup_riscv_set_32
Definition: RISCVFixupKinds.h:87
llvm::RISCV::fixup_riscv_rvc_branch
@ fixup_riscv_rvc_branch
Definition: RISCVFixupKinds.h:57
llvm::RISCV::fixup_riscv_invalid
@ fixup_riscv_invalid
Definition: RISCVFixupKinds.h:108
llvm::RISCV::Fixups
Fixups
Definition: RISCVFixupKinds.h:17
llvm::RISCV::fixup_riscv_tprel_hi20
@ fixup_riscv_tprel_hi20
Definition: RISCVFixupKinds.h:35
llvm::RISCV::fixup_riscv_set_6b
@ fixup_riscv_set_6b
Definition: RISCVFixupKinds.h:102