Re: [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp
Applied a fix to trunk at rev. 180423 and to 4.6.x branch at rev. 180422. Regards, Kai
Re: [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp
On 10/24/2011 09:18 AM, Kai Tietz wrote: A possible patch for 4.6 gcc versions I attached to this mail. ... +/* For 32-bit Windows we need valid frame-pointer for function using + setjmp. */ +#define SUBTARGET_SETJMP_NEED_FRAME_POINTER \ + (!TARGET_64BIT cfun-calls_setjmp) + Index: i386.c === --- i386.c (revision 180393) +++ i386.c (working copy) @@ -8741,6 +8741,12 @@ if (SUBTARGET_FRAME_POINTER_REQUIRED) return true; +#ifdef SUBTARGET_SETJMP_NEED_FRAME_POINTER + /* For older 32-bit runtimes setjmp requires valid frame-pointer. */ + if (SUBTARGET_SETJMP_NEED_FRAME_POINTER) +return true; +#endif Why not just use SUBTARGET_FRAME_POINTER_REQUIRED here? r~
Re: [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp
2011/10/24 Richard Henderson r...@twiddle.net: On 10/24/2011 09:18 AM, Kai Tietz wrote: A possible patch for 4.6 gcc versions I attached to this mail. ... +/* For 32-bit Windows we need valid frame-pointer for function using + setjmp. */ +#define SUBTARGET_SETJMP_NEED_FRAME_POINTER \ + (!TARGET_64BIT cfun-calls_setjmp) + Index: i386.c === --- i386.c (revision 180393) +++ i386.c (working copy) @@ -8741,6 +8741,12 @@ if (SUBTARGET_FRAME_POINTER_REQUIRED) return true; +#ifdef SUBTARGET_SETJMP_NEED_FRAME_POINTER + /* For older 32-bit runtimes setjmp requires valid frame-pointer. */ + if (SUBTARGET_SETJMP_NEED_FRAME_POINTER) + return true; +#endif Why not just use SUBTARGET_FRAME_POINTER_REQUIRED here? r~ Sure, this is even more easy. SUBTARGET_FRAME_POINTER_REQUIRED is just defined on i386-architectures for linux OSes, so for Windows-targets we still can use it. Kai