[llvm] [PAC][IR][AArch64] Add "ptrauth(...)" Constant to represent signed pointers. (PR #85738)
via llvm-commits
llvm-commits at lists.llvm.org
Fri May 10 22:10:12 PDT 2024
================
@@ -225,6 +226,27 @@ with a pointer address discriminator, in a way that is specified by the target
implementation.
+### Constant
+
+[Intrinsics](#intrinsics) can be used to produce signed pointers dynamically,
+in code, but not for signed pointers referenced by constants, in, e.g., global
+initializers.
+
+The latter are represented using a
+[``ptrauth`` constant](https://llvm.org/docs/LangRef.html#ptrauth-constant),
+which describes an authenticated relocation producing a signed pointer.
+
+```llvm
+ptrauth (ptr CST, i32 KEY, i64 DISC, ptr ADDRDISC)
----------------
cooperp wrote:
Any restrictions on ptr worth documenting? Or is it just the same restrictions as constant expressions in globals, ie, that they can eventually be lowered to Mach-o/ELF relocations?
https://github.com/llvm/llvm-project/pull/85738
More information about the llvm-commits
mailing list