LLVM
20.0.0git
lib
Target
LoongArch
MCTargetDesc
LoongArchBaseInfo.h
Go to the documentation of this file.
1
//=- LoongArchBaseInfo.h - Top level definitions for LoongArch MC -*- 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
// This file contains small standalone enum definitions and helper function
10
// definitions for the LoongArch target useful for the compiler back-end and the
11
// MC libraries.
12
//
13
//===----------------------------------------------------------------------===//
14
#ifndef LLVM_LIB_TARGET_LOONGARCH_MCTARGETDESC_LOONGARCHBASEINFO_H
15
#define LLVM_LIB_TARGET_LOONGARCH_MCTARGETDESC_LOONGARCHBASEINFO_H
16
17
#include "
MCTargetDesc/LoongArchMCTargetDesc.h
"
18
#include "
llvm/ADT/StringRef.h
"
19
#include "
llvm/ADT/StringSwitch.h
"
20
#include "
llvm/MC/MCInstrDesc.h
"
21
#include "
llvm/TargetParser/SubtargetFeature.h
"
22
23
namespace
llvm
{
24
25
// This namespace holds all of the target specific flags that instruction info
26
// tracks.
27
namespace
LoongArchII {
28
enum
{
29
MO_None
,
30
MO_CALL
,
31
MO_CALL_PLT
,
32
MO_PCREL_HI
,
33
MO_PCREL_LO
,
34
MO_PCREL64_LO
,
35
MO_PCREL64_HI
,
36
MO_GOT_PC_HI
,
37
MO_GOT_PC_LO
,
38
MO_GOT_PC64_LO
,
39
MO_GOT_PC64_HI
,
40
MO_LE_HI
,
41
MO_LE_LO
,
42
MO_LE64_LO
,
43
MO_LE64_HI
,
44
MO_IE_PC_HI
,
45
MO_IE_PC_LO
,
46
MO_IE_PC64_LO
,
47
MO_IE_PC64_HI
,
48
MO_LD_PC_HI
,
49
MO_GD_PC_HI
,
50
MO_CALL36
,
51
MO_DESC_PC_HI
,
52
MO_DESC_PC_LO
,
53
MO_DESC64_PC_HI
,
54
MO_DESC64_PC_LO
,
55
MO_DESC_LD
,
56
MO_DESC_CALL
,
57
// TODO: Add more flags.
58
};
59
}
// end namespace LoongArchII
60
61
namespace
LoongArchABI {
62
enum
ABI
{
63
ABI_ILP32S
,
64
ABI_ILP32F
,
65
ABI_ILP32D
,
66
ABI_LP64S
,
67
ABI_LP64F
,
68
ABI_LP64D
,
69
ABI_Unknown
70
};
71
72
ABI
computeTargetABI
(
const
Triple
&TT,
const
FeatureBitset
&FeatureBits,
73
StringRef
ABIName);
74
ABI
getTargetABI
(
StringRef
ABIName);
75
76
// Returns the register used to hold the stack pointer after realignment.
77
MCRegister
getBPReg
();
78
}
// end namespace LoongArchABI
79
80
}
// end namespace llvm
81
82
#endif
// LLVM_LIB_TARGET_LOONGARCH_MCTARGETDESC_LOONGARCHBASEINFO_H
LoongArchMCTargetDesc.h
MCInstrDesc.h
StringRef.h
StringSwitch.h
This file implements the StringSwitch template, which mimics a switch() statement whose cases are str...
SubtargetFeature.h
llvm::FeatureBitset
Container class for subtarget features.
Definition:
SubtargetFeature.h:41
llvm::MCRegister
Wrapper class representing physical registers. Should be passed by value.
Definition:
MCRegister.h:33
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition:
StringRef.h:50
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition:
Triple.h:44
llvm::LoongArchABI::ABI
ABI
Definition:
LoongArchBaseInfo.h:62
llvm::LoongArchABI::ABI_LP64F
@ ABI_LP64F
Definition:
LoongArchBaseInfo.h:67
llvm::LoongArchABI::ABI_LP64S
@ ABI_LP64S
Definition:
LoongArchBaseInfo.h:66
llvm::LoongArchABI::ABI_ILP32S
@ ABI_ILP32S
Definition:
LoongArchBaseInfo.h:63
llvm::LoongArchABI::ABI_ILP32F
@ ABI_ILP32F
Definition:
LoongArchBaseInfo.h:64
llvm::LoongArchABI::ABI_ILP32D
@ ABI_ILP32D
Definition:
LoongArchBaseInfo.h:65
llvm::LoongArchABI::ABI_Unknown
@ ABI_Unknown
Definition:
LoongArchBaseInfo.h:69
llvm::LoongArchABI::ABI_LP64D
@ ABI_LP64D
Definition:
LoongArchBaseInfo.h:68
llvm::LoongArchABI::getBPReg
MCRegister getBPReg()
Definition:
LoongArchBaseInfo.cpp:191
llvm::LoongArchABI::computeTargetABI
ABI computeTargetABI(const Triple &TT, const FeatureBitset &FeatureBits, StringRef ABIName)
Definition:
LoongArchBaseInfo.cpp:72
llvm::LoongArchABI::getTargetABI
ABI getTargetABI(StringRef ABIName)
Definition:
LoongArchBaseInfo.cpp:176
llvm::LoongArchII::MO_PCREL_LO
@ MO_PCREL_LO
Definition:
LoongArchBaseInfo.h:33
llvm::LoongArchII::MO_GOT_PC_LO
@ MO_GOT_PC_LO
Definition:
LoongArchBaseInfo.h:37
llvm::LoongArchII::MO_LD_PC_HI
@ MO_LD_PC_HI
Definition:
LoongArchBaseInfo.h:48
llvm::LoongArchII::MO_CALL36
@ MO_CALL36
Definition:
LoongArchBaseInfo.h:50
llvm::LoongArchII::MO_DESC_CALL
@ MO_DESC_CALL
Definition:
LoongArchBaseInfo.h:56
llvm::LoongArchII::MO_LE64_LO
@ MO_LE64_LO
Definition:
LoongArchBaseInfo.h:42
llvm::LoongArchII::MO_DESC_PC_HI
@ MO_DESC_PC_HI
Definition:
LoongArchBaseInfo.h:51
llvm::LoongArchII::MO_CALL
@ MO_CALL
Definition:
LoongArchBaseInfo.h:30
llvm::LoongArchII::MO_GD_PC_HI
@ MO_GD_PC_HI
Definition:
LoongArchBaseInfo.h:49
llvm::LoongArchII::MO_IE_PC_LO
@ MO_IE_PC_LO
Definition:
LoongArchBaseInfo.h:45
llvm::LoongArchII::MO_GOT_PC_HI
@ MO_GOT_PC_HI
Definition:
LoongArchBaseInfo.h:36
llvm::LoongArchII::MO_GOT_PC64_LO
@ MO_GOT_PC64_LO
Definition:
LoongArchBaseInfo.h:38
llvm::LoongArchII::MO_LE_LO
@ MO_LE_LO
Definition:
LoongArchBaseInfo.h:41
llvm::LoongArchII::MO_PCREL_HI
@ MO_PCREL_HI
Definition:
LoongArchBaseInfo.h:32
llvm::LoongArchII::MO_IE_PC64_HI
@ MO_IE_PC64_HI
Definition:
LoongArchBaseInfo.h:47
llvm::LoongArchII::MO_IE_PC_HI
@ MO_IE_PC_HI
Definition:
LoongArchBaseInfo.h:44
llvm::LoongArchII::MO_DESC64_PC_HI
@ MO_DESC64_PC_HI
Definition:
LoongArchBaseInfo.h:53
llvm::LoongArchII::MO_None
@ MO_None
Definition:
LoongArchBaseInfo.h:29
llvm::LoongArchII::MO_GOT_PC64_HI
@ MO_GOT_PC64_HI
Definition:
LoongArchBaseInfo.h:39
llvm::LoongArchII::MO_DESC64_PC_LO
@ MO_DESC64_PC_LO
Definition:
LoongArchBaseInfo.h:54
llvm::LoongArchII::MO_LE_HI
@ MO_LE_HI
Definition:
LoongArchBaseInfo.h:40
llvm::LoongArchII::MO_PCREL64_HI
@ MO_PCREL64_HI
Definition:
LoongArchBaseInfo.h:35
llvm::LoongArchII::MO_DESC_PC_LO
@ MO_DESC_PC_LO
Definition:
LoongArchBaseInfo.h:52
llvm::LoongArchII::MO_LE64_HI
@ MO_LE64_HI
Definition:
LoongArchBaseInfo.h:43
llvm::LoongArchII::MO_CALL_PLT
@ MO_CALL_PLT
Definition:
LoongArchBaseInfo.h:31
llvm::LoongArchII::MO_PCREL64_LO
@ MO_PCREL64_LO
Definition:
LoongArchBaseInfo.h:34
llvm::LoongArchII::MO_IE_PC64_LO
@ MO_IE_PC64_LO
Definition:
LoongArchBaseInfo.h:46
llvm::LoongArchII::MO_DESC_LD
@ MO_DESC_LD
Definition:
LoongArchBaseInfo.h:55
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:18
Generated on Mon Nov 11 2024 19:53:40 for LLVM by
1.9.6