This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 0/3] x64 SEH, test 1
- From: rth at redhat dot com
- To: gcc-patches at gcc dot gnu dot org
- To: gcc-patches at gcc dot gnu dot org
- Cc: Richard Henderson <rth at twiddle dot net>, ktietz70 at googlemail dot com
- Date: Tue, 10 Aug 2010 14:07:21 -0700
- Subject: [PATCH 0/3] x64 SEH, test 1
From: Richard Henderson <rth@twiddle.net>
Here's the first pass at emitting SEH unwind directives, as
supported by the current version of gas.
For stack_realign_drap functions, I emit two SEH frames. The
first covers the initial stack re-alignment, and the second
covers the rest of the function. This is supposed to work by
having recorded a "store" of the original stack pointer into
the stack frame (which nicely overlaps with the dwarf2 store
of the CFA into the stack frame). I have no idea whether this
will actually work with the Win64 system unwinder.
I know that it will *not* work for a few instructions of the
epilogue. If this proves to be unacceptable in practice, or
if the "save" of the stack pointer turns out not to work, then
we'll have to arrange to reserve another hard register across
the lifetime of the function. I think I know how to do this
conditionally via register elimination, if needed.
r~
Richard Henderson (3):
Define target hook TARGET_UNWIND_EMIT_BEFORE_INSN.
Tweek prologues and epilogues for SEH.
First take at SEH.
gcc/config/i386/cygming.h | 27 ++-
gcc/config/i386/i386-protos.h | 7 +
gcc/config/i386/i386.c | 79 ++----
gcc/config/i386/i386.h | 55 ++++
gcc/config/i386/winnt.c | 561 +++++++++++++++++++++++++++++++++++++++++
gcc/doc/tm.texi | 4 +
gcc/doc/tm.texi.in | 2 +
gcc/final.c | 7 +-
gcc/target.def | 7 +
9 files changed, 685 insertions(+), 64 deletions(-)
--
1.7.2.1