[llvm] [llvm-exegesis][AArch64] Adding missing PR_PAC_ macro defintions (PR #138040)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 30 14:59:11 PDT 2025


https://github.com/zeroomega created https://github.com/llvm/llvm-project/pull/138040

This is a follow up of 3beacfa022da2a9c94e012e25bed89e8e4867ac2, which adds PR_PAC_APIAKEY macro to resolve the build failures on older Linux distros. However, it missed a few other definitions. This patch fixed this issue.

The defined values matches the linux header: https://github.com/torvalds/linux/blob/8bac8898fe398ffa3e09075ecea2be511725fb0b/include/uapi/linux/prctl.h#L227

>From 85c9705d23b26b5f520db3ea1b71e13284b091e6 Mon Sep 17 00:00:00 2001
From: Haowei Wu <haowei at google.com>
Date: Wed, 30 Apr 2025 13:41:06 -0700
Subject: [PATCH] [llvm-exegesis][AArch64] Adding missing PR_PAC_ macro
 defintions

This is a follow up of 3beacfa022da2a9c94e012e25bed89e8e4867ac2,
which adds PR_PAC_APIAKEY macro to resolve the build failures on
older Linux distros. However, it missed a few other definitions.
This patch fixed this issue.
---
 llvm/tools/llvm-exegesis/lib/AArch64/Target.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/llvm/tools/llvm-exegesis/lib/AArch64/Target.cpp b/llvm/tools/llvm-exegesis/lib/AArch64/Target.cpp
index b7ea1a75feee6..a1eb5a46f21fc 100644
--- a/llvm/tools/llvm-exegesis/lib/AArch64/Target.cpp
+++ b/llvm/tools/llvm-exegesis/lib/AArch64/Target.cpp
@@ -21,6 +21,15 @@
 #ifndef PR_PAC_APIAKEY
 #define PR_PAC_APIAKEY (1UL << 0)
 #endif
+#ifndef PR_PAC_APIBKEY
+#define PR_PAC_APIBKEY (1UL << 1)
+#endif
+#ifndef PR_PAC_APDAKEY
+#define PR_PAC_APDAKEY (1UL << 2)
+#endif
+#ifndef PR_PAC_APDBKEY
+#define PR_PAC_APDBKEY (1UL << 3)
+#endif
 #endif
 
 #define GET_AVAILABLE_OPCODE_CHECKER



More information about the llvm-commits mailing list