[all-commits] [llvm/llvm-project] 1f26ac: [X86] Better handling of impossibly large stack fr...

mconst via All-commits all-commits at lists.llvm.org
Fri Jan 24 20:04:20 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1f26ac10ca1bef40a80be8f81a6f109713bc586f
      https://github.com/llvm/llvm-project/commit/1f26ac10ca1bef40a80be8f81a6f109713bc586f
  Author: mconst <mconst at gmail.com>
  Date:   2025-01-25 (Sat, 25 Jan 2025)

  Changed paths:
    M llvm/lib/Target/X86/X86FrameLowering.cpp
    M llvm/test/CodeGen/X86/huge-stack-offset.ll
    M llvm/test/CodeGen/X86/stack-clash-extra-huge.ll

  Log Message:
  -----------
  [X86] Better handling of impossibly large stack frames (#124217)

If you try to create a stack frame of 4 GiB or larger with a 32-bit
stack pointer, we currently emit invalid instructions like `mov eax,
5000000000` (unless you specify `-fstack-clash-protection`, in which
case we emit a trap instead).

The trap seems nicer, so let's do that in all cases. This avoids
emitting invalid instructions, and also fixes the "can't have 32-bit
16GB stack frame" assertion in `X86FrameLowering::emitSPUpdate()` (which
used to be triggerable by user code, but is now correct).

This was originally part of #124041.

@phoebewang



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list