47 lines · c
1//===- LoongArchFixupKinds.h - LoongArch Specific Fixup Entries -*- 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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLVM_LIB_TARGET_LOONGARCH_MCTARGETDESC_LOONGARCHFIXUPKINDS_H10#define LLVM_LIB_TARGET_LOONGARCH_MCTARGETDESC_LOONGARCHFIXUPKINDS_H11 12#include "llvm/MC/MCFixup.h"13 14namespace llvm {15namespace LoongArch {16//17// This table *must* be in the same order of18// MCFixupKindInfo Infos[LoongArch::NumTargetFixupKinds] in19// LoongArchAsmBackend.cpp.20//21enum Fixups {22 // Define fixups can be handled by LoongArchAsmBackend::applyFixup.23 // 16-bit fixup corresponding to %b16(foo) for instructions like bne.24 fixup_loongarch_b16 = FirstTargetFixupKind,25 // 21-bit fixup corresponding to %b21(foo) for instructions like bnez.26 fixup_loongarch_b21,27 // 26-bit fixup corresponding to %b26(foo)/%plt(foo) for instructions b/bl.28 fixup_loongarch_b26,29 // 20-bit fixup corresponding to %abs_hi20(foo) for instruction lu12i.w.30 fixup_loongarch_abs_hi20,31 // 12-bit fixup corresponding to %abs_lo12(foo) for instruction ori.32 fixup_loongarch_abs_lo12,33 // 20-bit fixup corresponding to %abs64_lo20(foo) for instruction lu32i.d.34 fixup_loongarch_abs64_lo20,35 // 12-bit fixup corresponding to %abs_hi12(foo) for instruction lu52i.d.36 fixup_loongarch_abs64_hi12,37 38 // Used as a sentinel, must be the last of the fixup which can be handled by39 // LoongArchAsmBackend::applyFixup.40 fixup_loongarch_invalid,41 NumTargetFixupKinds = fixup_loongarch_invalid - FirstTargetFixupKind,42};43} // end namespace LoongArch44} // end namespace llvm45 46#endif47