xref: /freebsd-src/contrib/llvm-project/llvm/lib/Target/X86/MCTargetDesc/X86FixupKinds.h (revision 0b57cec536236d46e3dba9bd041533462f33dbb7)
1*0b57cec5SDimitry Andric //===-- X86FixupKinds.h - X86 Specific Fixup Entries ------------*- C++ -*-===//
2*0b57cec5SDimitry Andric //
3*0b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*0b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5*0b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*0b57cec5SDimitry Andric //
7*0b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
8*0b57cec5SDimitry Andric 
9*0b57cec5SDimitry Andric #ifndef LLVM_LIB_TARGET_X86_MCTARGETDESC_X86FIXUPKINDS_H
10*0b57cec5SDimitry Andric #define LLVM_LIB_TARGET_X86_MCTARGETDESC_X86FIXUPKINDS_H
11*0b57cec5SDimitry Andric 
12*0b57cec5SDimitry Andric #include "llvm/MC/MCFixup.h"
13*0b57cec5SDimitry Andric 
14*0b57cec5SDimitry Andric namespace llvm {
15*0b57cec5SDimitry Andric namespace X86 {
16*0b57cec5SDimitry Andric enum Fixups {
17*0b57cec5SDimitry Andric   reloc_riprel_4byte = FirstTargetFixupKind, // 32-bit rip-relative
18*0b57cec5SDimitry Andric   reloc_riprel_4byte_movq_load,              // 32-bit rip-relative in movq
19*0b57cec5SDimitry Andric   reloc_riprel_4byte_relax,                  // 32-bit rip-relative in relaxable
20*0b57cec5SDimitry Andric                                              // instruction
21*0b57cec5SDimitry Andric   reloc_riprel_4byte_relax_rex,              // 32-bit rip-relative in relaxable
22*0b57cec5SDimitry Andric                                              // instruction with rex prefix
23*0b57cec5SDimitry Andric   reloc_signed_4byte,                        // 32-bit signed. Unlike FK_Data_4
24*0b57cec5SDimitry Andric                                              // this will be sign extended at
25*0b57cec5SDimitry Andric                                              // runtime.
26*0b57cec5SDimitry Andric   reloc_signed_4byte_relax,                  // like reloc_signed_4byte, but
27*0b57cec5SDimitry Andric                                              // in a relaxable instruction.
28*0b57cec5SDimitry Andric   reloc_global_offset_table,                 // 32-bit, relative to the start
29*0b57cec5SDimitry Andric                                              // of the instruction. Used only
30*0b57cec5SDimitry Andric                                              // for _GLOBAL_OFFSET_TABLE_.
31*0b57cec5SDimitry Andric   reloc_global_offset_table8,                // 64-bit variant.
32*0b57cec5SDimitry Andric   reloc_branch_4byte_pcrel,                  // 32-bit PC relative branch.
33*0b57cec5SDimitry Andric   // Marker
34*0b57cec5SDimitry Andric   LastTargetFixupKind,
35*0b57cec5SDimitry Andric   NumTargetFixupKinds = LastTargetFixupKind - FirstTargetFixupKind
36*0b57cec5SDimitry Andric };
37*0b57cec5SDimitry Andric }
38*0b57cec5SDimitry Andric }
39*0b57cec5SDimitry Andric 
40*0b57cec5SDimitry Andric #endif
41