[PATCH] D158084: [AArch64] Stack probing for function prologues

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 08:31:02 PDT 2023


chill added a comment.

In D158084#4611877 <https://reviews.llvm.org/D158084#4611877>, @efriedma wrote:

>> save SVE CSRs in descending address order, so they serve as implicit stack probes.
>
> This only works if the stores happen immediately after stack pointer is decremented, which I don't think is what your code does.  And even then I'm not sure it's completely reliable; if an asynchronous signal is delivered to the thread between the subtraction and saving the CSRs, you can still end up jumping over the guard page.
>
> I'd suggest as an initial implementation, just probe SVE CSRs.  We can consider optimizations in a followup.

Done. Now we maintain SP is never below the guard page.

>> Can we integrate Windows and non-Windows stack probing, to the extent that makes sense? (I mean, the actual code sequences and register usage are obviously going to be different, but using the same overall logic for when to trigger probing and the amount to probe would make the code easier to understand.)
>
> Did you have a reply to this?

No, not yet.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158084/new/

https://reviews.llvm.org/D158084



More information about the llvm-commits mailing list