Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:13

0001 //===-- llvm/MC/MCFixupKindInfo.h - Fixup Descriptors -----------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLVM_MC_MCFIXUPKINDINFO_H
0010 #define LLVM_MC_MCFIXUPKINDINFO_H
0011 
0012 namespace llvm {
0013 
0014 /// Target independent information on a fixup kind.
0015 struct MCFixupKindInfo {
0016   enum FixupKindFlags {
0017     /// Is this fixup kind PCrelative? This is used by the assembler backend to
0018     /// evaluate fixup values in a target independent manner when possible.
0019     FKF_IsPCRel = (1 << 0),
0020 
0021     /// Should this fixup kind force a 4-byte aligned effective PC value?
0022     FKF_IsAlignedDownTo32Bits = (1 << 1),
0023 
0024     /// Should this fixup be evaluated in a target dependent manner?
0025     FKF_IsTarget = (1 << 2),
0026 
0027     /// This fixup kind should be resolved if defined.
0028     /// FIXME This is a workaround because we don't support certain ARM
0029     /// relocation types. This flag should eventually be removed.
0030     FKF_Constant = 1 << 3,
0031   };
0032 
0033   /// A target specific name for the fixup kind. The names will be unique for
0034   /// distinct kinds on any given target.
0035   const char *Name;
0036 
0037   /// The bit offset to write the relocation into.
0038   unsigned TargetOffset;
0039 
0040   /// The number of bits written by this fixup. The bits are assumed to be
0041   /// contiguous.
0042   unsigned TargetSize;
0043 
0044   /// Flags describing additional information on this fixup kind.
0045   unsigned Flags;
0046 };
0047 
0048 } // End llvm namespace
0049 
0050 #endif