1//===-- SystemZMCFixups.h - SystemZ-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-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_LIB_TARGET_SYSTEMZ_MCTARGETDESC_SYSTEMZMCFIXUPS_H
10#define LLVM_LIB_TARGET_SYSTEMZ_MCTARGETDESC_SYSTEMZMCFIXUPS_H
11
12#include "llvm/MC/MCFixup.h"
13#include "llvm/MC/MCFixupKindInfo.h"
14
15namespace llvm {
16namespace SystemZ {
17enum FixupKind {
18 // These correspond directly to R_390_* relocations.
19 FK_390_PC12DBL = FirstTargetFixupKind,
20 FK_390_PC16DBL,
21 FK_390_PC24DBL,
22 FK_390_PC32DBL,
23 FK_390_TLS_CALL,
24
25 FK_390_S8Imm,
26 FK_390_S16Imm,
27 FK_390_S20Imm,
28 FK_390_S32Imm,
29 FK_390_U1Imm,
30 FK_390_U2Imm,
31 FK_390_U3Imm,
32 FK_390_U4Imm,
33 FK_390_U8Imm,
34 FK_390_U12Imm,
35 FK_390_U16Imm,
36 FK_390_U32Imm,
37 FK_390_U48Imm,
38
39 // Marker
40 LastTargetFixupKind,
41 NumTargetFixupKinds = LastTargetFixupKind - FirstTargetFixupKind
42};
43
44const static MCFixupKindInfo MCFixupKindInfos[SystemZ::NumTargetFixupKinds] = {
45 {.Name: "FK_390_PC12DBL", .TargetOffset: 4, .TargetSize: 12, .Flags: MCFixupKindInfo::FKF_IsPCRel},
46 {.Name: "FK_390_PC16DBL", .TargetOffset: 0, .TargetSize: 16, .Flags: MCFixupKindInfo::FKF_IsPCRel},
47 {.Name: "FK_390_PC24DBL", .TargetOffset: 0, .TargetSize: 24, .Flags: MCFixupKindInfo::FKF_IsPCRel},
48 {.Name: "FK_390_PC32DBL", .TargetOffset: 0, .TargetSize: 32, .Flags: MCFixupKindInfo::FKF_IsPCRel},
49 {.Name: "FK_390_TLS_CALL", .TargetOffset: 0, .TargetSize: 0, .Flags: 0},
50 {.Name: "FK_390_S8Imm", .TargetOffset: 0, .TargetSize: 8, .Flags: 0},
51 {.Name: "FK_390_S16Imm", .TargetOffset: 0, .TargetSize: 16, .Flags: 0},
52 {.Name: "FK_390_S20Imm", .TargetOffset: 4, .TargetSize: 20, .Flags: 0},
53 {.Name: "FK_390_S32Imm", .TargetOffset: 0, .TargetSize: 32, .Flags: 0},
54 {.Name: "FK_390_U1Imm", .TargetOffset: 0, .TargetSize: 1, .Flags: 0},
55 {.Name: "FK_390_U2Imm", .TargetOffset: 0, .TargetSize: 2, .Flags: 0},
56 {.Name: "FK_390_U3Imm", .TargetOffset: 0, .TargetSize: 3, .Flags: 0},
57 {.Name: "FK_390_U4Imm", .TargetOffset: 0, .TargetSize: 4, .Flags: 0},
58 {.Name: "FK_390_U8Imm", .TargetOffset: 0, .TargetSize: 8, .Flags: 0},
59 {.Name: "FK_390_U12Imm", .TargetOffset: 4, .TargetSize: 12, .Flags: 0},
60 {.Name: "FK_390_U16Imm", .TargetOffset: 0, .TargetSize: 16, .Flags: 0},
61 {.Name: "FK_390_U32Imm", .TargetOffset: 0, .TargetSize: 32, .Flags: 0},
62 {.Name: "FK_390_U48Imm", .TargetOffset: 0, .TargetSize: 48, .Flags: 0},
63};
64} // end namespace SystemZ
65} // end namespace llvm
66
67#endif
68

source code of llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCFixups.h