From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joern Rennecke To: Greg McGary Cc: gcc@gcc.gnu.org Subject: Re: Need advice on bounds checking approaches Date: Fri, 24 Mar 2000 12:08:00 -0000 Message-id: <200003242007.UAA14155@phal.cygnus.co.uk> References: <200003241918.MAA08919@gkm-dsl-194.ascend.com> X-SW-Source: 2000-03/msg00644.html > 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.