Commit 8de57ed7 authored by Georgia Kouveli's avatar Georgia Kouveli Committed by Commit Bot

[cppgc][arm64][cfi] Add PAC/AUT instructions to `PushAllRegistersAndIterateStack`.

Bug: v8:10026
Change-Id: Ie040d36d9a98943f97236998df53408bb060d028
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764760Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Cr-Commit-Position: refs/heads/master@{#73506}
parent a3ba8ce3
......@@ -37,6 +37,10 @@ asm(
" stp x23, x24, [sp, #-16]! \n"
" stp x25, x26, [sp, #-16]! \n"
" stp x27, x28, [sp, #-16]! \n"
#ifdef V8_ENABLE_CONTROL_FLOW_INTEGRITY
// Sign return address.
" paciasp \n"
#endif
" stp fp, lr, [sp, #-16]! \n"
// Maintain frame pointer.
" mov fp, sp \n"
......@@ -47,8 +51,12 @@ asm(
// Pass 3rd parameter as sp (stack pointer).
" mov x2, sp \n"
" blr x7 \n"
// Load return address.
" ldr lr, [sp, #8] \n"
// Restore frame pointer and pop all callee-saved registers.
" ldr fp, [sp], #96 \n"
// Load return address and frame pointer.
" ldp fp, lr, [sp], #16 \n"
#ifdef V8_ENABLE_CONTROL_FLOW_INTEGRITY
// Authenticate return address.
" autiasp \n"
#endif
// Drop all callee-saved registers.
" add sp, sp, #80 \n"
" ret \n");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment