LLVM 22.0.0git
XtensaTargetParser.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
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/// \file
10/// This file implements a target parser to recognise Xtensa hardware features.
11///
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_TARGETPARSER_XTENSATARGETPARSER_H
15#define LLVM_TARGETPARSER_XTENSATARGETPARSER_H
16
18
19namespace llvm {
20class StringRef;
21
22namespace Xtensa {
23
24enum CPUKind : unsigned {
25#define XTENSA_CPU(ENUM, NAME, FEATURES) CK_##ENUM,
26#include "XtensaTargetParser.def"
27};
28
32 XF_FP = 1 << 1,
33 XF_WINDOWED = 1 << 2,
34 XF_BOOLEAN = 1 << 3,
35 XF_DENSITY = 1 << 4,
36 XF_LOOP = 1 << 5,
37 XF_SEXT = 1 << 6,
38 XF_NSA = 1 << 7,
39 XF_CLAMPS = 1 << 8,
40 XF_MINMAX = 1 << 9,
41 XF_MAC16 = 1 << 10,
42 XF_MUL32 = 1 << 11,
43 XF_MUL32HIGH = 1 << 12,
44 XF_DIV32 = 1 << 13,
45 XF_MUL16 = 1 << 14,
46 XF_DFPACCEL = 1 << 15,
47 XF_S32C1I = 1 << 16,
48 XF_THREADPTR = 1 << 17,
49 XF_EXTENDEDL32R = 1 << 18,
50 XF_DATACACHE = 1 << 19,
51 XF_DEBUG = 1 << 20,
52 XF_EXCEPTION = 1 << 21,
59 XF_COPROCESSOR = 1 << 28,
60 XF_INTERRUPT = 1 << 29,
61 XF_RVECTOR = 1 << 30,
62 XF_TIMERS1 = 1ULL << 31,
63 XF_TIMERS2 = 1ULL << 32,
64 XF_TIMERS3 = 1ULL << 33,
65 XF_PRID = 1ULL << 34,
66 XF_REGPROTECT = 1ULL << 35,
67 XF_MISCSR = 1ULL << 36
68};
69
70CPUKind parseCPUKind(StringRef CPU);
74
75} // namespace Xtensa
76} // namespace llvm
77
78#endif // LLVM_SUPPORT_XTENSATARGETPARSER_H
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
StringRef - Represent a constant reference to a string, i.e.
Definition StringRef.h:55
void getCPUFeatures(StringRef CPU, SmallVectorImpl< StringRef > &Features)
StringRef getBaseName(StringRef CPU)
void fillValidCPUList(SmallVectorImpl< StringRef > &Values)
CPUKind parseCPUKind(StringRef CPU)
This is an optimization pass for GlobalISel generic memory operations.