qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp


From: Kai Tietz
Subject: Re: [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp
Date: Thu, 20 Oct 2011 17:34:16 +0200

Hi,

For trunk-version I have a tentative patch for this issue.  On 4.6.x
and older branches this doesn't work, as here we can't differenciate
that easy between ms- and sysv-abi.

But could somebody give this patch a try?

Regards,
Kai

ChangeLog

        * config/i386/i386.c (ix86_frame_pointer_required): Enforce use of
        frame-pointer for 32-bit ms-abi, if setjmp is used.

Index: i386.c
===================================================================
--- i386.c      (revision 180099)
+++ i386.c      (working copy)
@@ -8391,6 +8391,10 @@
   if (SUBTARGET_FRAME_POINTER_REQUIRED)
     return true;

+  /* For older 32-bit runtimes setjmp requires valid frame-pointer.  */
+  if (TARGET_32BIT_MS_ABI && cfun->calls_setjmp)
+    return true;
+
   /* In ix86_option_override_internal, TARGET_OMIT_LEAF_FRAME_POINTER
      turns off the frame pointer by default.  Turn it back on now if
      we've not got a leaf function.  */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]