[PATCH] D13132: [X86] Emit .cfi_escape GNU_ARGS_SIZE when adjusting the stack before calls

Michael Kuperstein via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 28 22:59:03 PDT 2015


mkuper added a comment.

Thanks Reid,
I'll upload an updated patch with a cleaner interface.


================
Comment at: lib/Target/X86/X86FrameLowering.cpp:2073
@@ +2072,3 @@
+    if (NeedsDwarfCFI && !isDestroy && 
+        MF.getInfo<X86MachineFunctionInfo>()->getHasPushSequences()) {
+      const uint8_t GNU_ARGS_SIZE = 0x2e;
----------------
rnk wrote:
> We shouldn't emit this if we have an FP for the frame.
That was my original thought too, but I talked about it with Dave, and he suggested that was incorrect.
E.g.:

while (...)
   try {
      foo(...);
      ...
   } catch (...) {
      ...
   }
}

While all stack references will be fine without gnu_args_size (assuming FP), the stack may overflow due to the missing cleanups.



http://reviews.llvm.org/D13132





More information about the llvm-commits mailing list