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/SystemZ/SystemZGenSubtargetInfo.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 SystemZ {
14
enum : uint64_t {
15
  FeatureDistinctOps = 0,
16
  FeatureFPExtension = 1,
17
  FeatureFastSerialization = 2,
18
  FeatureHighWord = 3,
19
  FeatureInterlockedAccess1 = 4,
20
  FeatureLoadStoreOnCond = 5,
21
  FeatureMiscellaneousExtensions = 6,
22
  FeaturePopulationCount = 7,
23
  FeatureProcessorAssist = 8,
24
  FeatureTransactionalExecution = 9,
25
  FeatureVector = 10
26
};
27
}
28
} // end llvm namespace
29
#endif // GET_SUBTARGETINFO_ENUM
30
31
32
#ifdef GET_SUBTARGETINFO_MC_DESC
33
#undef GET_SUBTARGETINFO_MC_DESC
34
namespace llvm_ks {
35
// Sorted (by key) array of values for CPU features.
36
extern const llvm_ks::SubtargetFeatureKV SystemZFeatureKV[] = {
37
  { "distinct-ops", "Assume that the distinct-operands facility is installed", { SystemZ::FeatureDistinctOps }, { } },
38
  { "fast-serialization", "Assume that the fast-serialization facility is installed", { SystemZ::FeatureFastSerialization }, { } },
39
  { "fp-extension", "Assume that the floating-point extension facility is installed", { SystemZ::FeatureFPExtension }, { } },
40
  { "high-word", "Assume that the high-word facility is installed", { SystemZ::FeatureHighWord }, { } },
41
  { "interlocked-access1", "Assume that interlocked-access facility 1 is installed", { SystemZ::FeatureInterlockedAccess1 }, { } },
42
  { "load-store-on-cond", "Assume that the load/store-on-condition facility is installed", { SystemZ::FeatureLoadStoreOnCond }, { } },
43
  { "miscellaneous-extensions", "Assume that the miscellaneous-extensions facility is installed", { SystemZ::FeatureMiscellaneousExtensions }, { } },
44
  { "population-count", "Assume that the population-count facility is installed", { SystemZ::FeaturePopulationCount }, { } },
45
  { "processor-assist", "Assume that the processor-assist facility is installed", { SystemZ::FeatureProcessorAssist }, { } },
46
  { "transactional-execution", "Assume that the transactional-execution facility is installed", { SystemZ::FeatureTransactionalExecution }, { } },
47
  { "vector", "Assume that the vectory facility is installed", { SystemZ::FeatureVector }, { } }
48
};
49
50
// Sorted (by key) array of values for CPU subtype.
51
extern const llvm_ks::SubtargetFeatureKV SystemZSubTypeKV[] = {
52
  { "generic", "Select the generic processor", { }, { } },
53
  { "z10", "Select the z10 processor", { }, { } },
54
  { "z13", "Select the z13 processor", { SystemZ::FeatureDistinctOps, SystemZ::FeatureLoadStoreOnCond, SystemZ::FeatureHighWord, SystemZ::FeatureFPExtension, SystemZ::FeaturePopulationCount, SystemZ::FeatureFastSerialization, SystemZ::FeatureInterlockedAccess1, SystemZ::FeatureTransactionalExecution, SystemZ::FeatureProcessorAssist, SystemZ::FeatureVector }, { } },
55
  { "z196", "Select the z196 processor", { SystemZ::FeatureDistinctOps, SystemZ::FeatureLoadStoreOnCond, SystemZ::FeatureHighWord, SystemZ::FeatureFPExtension, SystemZ::FeaturePopulationCount, SystemZ::FeatureFastSerialization, SystemZ::FeatureInterlockedAccess1 }, { } },
56
  { "zEC12", "Select the zEC12 processor", { SystemZ::FeatureDistinctOps, SystemZ::FeatureLoadStoreOnCond, SystemZ::FeatureHighWord, SystemZ::FeatureFPExtension, SystemZ::FeaturePopulationCount, SystemZ::FeatureFastSerialization, SystemZ::FeatureInterlockedAccess1, SystemZ::FeatureMiscellaneousExtensions, SystemZ::FeatureTransactionalExecution, SystemZ::FeatureProcessorAssist }, { } }
57
};
58
59
#ifdef DBGFIELD
60
#error "<target>GenSubtargetInfo.inc requires a DBGFIELD macro"
61
#endif
62
#ifndef NDEBUG
63
#define DBGFIELD(x) x,
64
#else
65
#define DBGFIELD(x)
66
#endif
67
68
// ===============================================================
69
// Data tables for the new per-operand machine model.
70
#undef DBGFIELD
71
59
static inline MCSubtargetInfo *createSystemZMCSubtargetInfoImpl(const Triple &TT, StringRef CPU, StringRef FS) {
72
  return new MCSubtargetInfo(TT, CPU, FS, SystemZFeatureKV, SystemZSubTypeKV, NULL);
73
59
}
74
75
} // end llvm namespace
76
#endif // GET_SUBTARGETINFO_MC_DESC
77
78
79
#ifdef GET_SUBTARGETINFO_TARGET_DESC
80
#undef GET_SUBTARGETINFO_TARGET_DESC
81
#include "llvm/Support/Debug.h"
82
#include "llvm/Support/raw_ostream.h"
83
// ParseSubtargetFeatures - Parses features string setting specified
84
// subtarget options.
85
void llvm_ks::SystemZSubtarget::ParseSubtargetFeatures(StringRef CPU, StringRef FS) {
86
  DEBUG(dbgs() << "\nFeatures:" << FS);
87
  DEBUG(dbgs() << "\nCPU:" << CPU << "\n\n");
88
  InitMCProcessorInfo(CPU, FS);
89
  const FeatureBitset& Bits = getFeatureBits();
90
  if (Bits[SystemZ::FeatureDistinctOps]) HasDistinctOps = true;
91
  if (Bits[SystemZ::FeatureFPExtension]) HasFPExtension = true;
92
  if (Bits[SystemZ::FeatureFastSerialization]) HasFastSerialization = true;
93
  if (Bits[SystemZ::FeatureHighWord]) HasHighWord = true;
94
  if (Bits[SystemZ::FeatureInterlockedAccess1]) HasInterlockedAccess1 = true;
95
  if (Bits[SystemZ::FeatureLoadStoreOnCond]) HasLoadStoreOnCond = true;
96
  if (Bits[SystemZ::FeatureMiscellaneousExtensions]) HasMiscellaneousExtensions = true;
97
  if (Bits[SystemZ::FeaturePopulationCount]) HasPopulationCount = true;
98
  if (Bits[SystemZ::FeatureProcessorAssist]) HasProcessorAssist = true;
99
  if (Bits[SystemZ::FeatureTransactionalExecution]) HasTransactionalExecution = true;
100
  if (Bits[SystemZ::FeatureVector]) HasVector = true;
101
}
102
#endif // GET_SUBTARGETINFO_TARGET_DESC