[PATCH] D84419: Fix interaction between stack alignment and inline-asm stack clash protection

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 08:12:54 PDT 2020


serge-sans-paille created this revision.
serge-sans-paille added reviewers: craig.topper, jonpa, cuviper, lkail.
Herald added subscribers: llvm-commits, JDevlieghere, hiraditya.
Herald added a project: LLVM.

As reported in https://github.com/rust-lang/rust/issues/70143 alignment is not taken into account when doing the probing. Fix that by adjusting the first probe if the stack align is small, or by extending the dynamic probing if the alignment is large.


https://reviews.llvm.org/D84419

Files:
  llvm/lib/Target/X86/X86FrameLowering.cpp
  llvm/lib/Target/X86/X86FrameLowering.h
  llvm/test/CodeGen/X86/stack-clash-large.ll
  llvm/test/CodeGen/X86/stack-clash-medium-natural-probes-mutliple-objects.ll
  llvm/test/CodeGen/X86/stack-clash-medium-natural-probes.ll
  llvm/test/CodeGen/X86/stack-clash-medium.ll
  llvm/test/CodeGen/X86/stack-clash-no-free-probe.ll
  llvm/test/CodeGen/X86/stack-clash-unknown-call.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84419.280124.patch
Type: text/x-patch
Size: 11170 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200723/c2727c59/attachment.bin>


More information about the llvm-commits mailing list