This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Bug in arm_final_prescan_insn


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]