LLVM 22.0.0git
XtensaMCTargetDesc.h
Go to the documentation of this file.
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
18#include <memory>
19
20namespace llvm {
21
22class FeatureBitset;
23class MCAsmBackend;
24class MCCodeEmitter;
25class MCContext;
26class MCInstrInfo;
28class MCObjectWriter;
29class MCRegister;
30class MCRegisterInfo;
31class MCSubtargetInfo;
32class MCTargetOptions;
33class MachineInstr;
34class StringRef;
35class Target;
36class raw_ostream;
37
39
41 MCContext &Ctx);
42
44 const MCSubtargetInfo &STI,
45 const MCRegisterInfo &MRI,
47std::unique_ptr<MCObjectTargetWriter>
48createXtensaObjectWriter(uint8_t OSABI, bool IsLittleEndian);
49
50namespace Xtensa {
51// Check address offset for load/store instructions.
52// The offset should be multiple of scale.
53bool isValidAddrOffset(int Scale, int64_t OffsetVal);
54
55// Check address offset for load/store instructions.
56bool isValidAddrOffsetForOpcode(unsigned Opcode, int64_t Offset);
57
63
64// Verify if it's correct to use a special register.
65bool checkRegister(MCRegister RegNo, const FeatureBitset &FeatureBits,
67
68// Get Xtensa User Register by register encoding value.
69MCRegister getUserRegister(unsigned Code, const MCRegisterInfo &MRI);
70} // namespace Xtensa
71} // end namespace llvm
72
73// Defines symbolic names for Xtensa registers.
74// This defines a mapping from register name to register number.
75#define GET_REGINFO_ENUM
76#include "XtensaGenRegisterInfo.inc"
77
78// Defines symbolic names for the Xtensa instructions.
79#define GET_INSTRINFO_ENUM
80#include "XtensaGenInstrInfo.inc"
81
82#define GET_SUBTARGETINFO_ENUM
83#include "XtensaGenSubtargetInfo.inc"
84
85#endif // LLVM_LIB_TARGET_XTENSA_MCTARGETDESC_XTENSAMCTARGETDESC_H
unsigned const MachineRegisterInfo * MRI
static LVOptions Options
Definition LVOptions.cpp:25
#define T
SI optimize exec mask operations pre RA
Container class for subtarget features.
Generic interface to target specific assembler backends.
MCCodeEmitter - Generic instruction encoding interface.
Context object for machine code objects.
Definition MCContext.h:83
Interface to description of machine instruction set.
Definition MCInstrInfo.h:27
Base class for classes that define behaviour that is specific to both the target and the object forma...
Defines the object file and target independent interfaces used by the assembler backend to write nati...
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
Wrapper class representing physical registers. Should be passed by value.
Definition MCRegister.h:33
Generic base class for all target subtargets.
Representation of each machine instruction.
StringRef - Represent a constant reference to a string, i.e.
Definition StringRef.h:55
Target - Wrapper for Target specific information.
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition raw_ostream.h:53
bool checkRegister(MCRegister RegNo, const FeatureBitset &FeatureBits, RegisterAccessType RA)
bool isValidAddrOffset(int Scale, int64_t OffsetVal)
MCRegister getUserRegister(unsigned Code, const MCRegisterInfo &MRI)
bool isValidAddrOffsetForOpcode(unsigned Opcode, int64_t Offset)
This is an optimization pass for GlobalISel generic memory operations.
@ Offset
Definition DWP.cpp:477
std::unique_ptr< MCObjectTargetWriter > createXtensaObjectWriter(uint8_t OSABI, bool IsLittleEndian)
Target TheXtensaTarget
MCAsmBackend * createXtensaAsmBackend(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options)
MCCodeEmitter * createXtensaMCCodeEmitter(const MCInstrInfo &MCII, MCContext &Ctx)