1//===-- SparcMCTargetDesc.h - Sparc Target Descriptions ---------*- 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 provides Sparc specific target descriptions.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_LIB_TARGET_SPARC_MCTARGETDESC_SPARCMCTARGETDESC_H
14#define LLVM_LIB_TARGET_SPARC_MCTARGETDESC_SPARCMCTARGETDESC_H
15
16#include "llvm/ADT/StringRef.h"
17#include "llvm/ADT/StringTable.h"
18#include "llvm/Support/DataTypes.h"
19
20#include <memory>
21
22namespace llvm {
23class MCAsmBackend;
24class MCCodeEmitter;
25class MCContext;
26class MCInstrInfo;
27class MCObjectTargetWriter;
28class MCRegisterInfo;
29class MCSubtargetInfo;
30class MCTargetOptions;
31class Target;
32class Triple;
33
34MCCodeEmitter *createSparcMCCodeEmitter(const MCInstrInfo &MCII,
35 MCContext &Ctx);
36MCAsmBackend *createSparcAsmBackend(const Target &T, const MCSubtargetInfo &STI,
37 const MCRegisterInfo &MRI,
38 const MCTargetOptions &Options);
39std::unique_ptr<MCObjectTargetWriter>
40createSparcELFObjectWriter(bool Is64Bit, bool IsV8Plus, uint8_t OSABI);
41
42// Defines symbolic names for Sparc v9 ASI tag names.
43namespace SparcASITag {
44struct ASITag {
45 StringTable::Offset Name;
46 StringTable::Offset AltName;
47 unsigned Encoding;
48};
49
50#define GET_ASITagsList_DECL
51#include "SparcGenSearchableTables.inc"
52} // end namespace SparcASITag
53
54// Defines symbolic names for Sparc v9 prefetch tag names.
55namespace SparcPrefetchTag {
56struct PrefetchTag {
57 StringTable::Offset Name;
58 unsigned Encoding;
59};
60
61#define GET_PrefetchTagsList_DECL
62#include "SparcGenSearchableTables.inc"
63} // end namespace SparcPrefetchTag
64} // End llvm namespace
65
66// Defines symbolic names for Sparc registers. This defines a mapping from
67// register name to register number.
68//
69#define GET_REGINFO_ENUM
70#include "SparcGenRegisterInfo.inc"
71
72// Defines symbolic names for the Sparc instructions.
73//
74#define GET_INSTRINFO_ENUM
75#define GET_INSTRINFO_MC_HELPER_DECLS
76#include "SparcGenInstrInfo.inc"
77
78#define GET_SUBTARGETINFO_ENUM
79#include "SparcGenSubtargetInfo.inc"
80
81#endif
82