1 //===-- M68kFixupKinds.h - M68k Specific Fixup Entries ------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
10 /// This file contains M68k specific fixup entries.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_M68k_MCTARGETDESC_M68kFIXUPKINDS_H
15 #define LLVM_LIB_TARGET_M68k_MCTARGETDESC_M68kFIXUPKINDS_H
17 #include "llvm/MC/MCFixup.h"
20 static inline unsigned getFixupKindLog2Size(unsigned Kind
) {
35 llvm_unreachable("invalid fixup kind!");
38 static inline MCFixupKind
getFixupForSize(unsigned Size
, bool isPCRel
) {
41 return isPCRel
? FK_PCRel_1
: FK_Data_1
;
43 return isPCRel
? FK_PCRel_2
: FK_Data_2
;
45 return isPCRel
? FK_PCRel_4
: FK_Data_4
;
47 return isPCRel
? FK_PCRel_8
: FK_Data_8
;
49 llvm_unreachable("Invalid generic fixup size!");