__attribute__((cleanup(function)) versus try/finally
Richard Henderson
rth@redhat.com
Tue May 13 21:27:00 GMT 2003
On Mon, May 12, 2003 at 05:07:36PM -0700, Geoff Keating wrote:
> For instance, much of the information in the tables is included in the
> object code (nearly all of it in the case of routines that don't
> actually have cleanups). It wouldn't be that hard to write a routine
> that, given a return address, can determine what registers need to be
> restored and from where in 90% of the cases by looking at the object
> code; those routines (in the 90%) can have an abbreviated EH entry
> that just says "use the object code", and the remaining 10% could have
> a real EH entry.
If you have an entry at all, it means you know the extent of the
function being described. So you know where the entry point is.
So no searching for that. You'd just read forward from the start.
However, if you make the prologue regular enough that code reading
is going to work, you're talking about *maybe* 2 bytes per saved
register in the EH information, at which point I disbelieve that
we're saving enough data space to make this worthwhile.
r~
More information about the Gcc
mailing list