[llvm] [PAC][IR][AArch64] Add "ptrauth(...)" Constant to represent signed pointers. (PR #85738)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed May 8 18:21:47 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)
----------------
nikic wrote:

```suggestion
ptrauth (ptr CST, i32 KEY, i64 DISC, ptr ADDRDISC)
```

https://github.com/llvm/llvm-project/pull/85738


More information about the llvm-commits mailing list