[llvm] [Hexagon] Add SafeStack runtime libcall to HexagonSystemLibrary (PR #191673)

via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 11 16:22:08 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-ir

Author: Brian Cain (androm3da)

<details>
<summary>Changes</summary>

Register DefaultSafeStackGlobals 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".

---
Full diff: https://github.com/llvm/llvm-project/pull/191673.diff


1 Files Affected:

- (modified) llvm/include/llvm/IR/RuntimeLibcalls.td (+2-1) 


``````````diff
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

``````````

</details>


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


More information about the llvm-commits mailing list