================
@@ -328,6 +328,21 @@ be done in a single instruction with an immediate integer.
 ``pointer`` must have pointer type, and ``integer`` must have integer type. The
 result has type ``ptrauth_extra_data_t``.
 
+``ptrauth_string_discriminator``
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: c
+
+  ptrauth_string_discriminator(string)
+
+Produce a discriminator value for the given string.  ``string`` must be
+a string literal of ``char`` character type.  The result has type
+``ptrauth_extra_data_t``.
+
+The result is always a constant expression.  The result value is never zero and
+always within range for both the ``__ptrauth`` qualifier and
----------------
kovdan01 wrote:

Since we are talking about ranges here, it would be nice to have these ranges 
explicitly described in corresponding parts of docs. As far as I understand, 
different implementations are allowed to have different constraints on 
discriminator. It would be nice to somewhere describe actual figures for some 
specific implementation, e.g. arm64e. Please let me know if there is already a 
place for that which I've missed.

https://github.com/llvm/llvm-project/pull/93903
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to