LLVM 22.0.0git
RISCVFixupKinds.h
Go to the documentation of this file.
1//===-- RISCVFixupKinds.h - RISC-V 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
13#include "llvm/MC/MCFixup.h"
14#include <utility>
15
16#undef RISCV
17
18namespace llvm::RISCV {
19enum Fixups {
20 // 20-bit fixup corresponding to %hi(foo) for instructions like lui
22 // 12-bit fixup corresponding to %lo(foo) for instructions like addi
24 // 12-bit fixup corresponding to foo-bar for instructions like addi
26 // 12-bit fixup corresponding to %lo(foo) for the S-type store instructions
28 // 20-bit fixup corresponding to %pcrel_hi(foo) for instructions like auipc
30 // 12-bit fixup corresponding to %pcrel_lo(foo) for instructions like addi
32 // 12-bit fixup corresponding to %pcrel_lo(foo) for the S-type store
33 // instructions
35 // 20-bit fixup for symbol references in the jal instruction
37 // 12-bit fixup for symbol references in the branch instructions
39 // 11-bit fixup for symbol references in the compressed jump instruction
41 // 8-bit fixup for symbol references in the compressed branch instruction
43 // 6-bit fixup for symbol references in instructions like c.li
45 // Fixup representing a legacy no-pic function call attached to the auipc
46 // instruction in a pair composed of adjacent auipc+jalr instructions.
48 // Fixup representing a function call attached to the auipc instruction in a
49 // pair composed of adjacent auipc+jalr instructions.
51
52 // Qualcomm specific fixups
53 // 12-bit fixup for symbol references in the 48-bit Xqcibi branch immediate
54 // instructions
56 // 32-bit fixup for symbol references in the 48-bit qc.e.li instruction
58 // 20-bit fixup for symbol references in the 32-bit qc.li instruction
60 // 32-bit fixup for symbol references in the 48-bit qc.j/qc.jal instructions
62
63 // Andes specific fixups
64 // 10-bit fixup for symbol references in the xandesperf branch instruction
66
67 // Used as a sentinel, must be the last
70};
71} // end namespace llvm::RISCV
72
73#endif
@ fixup_riscv_pcrel_lo12_i
@ fixup_riscv_pcrel_lo12_s
@ fixup_riscv_nds_branch_10
@ fixup_riscv_qc_e_call_plt
@ FirstTargetFixupKind
Definition: MCFixup.h:44