xref: /freebsd/contrib/llvm-project/llvm/lib/Target/Xtensa/MCTargetDesc/XtensaMCTargetDesc.h (revision 9f23cbd6cae82fd77edfad7173432fa8dccd0a95)
1 //===-- XtensaMCTargetDesc.h - Xtensa Target Descriptions -------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
6 // See https://llvm.org/LICENSE.txt for license information.
7 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 //
9 //===----------------------------------------------------------------------===//
10 //
11 // This file provides Xtensa specific target descriptions.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_LIB_TARGET_XTENSA_MCTARGETDESC_XTENSAMCTARGETDESC_H
16 #define LLVM_LIB_TARGET_XTENSA_MCTARGETDESC_XTENSAMCTARGETDESC_H
17 #include "llvm/Support/DataTypes.h"
18 #include <memory>
19 
20 namespace llvm {
21 
22 class MCAsmBackend;
23 class MCCodeEmitter;
24 class MCContext;
25 class MCInstrInfo;
26 class MCObjectTargetWriter;
27 class MCObjectWriter;
28 class MCRegisterInfo;
29 class MCSubtargetInfo;
30 class MCTargetOptions;
31 class StringRef;
32 class Target;
33 class raw_ostream;
34 
35 extern Target TheXtensaTarget;
36 
37 MCCodeEmitter *createXtensaMCCodeEmitter(const MCInstrInfo &MCII,
38                                          MCContext &Ctx);
39 
40 MCAsmBackend *createXtensaMCAsmBackend(const Target &T,
41                                        const MCSubtargetInfo &STI,
42                                        const MCRegisterInfo &MRI,
43                                        const MCTargetOptions &Options);
44 std::unique_ptr<MCObjectTargetWriter>
45 createXtensaObjectWriter(uint8_t OSABI, bool IsLittleEndian);
46 } // end namespace llvm
47 
48 // Defines symbolic names for Xtensa registers.
49 // This defines a mapping from register name to register number.
50 #define GET_REGINFO_ENUM
51 #include "XtensaGenRegisterInfo.inc"
52 
53 // Defines symbolic names for the Xtensa instructions.
54 #define GET_INSTRINFO_ENUM
55 #include "XtensaGenInstrInfo.inc"
56 
57 #define GET_SUBTARGETINFO_ENUM
58 #include "XtensaGenSubtargetInfo.inc"
59 
60 #endif // LLVM_LIB_TARGET_XTENSA_MCTARGETDESC_XTENSAMCTARGETDESC_H
61