blob: ef58a6b8cbca5f98471186ecba7ea04f926fd781 [file] [log] [blame]
Alex Bradbury6b2cca72016-11-01 23:47:30 +00001//===-- RISCVMCTargetDesc.h - RISCV Target Descriptions ---------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file provides RISCV specific target descriptions.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_LIB_TARGET_RISCV_MCTARGETDESC_RISCVMCTARGETDESC_H
15#define LLVM_LIB_TARGET_RISCV_MCTARGETDESC_RISCVMCTARGETDESC_H
16
Chandler Carruth6bda14b2017-06-06 11:49:48 +000017#include "llvm/Config/config.h"
Alex Bradbury6b2cca72016-11-01 23:47:30 +000018#include "llvm/MC/MCTargetOptions.h"
19#include "llvm/Support/DataTypes.h"
Alex Bradbury5c1eef42017-10-11 12:09:06 +000020#include <memory>
Alex Bradbury6b2cca72016-11-01 23:47:30 +000021
22namespace llvm {
23class MCAsmBackend;
24class MCCodeEmitter;
25class MCContext;
26class MCInstrInfo;
27class MCObjectWriter;
28class MCRegisterInfo;
29class MCSubtargetInfo;
30class StringRef;
31class Target;
32class Triple;
33class raw_ostream;
34class raw_pwrite_stream;
35
36Target &getTheRISCV32Target();
37Target &getTheRISCV64Target();
38
39MCCodeEmitter *createRISCVMCCodeEmitter(const MCInstrInfo &MCII,
40 const MCRegisterInfo &MRI,
41 MCContext &Ctx);
42
Alex Bradburyb22f7512018-01-03 08:53:05 +000043MCAsmBackend *createRISCVAsmBackend(const Target &T, const MCSubtargetInfo &STI,
44 const MCRegisterInfo &MRI,
Alex Bradbury6b2cca72016-11-01 23:47:30 +000045 const MCTargetOptions &Options);
46
Alex Bradbury5c1eef42017-10-11 12:09:06 +000047std::unique_ptr<MCObjectWriter>
48createRISCVELFObjectWriter(raw_pwrite_stream &OS, uint8_t OSABI, bool Is64Bit);
Alex Bradbury6b2cca72016-11-01 23:47:30 +000049}
50
51// Defines symbolic names for RISC-V registers.
52#define GET_REGINFO_ENUM
53#include "RISCVGenRegisterInfo.inc"
54
55// Defines symbolic names for RISC-V instructions.
56#define GET_INSTRINFO_ENUM
57#include "RISCVGenInstrInfo.inc"
58
Alex Bradbury8ab4a962017-09-17 14:36:28 +000059#define GET_SUBTARGETINFO_ENUM
60#include "RISCVGenSubtargetInfo.inc"
61
Alex Bradbury6b2cca72016-11-01 23:47:30 +000062#endif