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/Support/DataTypes.h" 18 19 #include <memory> 20 21 namespace llvm { 22 class MCAsmBackend; 23 class MCCodeEmitter; 24 class MCContext; 25 class MCInstrInfo; 26 class MCObjectTargetWriter; 27 class MCRegisterInfo; 28 class MCSubtargetInfo; 29 class MCTargetOptions; 30 class Target; 31 32 MCCodeEmitter *createSparcMCCodeEmitter(const MCInstrInfo &MCII, 33 MCContext &Ctx); 34 MCAsmBackend *createSparcAsmBackend(const Target &T, const MCSubtargetInfo &STI, 35 const MCRegisterInfo &MRI, 36 const MCTargetOptions &Options); 37 std::unique_ptr<MCObjectTargetWriter> createSparcELFObjectWriter(bool Is64Bit, 38 uint8_t OSABI); 39 40 // Defines symbolic names for Sparc v9 ASI tag names. 41 namespace SparcASITag { 42 struct ASITag { 43 const char *Name; 44 const char *AltName; 45 unsigned Encoding; 46 }; 47 48 #define GET_ASITagsList_DECL 49 #include "SparcGenSearchableTables.inc" 50 } // end namespace SparcASITag 51 } // End llvm namespace 52 53 // Defines symbolic names for Sparc registers. This defines a mapping from 54 // register name to register number. 55 // 56 #define GET_REGINFO_ENUM 57 #include "SparcGenRegisterInfo.inc" 58 59 // Defines symbolic names for the Sparc instructions. 60 // 61 #define GET_INSTRINFO_ENUM 62 #define GET_INSTRINFO_MC_HELPER_DECLS 63 #include "SparcGenInstrInfo.inc" 64 65 #define GET_SUBTARGETINFO_ENUM 66 #include "SparcGenSubtargetInfo.inc" 67 68 #endif 69