This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Bug in arm_final_prescan_insn
- From: Paul Brook <paul at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Richard Earnshaw <rearnsha at arm dot com>
- Date: Wed, 7 Sep 2005 15:09:51 +0100
- Subject: Re: [patch] Bug in arm_final_prescan_insn
- References: <200509071436.55755.paul@codesourcery.com>
On Wednesday 07 September 2005 14:36, Paul Brook wrote:
> As the comment in the code says, arm_final_prescan_insn calls get_attr_*
> which may clobber recog_data. This needs to be restored before returning.
> To this it calls recog(). However AFAICS this doesn't have the desired
> effect. It just returns the pattern ID.
>
> The attached patch fixes this by using extract_constrain_insn_cached()
> instead. This is the same routine as used by get_attr_*.
>
> I haven't managed to come up with a testcase for this. It showed up with
> some local Thumb-2 changes which use this much more aggressively.
Specifically get_attr_* sets which_alternative but recog() does not, so the
wrong alternative was being output.
Paul