This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Bypassing jump optimization


On Friday 12 October 2001 23:14, you wrote:
> > From: Casper Hornstrup <chorns@users.sourceforge.net>
> > To: gcc@gcc.gnu.org
> > 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
> details.
>
> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]