1 //===------ riscv.cpp - Generic JITLink riscv edge kinds, utilities -------===//
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 //===----------------------------------------------------------------------===//
9 // Generic utilities for graphs representing riscv objects.
11 //===----------------------------------------------------------------------===//
13 #include "llvm/ExecutionEngine/JITLink/riscv.h"
15 #define DEBUG_TYPE "jitlink"
21 const char *getEdgeKindName(Edge::Kind K
) {
28 return "R_RISCV_HI20";
30 return "R_RISCV_LO12_I";
31 case R_RISCV_PCREL_HI20
:
32 return "R_RISCV_PCREL_HI20";
33 case R_RISCV_PCREL_LO12_I
:
34 return "R_RISCV_PCREL_LO12_I";
35 case R_RISCV_PCREL_LO12_S
:
36 return "R_RISCV_PCREL_LO12_S";
38 return "R_RISCV_CALL";
40 return getGenericEdgeKindName(K
);
43 } // namespace jitlink