[all-commits] [llvm/llvm-project] 988a53: [Win64] Ensure all stack frames are 8 byte aligned

Reid Kleckner via All-commits all-commits at lists.llvm.org
Mon Jan 25 10:43:49 PST 2021

  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 988a5334ed40ee65c91bf30be93631b092316390
  Author: Reid Kleckner <rnk at google.com>
  Date:   2021-01-25 (Mon, 25 Jan 2021)

  Changed paths:
    M llvm/lib/Target/X86/X86FrameLowering.cpp
    M llvm/lib/Target/X86/X86FrameLowering.h
    A llvm/test/CodeGen/X86/win64_regcall.ll

  Log Message:
  [Win64] Ensure all stack frames are 8 byte aligned

The unwind info format requires that all adjustments are 8 byte aligned,
and the bottom three bits are masked out. Most Win64 calling conventions
have 32 bytes of shadow stack space for spilling parameters, and I
believe that constructing these fixed stack objects had the side effect
of ensuring an alignment of 8. However, the Intel regcall convention
does not have this shadow space, so when using that convention, it was
possible to make a 4 byte stack frame, which was impossible to describe
with unwind info.

Fixes pr48867

More information about the All-commits mailing list