Coverage Report

Created: 2026-02-14 07:25

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/keystone/llvm/lib/Target/Sparc/SparcGenSubtargetInfo.inc
Line
Count
Source
1
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2
|*                                                                            *|
3
|* Subtarget Enumeration Source Fragment                                      *|
4
|*                                                                            *|
5
|* Automatically generated file, do not edit!                                 *|
6
|*                                                                            *|
7
\*===----------------------------------------------------------------------===*/
8
9
10
#ifdef GET_SUBTARGETINFO_ENUM
11
#undef GET_SUBTARGETINFO_ENUM
12
namespace llvm_ks {
13
namespace Sparc {
14
enum : uint64_t {
15
  FeatureHardQuad = 0,
16
  FeatureV8Deprecated = 1,
17
  FeatureV9 = 2,
18
  FeatureVIS = 3,
19
  FeatureVIS2 = 4,
20
  FeatureVIS3 = 5,
21
  UsePopc = 6
22
};
23
}
24
} // end llvm namespace
25
#endif // GET_SUBTARGETINFO_ENUM
26
27
28
#ifdef GET_SUBTARGETINFO_MC_DESC
29
#undef GET_SUBTARGETINFO_MC_DESC
30
namespace llvm_ks {
31
// Sorted (by key) array of values for CPU features.
32
extern const llvm_ks::SubtargetFeatureKV SparcFeatureKV[] = {
33
  { "deprecated-v8", "Enable deprecated V8 instructions in V9 mode", { Sparc::FeatureV8Deprecated }, { } },
34
  { "hard-quad-float", "Enable quad-word floating point instructions", { Sparc::FeatureHardQuad }, { } },
35
  { "popc", "Use the popc (population count) instruction", { Sparc::UsePopc }, { } },
36
  { "v9", "Enable SPARC-V9 instructions", { Sparc::FeatureV9 }, { } },
37
  { "vis", "Enable UltraSPARC Visual Instruction Set extensions", { Sparc::FeatureVIS }, { } },
38
  { "vis2", "Enable Visual Instruction Set extensions II", { Sparc::FeatureVIS2 }, { } },
39
  { "vis3", "Enable Visual Instruction Set extensions III", { Sparc::FeatureVIS3 }, { } }
40
};
41
42
// Sorted (by key) array of values for CPU subtype.
43
extern const llvm_ks::SubtargetFeatureKV SparcSubTypeKV[] = {
44
  { "f934", "Select the f934 processor", { }, { } },
45
  { "generic", "Select the generic processor", { }, { } },
46
  { "hypersparc", "Select the hypersparc processor", { }, { } },
47
  { "niagara", "Select the niagara processor", { Sparc::FeatureV9, Sparc::FeatureV8Deprecated, Sparc::FeatureVIS, Sparc::FeatureVIS2 }, { } },
48
  { "niagara2", "Select the niagara2 processor", { Sparc::FeatureV9, Sparc::FeatureV8Deprecated, Sparc::UsePopc, Sparc::FeatureVIS, Sparc::FeatureVIS2 }, { } },
49
  { "niagara3", "Select the niagara3 processor", { Sparc::FeatureV9, Sparc::FeatureV8Deprecated, Sparc::UsePopc, Sparc::FeatureVIS, Sparc::FeatureVIS2 }, { } },
50
  { "niagara4", "Select the niagara4 processor", { Sparc::FeatureV9, Sparc::FeatureV8Deprecated, Sparc::UsePopc, Sparc::FeatureVIS, Sparc::FeatureVIS2, Sparc::FeatureVIS3 }, { } },
51
  { "sparclet", "Select the sparclet processor", { }, { } },
52
  { "sparclite", "Select the sparclite processor", { }, { } },
53
  { "sparclite86x", "Select the sparclite86x processor", { }, { } },
54
  { "supersparc", "Select the supersparc processor", { }, { } },
55
  { "tsc701", "Select the tsc701 processor", { }, { } },
56
  { "ultrasparc", "Select the ultrasparc processor", { Sparc::FeatureV9, Sparc::FeatureV8Deprecated, Sparc::FeatureVIS }, { } },
57
  { "ultrasparc3", "Select the ultrasparc3 processor", { Sparc::FeatureV9, Sparc::FeatureV8Deprecated, Sparc::FeatureVIS, Sparc::FeatureVIS2 }, { } },
58
  { "v7", "Select the v7 processor", { }, { } },
59
  { "v8", "Select the v8 processor", { }, { } },
60
  { "v9", "Select the v9 processor", { Sparc::FeatureV9 }, { } }
61
};
62
63
#ifdef DBGFIELD
64
#error "<target>GenSubtargetInfo.inc requires a DBGFIELD macro"
65
#endif
66
#ifndef NDEBUG
67
#define DBGFIELD(x) x,
68
#else
69
#define DBGFIELD(x)
70
#endif
71
72
// ===============================================================
73
// Data tables for the new per-operand machine model.
74
75
#undef DBGFIELD
76
11.6k
static inline MCSubtargetInfo *createSparcMCSubtargetInfoImpl(const Triple &TT, StringRef CPU, StringRef FS) {
77
  return new MCSubtargetInfo(TT, CPU, FS, SparcFeatureKV, SparcSubTypeKV, NULL);
78
11.6k
}
79
80
} // end llvm namespace
81
#endif // GET_SUBTARGETINFO_MC_DESC
82
83
84
#ifdef GET_SUBTARGETINFO_TARGET_DESC
85
#undef GET_SUBTARGETINFO_TARGET_DESC
86
#include "llvm/Support/Debug.h"
87
#include "llvm/Support/raw_ostream.h"
88
// ParseSubtargetFeatures - Parses features string setting specified
89
// subtarget options.
90
void llvm_ks::SparcSubtarget::ParseSubtargetFeatures(StringRef CPU, StringRef FS) {
91
  DEBUG(dbgs() << "\nFeatures:" << FS);
92
  DEBUG(dbgs() << "\nCPU:" << CPU << "\n\n");
93
  InitMCProcessorInfo(CPU, FS);
94
  const FeatureBitset& Bits = getFeatureBits();
95
  if (Bits[Sparc::FeatureHardQuad]) HasHardQuad = true;
96
  if (Bits[Sparc::FeatureV8Deprecated]) V8DeprecatedInsts = true;
97
  if (Bits[Sparc::FeatureV9]) IsV9 = true;
98
  if (Bits[Sparc::FeatureVIS]) IsVIS = true;
99
  if (Bits[Sparc::FeatureVIS2]) IsVIS2 = true;
100
  if (Bits[Sparc::FeatureVIS3]) IsVIS3 = true;
101
  if (Bits[Sparc::UsePopc]) UsePopc = true;
102
}
103
#endif // GET_SUBTARGETINFO_TARGET_DESC