LLVM 24.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 MCRegister;
29class MCRegisterInfo;
30class MCSubtargetInfo;
31class MCTargetOptions;
32class Target;
33
35
37 MCContext &Ctx);
38
40 const MCSubtargetInfo &STI,
41 const MCRegisterInfo &MRI,
43std::unique_ptr<MCObjectTargetWriter>
44createXtensaObjectWriter(uint8_t OSABI, bool IsLittleEndian);
45
46namespace Xtensa {
47// Check address offset for load/store instructions.
48// The offset should be multiple of scale.
49bool isValidAddrOffset(int Scale, int64_t OffsetVal);
50
51// Check address offset for load/store instructions.
52bool isValidAddrOffsetForOpcode(unsigned Opcode, int64_t Offset);
53
59
60// Verify if it's correct to use a special register.
61bool checkRegister(MCRegister RegNo, const FeatureBitset &FeatureBits,
63
64// Get Xtensa User Register by register encoding value.
65MCRegister getUserRegister(unsigned Code, const MCRegisterInfo &MRI);
66} // namespace Xtensa
67} // end namespace llvm
68
69// Defines symbolic names for Xtensa registers.
70// This defines a mapping from register name to register number.
71#define GET_REGINFO_ENUM
72#include "XtensaGenRegisterInfo.inc"
73
74// Defines symbolic names for the Xtensa instructions.
75#define GET_INSTRINFO_ENUM
76#include "XtensaGenInstrInfo.inc"
77
78#define GET_SUBTARGETINFO_ENUM
79#include "XtensaGenSubtargetInfo.inc"
80
81#endif // LLVM_LIB_TARGET_XTENSA_MCTARGETDESC_XTENSAMCTARGETDESC_H
static LVOptions Options
Definition LVOptions.cpp:25
#define T
MachineRegisterInfo & MRI
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:84
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...
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
Wrapper class representing physical registers and target specific virtual registers.
Definition MCRegister.h:42
Generic base class for all target subtargets.
Target - Wrapper for Target specific information.
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:577
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)