Home | History | Annotate | Download | only in MC
      1 //===-- llvm/MC/MCFixupKindInfo.h - Fixup Descriptors -----------*- C++ -*-===//
      2 //
      3 //                     The LLVM Compiler Infrastructure
      4 //
      5 // This file is distributed under the University of Illinois Open Source
      6 // License. See LICENSE.TXT for details.
      7 //
      8 //===----------------------------------------------------------------------===//
      9 
     10 #ifndef LLVM_MC_MCFIXUPKINDINFO_H
     11 #define LLVM_MC_MCFIXUPKINDINFO_H
     12 
     13 namespace llvm {
     14 
     15 /// MCFixupKindInfo - Target independent information on a fixup kind.
     16 struct MCFixupKindInfo {
     17   enum FixupKindFlags {
     18     /// Is this fixup kind PCrelative? This is used by the assembler backend to
     19     /// evaluate fixup values in a target independent manner when possible.
     20     FKF_IsPCRel = (1 << 0),
     21 
     22     /// Should this fixup kind force a 4-byte aligned effective PC value?
     23     FKF_IsAlignedDownTo32Bits = (1 << 1)
     24   };
     25 
     26   /// A target specific name for the fixup kind. The names will be unique for
     27   /// distinct kinds on any given target.
     28   const char *Name;
     29 
     30   /// The bit offset to write the relocation into.
     31   unsigned TargetOffset;
     32 
     33   /// The number of bits written by this fixup. The bits are assumed to be
     34   /// contiguous.
     35   unsigned TargetSize;
     36 
     37   /// Flags describing additional information on this fixup kind.
     38   unsigned Flags;
     39 };
     40 
     41 } // End llvm namespace
     42 
     43 #endif
     44