11512Smcimadamore//===-- llvm/MC/MCFixupKindInfo.h - Fixup Descriptors -----------*- C++ -*-===//
22253Sksrini//
31512Smcimadamore//                     The LLVM Compiler Infrastructure
41512Smcimadamore//
51512Smcimadamore// This file is distributed under the University of Illinois Open Source
61512Smcimadamore// License. See LICENSE.TXT for details.
71512Smcimadamore//
81512Smcimadamore//===----------------------------------------------------------------------===//
91512Smcimadamore
101512Smcimadamore#ifndef LLVM_MC_MCFIXUPKINDINFO_H
111512Smcimadamore#define LLVM_MC_MCFIXUPKINDINFO_H
121512Smcimadamore
131512Smcimadamorenamespace llvm {
141512Smcimadamore
151512Smcimadamore/// MCFixupKindInfo - Target independent information on a fixup kind.
161512Smcimadamorestruct MCFixupKindInfo {
171512Smcimadamore  enum FixupKindFlags {
181512Smcimadamore    /// Is this fixup kind PCrelative? This is used by the assembler backend to
191512Smcimadamore    /// evaluate fixup values in a target independent manner when possible.
201512Smcimadamore    FKF_IsPCRel = (1 << 0),
211512Smcimadamore
221512Smcimadamore    /// Should this fixup kind force a 4-byte aligned effective PC value?
231512Smcimadamore    FKF_IsAlignedDownTo32Bits = (1 << 1)
241512Smcimadamore  };
251512Smcimadamore
261512Smcimadamore  /// A target specific name for the fixup kind. The names will be unique for
271512Smcimadamore  /// distinct kinds on any given target.
281512Smcimadamore  const char *Name;
291512Smcimadamore
301512Smcimadamore  /// The bit offset to write the relocation into.
311512Smcimadamore  unsigned TargetOffset;
321512Smcimadamore
331512Smcimadamore  /// The number of bits written by this fixup. The bits are assumed to be
341512Smcimadamore  /// contiguous.
351512Smcimadamore  unsigned TargetSize;
361512Smcimadamore
371512Smcimadamore  /// Flags describing additional information on this fixup kind.
381512Smcimadamore  unsigned Flags;
39};
40
41} // End llvm namespace
42
43#endif
44