LLVM 22.0.0git
systemz.cpp
Go to the documentation of this file.
1//===---- systemz.cpp - Generic JITLink systemz edge kinds, utilities -----===//
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// Generic utilities for graphs representing systemz objects.
10//
11//===----------------------------------------------------------------------===//
12
14
15#define DEBUG_TYPE "jitlink"
16
17namespace llvm {
18namespace jitlink {
19namespace systemz {
20
21const char NullPointerContent[8] = {0x00, 0x00, 0x00, 0x00,
22 0x00, 0x00, 0x00, 0x00};
23
24const char Pointer64JumpStubContent[8] = {
25 static_cast<char>(0xC4u),
26 0x18,
27 0x00,
28 0x00,
29 0x00,
30 0x00, // lgrl r1
31 static_cast<char>(0x07u),
32 static_cast<char>(0xF1u), // BCR 15, 1
33};
34
35const char *getEdgeKindName(Edge::Kind R) {
36 switch (R) {
37 case Pointer64:
38 return "Pointer64";
39 case Pointer32:
40 return "Pointer32";
41 case Pointer20:
42 return "Pointer20";
43 case Pointer16:
44 return "Pointer16";
45 case Pointer12:
46 return "Pointer12";
47 case Pointer8:
48 return "Pointer8";
49 case Delta64:
50 return "Delta64";
51 case Delta32:
52 return "Delta32";
53 case Delta16:
54 return "Delta16";
55 case Delta32dbl:
56 return "Delta32dbl";
57 case Delta24dbl:
58 return "Delta24dbl";
59 case Delta16dbl:
60 return "Delta16dbl";
61 case Delta12dbl:
62 return "Delta12dbl";
63 case NegDelta64:
64 return "NegDelta64";
65 case NegDelta32:
66 return "NegDelta32";
67 case DeltaPLT32dbl:
68 return "DeltaPLT32dbl";
69 case DeltaPLT24dbl:
70 return "DeltaPLT24dbl";
71 case DeltaPLT16dbl:
72 return "DeltaPLT16dbl";
73 case DeltaPLT12dbl:
74 return "DeltaPLT12dbl";
75 case DeltaPLT64:
76 return "DeltaPLT64";
77 case DeltaPLT32:
78 return "DeltaPLT32";
79 case Delta64FromGOT:
80 return "Delta64FromGOT";
81 case Delta32FromGOT:
82 return "Delta32FromGOT";
83 case Delta16FromGOT:
84 return "Delta16FromGOT";
86 return "Delta64PLTFromGOT";
88 return "Delta32PLTFromGOT";
90 return "Delta16PLTFromGOT";
91 case Delta32GOTBase:
92 return "Delta32GOTBase";
94 return "Delta32dblGOTBase";
96 return "RequestGOTAndTransformToDelta64FromGOT";
98 return "RequestGOTAndTransformToDelta32FromGOT";
100 return "RequestGOTAndTransformToDelta20FromGOT";
102 return "RequestGOTAndTransformToDelta16FromGOT";
104 return "RequestGOTAndTransformToDelta12FromGOT";
106 return "RequestGOTAndTransformToDelta32dbl";
107 default:
108 return getGenericEdgeKindName(static_cast<Edge::Kind>(R));
109 }
110}
111
112} // namespace systemz
113} // namespace jitlink
114} // namespace llvm
This is an optimization pass for GlobalISel generic memory operations.