This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ifcvt.c and STORE_FLAG_VALUE
- To: Philippe De Muyter <phdm at macqel dot be>
- Subject: Re: ifcvt.c and STORE_FLAG_VALUE
- From: John Vickers <John dot Vickers at pace dot co dot uk>
- Date: Thu, 04 May 2000 17:53:50 +0100
- CC: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Michael Meissner <meissner at cygnus dot com>
- Organization: Pace Micro Technology PLC
- References: <200005041617.SAA17529@mail.macqel.be>
Philippe De Muyter wrote:
>
> Bootstrapping on m68k-motorola-sysv yields also the following failure:
>
> cc -c -DIN_GCC -g -DHAVE_CONFIG_H -I. -I/gcc -I/gcc/config -I/gcc/../include /gcc/ifcvt.c
> "/gcc/ifcvt.c", line 519: illegal lhs of assignment operator
> "/gcc/ifcvt.c", line 557: illegal lhs of assignment operator
> "/gcc/ifcvt.c", line 640: illegal lhs of assignment operator
>
> That happens with -STORE_FLAG_VALUE when STORE_FLAG_VALUE is defined as -1
> I thought to define it as (-1), but as it it tested in preprocessor
> expressions for equality with -1, I did not dare to do that.
Sorry if I'm being dense, but the brackets in the macro definition
don't look like a courageous step to me.
Presumably you agree that normally we should have the brackets
in the definition, rather than hacking the point of use, but you
perhaps know of a preprocessor where this would break ?
Regards,
John.
> My proposed fix
> is below. OK to commit ?
>
> Philippe De Muyter <phdm@macqel.be>
>
> * ifcvt.c (noce_try_store_flag_constants): Do not negate
> STORE_FLAG_VALUE.
[...]
> - if (diff == STORE_FLAG_VALUE || diff == -STORE_FLAG_VALUE)
> + if (diff == STORE_FLAG_VALUE || -diff == STORE_FLAG_VALUE)
Michael Meissner wrote:
>
> Yes it is ok to commit, providing you put in a comment of why this is being
> done, or possibly change the line to:
>
> if (diff == STORE_FLAG_VALUE || diff == -(STORE_FLAG_VALUE))