LLVM 20.0.0git
aarch64.cpp
Go to the documentation of this file.
1//===---- aarch64.cpp - Generic JITLink aarch64 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 aarch64 objects.
10//
11//===----------------------------------------------------------------------===//
12
14
15#define DEBUG_TYPE "jitlink"
16
17namespace llvm {
18namespace jitlink {
19namespace aarch64 {
20
21const char NullPointerContent[8] = {0x00, 0x00, 0x00, 0x00,
22 0x00, 0x00, 0x00, 0x00};
23
24const char PointerJumpStubContent[12] = {
25 0x10, 0x00, 0x00, (char)0x90u, // ADRP x16, <imm>@page21
26 0x10, 0x02, 0x40, (char)0xf9u, // LDR x16, [x16, <imm>@pageoff12]
27 0x00, 0x02, 0x1f, (char)0xd6u // BR x16
28};
29
31 switch (R) {
32 case Pointer64:
33 return "Pointer64";
34 case Pointer32:
35 return "Pointer32";
36 case Delta64:
37 return "Delta64";
38 case Delta32:
39 return "Delta32";
40 case NegDelta64:
41 return "NegDelta64";
42 case NegDelta32:
43 return "NegDelta32";
44 case Branch26PCRel:
45 return "Branch26PCRel";
46 case MoveWide16:
47 return "MoveWide16";
48 case LDRLiteral19:
49 return "LDRLiteral19";
51 return "TestAndBranch14PCRel";
53 return "CondBranch19PCRel";
54 case ADRLiteral21:
55 return "ADRLiteral21";
56 case Page21:
57 return "Page21";
58 case PageOffset12:
59 return "PageOffset12";
60 case GotPageOffset15:
61 return "GotPageOffset15";
63 return "RequestGOTAndTransformToPage21";
65 return "RequestGOTAndTransformToPageOffset12";
67 return "RequestGOTAndTransformToPageOffset15";
69 return "RequestGOTAndTransformToDelta32";
71 return "RequestTLVPAndTransformToPage21";
73 return "RequestTLVPAndTransformToPageOffset12";
75 return "RequestTLSDescEntryAndTransformToPage21";
77 return "RequestTLSDescEntryAndTransformToPageOffset12";
78 default:
79 return getGenericEdgeKindName(static_cast<Edge::Kind>(R));
80 }
81}
82
83} // namespace aarch64
84} // namespace jitlink
85} // namespace llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18