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
15#undef RISCV
16
17namespace llvm::RISCV {
18enum 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 foo-bar for instructions like addi
25 // 12-bit fixup corresponding to %lo(foo) for the S-type store instructions
27 // 20-bit fixup corresponding to %pcrel_hi(foo) for instructions like auipc
29 // 12-bit fixup corresponding to %pcrel_lo(foo) for instructions like addi
31 // 12-bit fixup corresponding to %pcrel_lo(foo) for the S-type store
32 // instructions
34 // 20-bit fixup for symbol references in the jal instruction
36 // 12-bit fixup for symbol references in the branch instructions
38 // 11-bit fixup for symbol references in the compressed jump instruction
40 // 8-bit fixup for symbol references in the compressed branch instruction
42 // 6-bit fixup for symbol references in instructions like c.li
44 // Fixup representing a legacy no-pic function call attached to the auipc
45 // instruction in a pair composed of adjacent auipc+jalr instructions.
47 // Fixup representing a function call attached to the auipc instruction in a
48 // pair composed of adjacent auipc+jalr instructions.
50
51 // Qualcomm specific fixups
52 // 12-bit fixup for symbol references in the 48-bit Xqcibi branch immediate
53 // instructions
55 // 32-bit fixup for symbol references in the 48-bit qc.e.li instruction
57 // 20-bit fixup for symbol references in the 32-bit qc.li instruction
59 // 32-bit fixup for symbol references in the 48-bit qc.j/qc.jal instructions
61
62 // Andes specific fixups
63 // 10-bit fixup for symbol references in the xandesperf branch instruction
65
66 // Used as a sentinel, must be the last
69};
70} // end namespace llvm::RISCV
71
72#endif
@ FirstTargetFixupKind
Definition MCFixup.h:44