This is the mail archive of the
mailing list for the GCC project.
Re: Bypassing jump optimization
- To: mike stump <mrs at windriver dot com>
- Subject: Re: Bypassing jump optimization
- From: Casper Hornstrup <chorns at users dot sourceforge dot net>
- Date: Fri, 12 Oct 2001 23:43:32 +0200
- Cc: gcc at gcc dot gnu dot org
- References: <200110122114.OAA16793@kankakee.wrs.com>
On Friday 12 October 2001 23:14, you wrote:
> > From: Casper Hornstrup <firstname.lastname@example.org>
> > To: email@example.com
> > Date: Fri, 12 Oct 2001 21:51:24 +0200
> > I'm implementing structured exception handling in gcc.
> I have no clue what this means. Try using 100 words to describe it.
> My off the cuff response would be, gcc already has structured
> exception handling, no need to add it.
Sorry for that. Structured Exception Handling (SEH) is used in Microsoft
operating systems (Win32) to signal processor events (like devide-by-zero
exceptions, or access violations, etc.) to applications and drivers.
> > What is the correct way (if any exist) to bypass jump optimization
> > on a range of insns?
> No. If you want a better answer, you'll probably have to give us some
> Read and understand all of except.[ch] in the compiler, if you've not
> already done that.
I have looked at these files and my current opinion is that it is best to not
share much of the code for the complex and flexible gcc exception handling
mechanisms. SEH is simple compared to fx. c++ exception handling. It is
basicly just a transfer of execution from the OS to an exception filter
routine, which then signals the OS, wether execution should resume at the
instruction that faulted, or an exception handler should be run to cleanup
from the operation that caused the fault.
Because it is the OS (actually the MS Visual C++ runtime library dll) that
calls the exception filter and not the gcc generated code, the label is not
referenced and thus discarded by gcc.
I'm new to gcc and does not have a complete overview of gcc. If anyone
disagrees about not sharing code with the current exception mechanisms,
please say so.
- Casper Hornstrup