This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: wrong assertion in caller-save.c
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Eric Botcazou <ebotcazou at adacore dot com>, BELBACHIR Selim <selim dot belbachir at fr dot thalesgroup dot com>, gcc at gcc dot gnu dot org, rdsandiford at googlemail dot com
- Date: Mon, 13 Jan 2014 17:18:54 +0100
- Subject: Re: wrong assertion in caller-save.c
- Authentication-results: sourceware.org; auth=none
- References: <12235_1389377088_52D03640_12235_1644_1_9C88BF562A27AA41B242B2780441926E210D2857DA at THSONEA01CMS05P dot one dot grp> <6380325 dot qcWgXJckTX at polaris> <52D06A45 dot 90504 at redhat dot com> <87ob3iq1g4 dot fsf at talisman dot default> <52D4048D dot 2020604 at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Jan 13, 2014 at 08:21:49AM -0700, Jeff Law wrote:
> On 01/11/14 03:04, Richard Sandiford wrote:
> >Jeff Law <law@redhat.com> writes:
> >>On 01/10/14 14:44, Eric Botcazou wrote:
> >>>>In my backend movdi pattern has unfortunately code '0' (depends on pattern
> >>>>declaration order). When gcc tried to determine if my DI regs can be saved
> >>>>and restore as 'caller saves' (in caller-save.c::init_caller_save()) it
> >>>>failed on this wrong assertion.
> >>>
> >>>I'd arrange for avoiding code 0 instead because this disables the cache.
> >>Agreed, but the assert in caller-save is still wrong and ought to be fixed.
> >
> >FWIW, it was fixed in 4.8 and later by making CODE_FOR_nothing be 0
> >and starting the real instructions at 1.
> Funny you should mention that. My recollection was that
> CODE_FOR_nothing was -1, but when I went looking in response to this
> issue I found it was zero...
It changed with http://gcc.gnu.org/ml/gcc-patches/2012-07/msg00300.html
Jakub