[llvm] [BOLT][runtime] add missing syscall clobbers to x86_64 __prctl. (PR #192790)

via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 18 06:43:50 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-bolt

Author: David CARLIER (devnexen)

<details>
<summary>Changes</summary>

syscall clobbers RCX and R11; matches the aarch64/riscv64 wrappers.

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


1 Files Affected:

- (modified) bolt/runtime/sys_x86_64.h (+1-1) 


``````````diff
diff --git a/bolt/runtime/sys_x86_64.h b/bolt/runtime/sys_x86_64.h
index 933e939012481..859b7d717d7c7 100644
--- a/bolt/runtime/sys_x86_64.h
+++ b/bolt/runtime/sys_x86_64.h
@@ -350,7 +350,7 @@ int __prctl(int Option, unsigned long Arg2, unsigned long Arg3,
                        "syscall\n"
                        : "=a"(Ret)
                        : "D"(Option), "S"(Arg2), "d"(rdx), "r"(r10), "r"(r8)
-                       :);
+                       : "cc", "rcx", "r11", "memory");
   return Ret;
 }
 

``````````

</details>


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


More information about the llvm-commits mailing list