@@ -11,42 +11,123 @@
// A SubtargetFeature that can be toggled from the command line, and therefore
// has an AEK_* entry in ArmExtKind.
+//
+// If Function MultiVersioning (FMV) properties are left at their defaults
+// (FEAT_INIT, no dependencies, priority 0) it indiates that this extension is
+// not an FMV feature, but can be enabled via the command line (-march, -mcpu,
+// etc).
+//
+// Conversely if the ArchExtKindSpelling is set to AEK_NONE, this indicates
+// that a feature is FMV-only, and can not be selected on the command line.
+// Such extensions should be added via FMVOnlyExtension.
class Extension<
- string TargetFeatureName,// String used for -target-feature.
+ string TargetFeatureName,// String used for -target-feature and
-march, unless overridden.
string Spelling, // The XYZ in HasXYZ and AEK_XYZ.
string Desc, // Description.
- list Implies = [] // List of dependent features.
+ list Implies = [], // List of dependent features.
+ // FMV properties
+ string _FMVBit = "FEAT_INIT",// FEAT_INIT is repurposed to indicate
"not an FMV feature"
+ string _FMVDependencies = "",
+ int _FMVPriority = 0
> : SubtargetFeature Implies>
{
string ArchExtKindSpelling = "AEK_" # Spelling; // ArchExtKind enum name.
+
+// In general, the name written on the command line should match the name
+// used for -target-feature. However, there are exceptions. Therefore we
+// add a separate field for this, to allow overriding it. Strongly prefer
+// not doing so.
+string MArchName = TargetFeatureName;
+
+// Function MultiVersioning (FMV) properties
+
+// A C++ expression giving the number of the bit in the FMV ABI.
+// Currently this is given as a value from the enum "CPUFeatures".
+// If this is not set, it indicates that this is not an FMV extension.
+string FMVBit = _FMVBit;
+
+// List of features that this feature depends on.
+// FIXME generate this from Implies.
jthackray wrote:
Presumably this FIXME is coming in a future PR?
https://github.com/llvm/llvm-project/pull/90987
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits