[PATCH] D17823: [X86] Don't give catch objects a displacement of zero

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 2 11:04:12 PST 2016


majnemer created this revision.
majnemer added a reviewer: rnk.
majnemer added a subscriber: llvm-commits.

Catch objects with a displacement of zero do not initialize a catch
object.  The displacement is relative to %rsp at the end of the
function's prologue for x86_64 targets.

If we place an object at the top-of-stack, we will end up wit a
displacement of zero resulting in our catch object remaining
uninitialized.

Address this by creating our catch objects as fixed objects.  We will
ensure that the UnwindHelp object is created after the catch objects so
that no catch object will have a displacement of zero.

http://reviews.llvm.org/D17823

Files:
  include/llvm/Target/TargetLowering.h
  lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
  lib/CodeGen/StackColoring.cpp
  lib/Target/X86/X86FrameLowering.cpp
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86ISelLowering.h
  test/CodeGen/X86/catchpad-dynamic-alloca.ll
  test/CodeGen/X86/catchpad-lifetime.ll
  test/CodeGen/X86/win-catchpad.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17823.49650.patch
Type: text/x-patch
Size: 13848 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160302/56d2dac6/attachment.bin>


More information about the llvm-commits mailing list