This is the mail archive of the
mailing list for the GCC project.
Re: gcc 3.4 regression: sched2 moving "may throw" instructions into epilogue
- From: Andrew Haley <aph at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 5 Mar 2004 20:25:19 GMT
- Subject: Re: gcc 3.4 regression: sched2 moving "may throw" instructions into epilogue
I sent this to the wrong list.
Jim Wilson writes:
> On Fri, 2004-03-05 at 06:46, Andrew Haley wrote:
> > could either be the start of the epilogue or the end of the funtion
> > proper. This is my best guess.
> Either seems reasonable for now. We can always move it later if this
> turns out to be the wrong place.
> > * function.c (expand_function_end): Emit a blockage insn before
> > the epilogue when -fnon-call-exceptions is used.
> This needs to be sent to gcc-patches.
> I prefer the ??? convention over the @@@ one. ??? is used in 10 places
> already in function.c, and there are no uses of @@@.
2004-03-05 Andrew Haley <firstname.lastname@example.org>
* function.c (expand_function_end): Emit a blockage insn before
the epilogue when -fnon-call-exceptions is used.
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.496
diff -u -r1.496 function.c
--- function.c 19 Feb 2004 08:00:47 -0000 1.496
+++ function.c 5 Mar 2004 14:44:31 -0000
@@ -7020,6 +7020,14 @@
+ /* @@@ This is a kludge. We want to ensure that instructions that
+ may trap are not moved into the epilogue by scheduling, because
+ we don't always emit unwind information for the epilogue.
+ However, not all machine descriptions define a blockage insn, so
+ emit an ASM_INPUT to act as one. */
+ if (flag_non_call_exceptions)
+ emit_insn (gen_rtx_ASM_INPUT (VOIDmode, ""));
/* Mark the end of the function body.
If control reaches this insn, the function can drop through
without returning a value. */