This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Need advice on bounds checking approaches
- To: Greg McGary <gkm at eng dot ascend dot com>
- Subject: Re: Need advice on bounds checking approaches
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Fri, 24 Mar 2000 20:07:39 +0000 (GMT)
- CC: gcc at gcc dot gnu dot org
> Question: with the above plan, is there a way to provide a default
> expansion of the "check_bounds" pattern into primitive RTL
> (comparisons, conditional branches and call to abort) for those
> targets that don't define an insn for "check_bounds"?
You can use HAVE_check_bounds to test if a "check_bounds" pattern has been
defined in the md file. If it is defined, you can use gen_check_bounds
to generate this pattern. The expander might fail (e.g. because the
target can implement the bounds checking insn only for a particular
cpu_, in which case you get a zero return value from gen_check_bounds.