1218885Sdim//===-- llvm/MC/MCFixupKindInfo.h - Fixup Descriptors -----------*- C++ -*-===//
2218885Sdim//
3218885Sdim//                     The LLVM Compiler Infrastructure
4218885Sdim//
5218885Sdim// This file is distributed under the University of Illinois Open Source
6218885Sdim// License. See LICENSE.TXT for details.
7218885Sdim//
8218885Sdim//===----------------------------------------------------------------------===//
9218885Sdim
10218885Sdim#ifndef LLVM_MC_MCFIXUPKINDINFO_H
11218885Sdim#define LLVM_MC_MCFIXUPKINDINFO_H
12218885Sdim
13218885Sdimnamespace llvm {
14218885Sdim
15218885Sdim/// MCFixupKindInfo - Target independent information on a fixup kind.
16218885Sdimstruct MCFixupKindInfo {
17218885Sdim  enum FixupKindFlags {
18218885Sdim    /// Is this fixup kind PCrelative? This is used by the assembler backend to
19218885Sdim    /// evaluate fixup values in a target independent manner when possible.
20218885Sdim    FKF_IsPCRel = (1 << 0),
21245431Sdim
22218885Sdim    /// Should this fixup kind force a 4-byte aligned effective PC value?
23218885Sdim    FKF_IsAlignedDownTo32Bits = (1 << 1)
24218885Sdim  };
25218885Sdim
26218885Sdim  /// A target specific name for the fixup kind. The names will be unique for
27218885Sdim  /// distinct kinds on any given target.
28218885Sdim  const char *Name;
29218885Sdim
30218885Sdim  /// The bit offset to write the relocation into.
31218885Sdim  unsigned TargetOffset;
32218885Sdim
33218885Sdim  /// The number of bits written by this fixup. The bits are assumed to be
34218885Sdim  /// contiguous.
35218885Sdim  unsigned TargetSize;
36218885Sdim
37218885Sdim  /// Flags describing additional information on this fixup kind.
38218885Sdim  unsigned Flags;
39218885Sdim};
40218885Sdim
41218885Sdim} // End llvm namespace
42218885Sdim
43218885Sdim#endif
44