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