Need advice on bounds checking approaches

Greg McGary gkm@eng.ascend.com
Tue Mar 28 12:26:00 GMT 2000


Geoff Keating <geoffk@cygnus.com> writes:

> They shouldn't end a basic block.  So long as the compiler knows that
> 'trap' RTXs are memory barriers, I think it can optimise them just
> like any other insn; and I think that's what it now does.

Please expand on this.  I'm not sure what you mean here.  My only
knowledge of barriers is what's in the gcc manual, namely that they
mark places where control cannot flow past.  However, this is not the
case with bounds checks.  Most often, control flows past the checks
because the trap condition is false.  Even when the trap condition is
true, the OS should have the option of logging the failure then
resuming execution rather than simply terminating.

Greg


More information about the Gcc mailing list