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