[llvm] [Hexagon] Add SafeStack runtime libcall to HexagonSystemLibrary (PR #191673)
Brian Cain via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 14 07:14:23 PDT 2026
https://github.com/androm3da updated https://github.com/llvm/llvm-project/pull/191673
>From e354678f500830f8ed4380179331a57d80890cdd Mon Sep 17 00:00:00 2001
From: Brian Cain <brian.cain at oss.qualcomm.com>
Date: Sat, 11 Apr 2026 16:07:07 -0700
Subject: [PATCH] [Hexagon] Add SafeStack runtime libcall to
HexagonSystemLibrary
Register DefaultSafeStackGlobals (__safestack_unsafe_stack_ptr) for
the Hexagon target so that the SafeStack pass can locate the
thread-local unsafe stack pointer during codegen.
Without this, compiling with -fsanitize=safe-stack for Hexagon errors
with "no location available for safestack pointer address".
---
llvm/include/llvm/IR/RuntimeLibcalls.td | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td
index a0f505f1fda2f..8371ea557951d 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.td
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.td
@@ -2800,7 +2800,8 @@ def HexagonSystemLibrary
__umoddi3, __divdf3, __muldf3, __divsi3, __subdf3, sqrtf,
__divdi3, __umodsi3, __moddi3, __modsi3), HexagonLibcalls,
LibmHasSinCosF32, LibmHasSinCosF64, LibmHasSinCosF128,
- exp10f, exp10, exp10l_f128, __stack_chk_fail, __stack_chk_guard)>;
+ exp10f, exp10, exp10l_f128, __stack_chk_fail, __stack_chk_guard,
+ DefaultSafeStackGlobals)>;
//===----------------------------------------------------------------------===//
// Lanai Runtime Libcalls
More information about the llvm-commits
mailing list