Thanks to visit codestin.com
Credit goes to llvm.org

LLVM 22.0.0git
loongarch.cpp
Go to the documentation of this file.
1//===--- loongarch.cpp - Generic JITLink loongarch 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 loongarch objects.
10//
11//===----------------------------------------------------------------------===//
12
14
15#define DEBUG_TYPE "jitlink"
16
17namespace llvm {
18namespace jitlink {
19namespace loongarch {
20
21const char NullPointerContent[8] = {0x00, 0x00, 0x00, 0x00,
22 0x00, 0x00, 0x00, 0x00};
23
25 0x14, 0x00, 0x00, 0x1a, // pcalau12i $t8, %page20(imm)
26 0x94, 0x02, 0xc0, 0x28, // ld.d $t8, $t8, %pageoff12(imm)
27 0x80, 0x02, 0x00, 0x4c // jr $t8
28};
29
31 0x14, 0x00, 0x00, 0x1a, // pcalau12i $t8, %page20(imm)
32 0x94, 0x02, 0x80, 0x28, // ld.w $t8, $t8, %pageoff12(imm)
33 0x80, 0x02, 0x00, 0x4c // jr $t8
34};
35
73
74} // namespace loongarch
75} // namespace jitlink
76} // namespace llvm
#define KIND_NAME_CASE(K)
This is an optimization pass for GlobalISel generic memory operations.