This is the mail archive of the
mailing list for the GCC project.
Re: emit_conditional_move w/o compare insn (was: Full comparisonin 'cbranchsi4' leads to error in gcc 4.0)
- From: Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- To: Sami Khawam <S dot Khawam at ee dot ed dot ac dot uk>
- Cc: Gary Funck <gary at intrepid dot com>, gcc at gcc dot gnu dot org
- Date: Wed, 11 May 2005 10:16:04 +0100
- Subject: Re: emit_conditional_move w/o compare insn (was: Full comparisonin 'cbranchsi4' leads to error in gcc 4.0)
- References: <JCEPIPKHCJGDMPOHDOIGOEGDCOAA.firstname.lastname@example.org> <4280E23A.email@example.com>
On Tue, 2005-05-10 at 17:32, Sami Khawam wrote:
> Hi Gary,
> Thanks a lot for the tip.
> After debugging, the problem seem to be coming from 'emit_conditional_move'
> which is called by 'expand_sdiv_pow2' when converting division-by-constants into
> The problem is that the architecture I have does not support compare operations:
> It either has a conditional move or a conditional branch instructions (the
> compare operation is part of these instructions).
> To make a conditional move, 'emit_conditional_move' generates a seperate compare
> and then a move insns, maybe hoping that these will be later combined into a
> single instruction during the optimization steps.
> Would it be possible to tell this to emit_conditional_move so that it generates
> the cmove insn directely?
The Thumb instruction set on ARM uses cbranchsi4 with very similar
constraints to those you have. It would really help if you could post a
testcase so that we can analyse this in a scientific manner rather than
guessing what the problem might be.