[llvm] [aarch64] XOR the frame pointer with the stack cookie when protecting the stack (PR #161114)
Pan Tao via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 26 19:19:54 PST 2025
================
@@ -31,14 +31,20 @@ declare void @_Z7CapturePi(ptr)
; WINDOWS-AARCH64: adrp x8, __security_cookie
; WINDOWS-AARCH64: ldr x8, [x8, :lo12:__security_cookie]
+; WINDOWS-AARCH64: sub x8, sp, x8
; WINDOWS-AARCH64: str x8, [sp, #8]
; WINDOWS-AARCH64: bl _Z7CapturePi
-; WINDOWS-AARCH64: ldr x0, [sp, #8]
+; WINDOWS-AARCH64: ldr x8, [sp, #8]
+; WINDOWS-AARCH64: mov x9, sp
+; WINDOWS-AARCH64: add x0, x8, x9
----------------
PanTao2 wrote:
Thank you for correcting.
https://github.com/llvm/llvm-project/pull/161114
More information about the llvm-commits
mailing list