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]
Other format: [Raw text]

Re: Zero overhead exception handling in C++


What platform did you se it on? Which instructions did you see? What was the testcase?

On Monday, November 4, 2002, at 02:31 PM, Bo-Staffan Lankinen wrote:
I was under the impression that g++3.x had zero overhead exception handling.
However, that doesn't seem to be the case, because there are instructions
belonging to EH in both the prolog and epilog of the functions. Do you plan
on including zero overhead EH in a future version of g++?
When I tried it, I notice an extra jmp (known issue) and lack of sibcall and some extra instructions relating to frame management, that's about it:

void bar();

void foo() {
try {
bar();
} catch (...) { }
}

Did you mean more than these instructions?

We know that EH does slightly degrade the code some, but its expense is much less than the setjmp/longjmp scheme.


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