Article View: comp.std.c++
Article #3059Re: Throwing an exception from within a si
From: Bill Leonard
Date: Mon, 22 Jan 1996 17:41
Date: Mon, 22 Jan 1996 17:41
52 lines
3408 bytes
3408 bytes
In article <4dos4l$ra9@engnews1.Eng.Sun.COM>, clamage@Eng.Sun.COM (Steve Clamage) writes:
> I have longer experience with non-RISC implementations than with RISC
> implementations. It is common for non-RISC implemenations not to have
> a recognizable function preamble or postamble. There are not just two or
> three possible instruction sequences making up function entry and exit --
> there are dozens or even hundreds of possible sequences. If you standardize
> on recognizeable entry and exit sequences you take a noticeable performance
> hit, particularly on popular benchmark programs.
I have quite a bit of experience designing and implementing compilers and
programming tools (such as debuggers) on both RISC and non-RISC
architectures. What Steve says is correct, but more importantly, it is not
limited to non-RISC architectures. RISC compilers are becoming ever more
aggressive at optimization, and one of the areas that gets increasing
attention is function entry and exit.
Even without optimization, function entry and exit on many RISC machines is
not limited to a few recognizeable sequence of instructions. Register
saving and restoring, for instance, can add lots of instructions to the
preamble or postamble.
But when you factor in optimizations such as sinking register saves and
hoisting register restores, moving user instructions into the preamble,
speculative execution of instructions, and so forth, the number of possible
sequences is infinite.
Now weigh against that the benefit, if there is any, of allowing an
exception to propagate out of a signal handler. Does it buy you enough to
*require* RISC compilers to throw away huge performance gains? Not in my
opinion.
--
Bill Leonard
Harris Computer Systems Corporation
2101 W. Cypress Creek Road
Fort Lauderdale, FL 33309
Bill.Leonard@mail.hcsc.com
These opinions and statements are my own and do not necessarily reflect the
opinions or positions of Harris Computer Systems Corporation.
------------------------------------------------------------------------------
There's something wrong with an industry in which amazement is a common
reaction to things going right.
"Hard work never scared me. Oh, sure, it has startled me from a distance."
-- Professor Fishhawk
------------------------------------------------------------------------------
---
[ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu. The moderation policy
is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<4dsne7$1fv@hawk.hcsc.com>Path:
arc1-ca.pugleaf.net!fido.asd.sgi.com!austernReferences:
<4doh5o$k04@wcap.centerline.com> <4dos4l$ra9@engnews1.Eng.Sun.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!fido.asd.sgi.com!austern From: bill@amber.ssd.hcsc.com (Bill Leonard) Newsgroups: comp.std.c++ Subject: Re: Throwing an exception from within a si Date: 22 Jan 1996 09:41:13 PST Organization: Harris Computer Systems, Ft. Lauderdale FL Approved: austern@isolde.mti.sgi.com Message-ID: <4dsne7$1fv@hawk.hcsc.com> References: <4doh5o$k04@wcap.centerline.com> <4dos4l$ra9@engnews1.Eng.Sun.COM> Reply-To: Bill.Leonard@hawk.hcsc.com NNTP-Posting-Host: isolde.mti.sgi.com X-Original-Date: 21 Jan 1996 06:45:27 GMT X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBVAwUBMQPMV0y4NqrwXLNJAQFeywIAmUaooRHbpQsk7Wa4lZZDdW8VCYI7HJl+ aVVTBATOgP0Smr6r00HTk4PKG6WzYav209LWX87ZHuvul7P6VYHSDw== =Yxib Originator: austern@isolde.mti.sgi.com