================
@@ -1119,6 +1119,28 @@ def HasStdExtZbkbOrP
                          "'Zbkb' (Bitmanip instructions for Cryptography) or "
                          "'Base P' (Packed-SIMD)">;
 
+// "Y" extension (CHERI support)
+
+def FeatureStdExtY : RISCVExperimentalExtension<0, 96, "'Base Y' (CHERI)">;
+def HasStdExtY
+    : Predicate<"Subtarget->hasStdExtY()">,
+      AssemblerPredicate<(all_of FeatureStdExtY), "'Base Y' (CHERI)">;
+
+// When enabled all memory operations (e.g. loads/stores) uses capability
+// registers as the base operand instead of the address sub-register.
+// Currently, capability mode needs to be chosen at assembly time, but 
follow-up
+// commits will add support for "hybrid" mode that adds instructions to
+// dynamically switch between capability mode and address mode (the latter 
being
+// fully backwards compatible with non-Y code).
+def FeatureCapMode : SubtargetFeature<"cap-mode", "IsCapMode", "true",
----------------
arichardson wrote:

For now this specific one is internal to LLVM. In the future we will likely 
upstream changes to add `.option (no)capmode` to toggle this in the assembler 
dynamically.  But this is a niche use case and the only way this should be 
controlled as a user by setting the -mabi= flag to a pure-capability ABI (e.g. 
il32pc64).

Also the extension is still marked as experimental so I think that means 
renames of flags should not be a problem right? 

https://github.com/llvm/llvm-project/pull/176870
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to