[RFC] Program Bounds Checking

Nicholas Nethercote njn@csse.unimelb.edu.au
Thu Sep 28 16:57:00 GMT 2006


On Thu, 28 Sep 2006, Tzi-cker Chiueh wrote:

> We have considered the bound instruction in the CASH project. But
> we found that bound instruction is slower than the six normal
> instructions it is meant to replace for range checking. For example, the
> bound instruction on a 1.1 GHz PIII machine requires 7-8 clock cycles
> while the 6 equivalent instructions require 6-7 clock cycles. We have not
> tested it on newer processors, though.

I would guess it would be as slow or worse.  'bound' is an extremely rarely 
used instruction, and so will not be optimised-for at all.

Nick



More information about the Gcc mailing list