This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: sparc.c bogus comparison
- From: DJ Delorie <dj at redhat dot com>
- To: rth at redhat dot com
- Cc: gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 25 Jan 2002 21:08:14 -0500
- Subject: Re: sparc.c bogus comparison
- References: <200201252209.g0PM9YE10773@greed.delorie.com> <20020125163934.A18303@redhat.com>
> On Fri, Jan 25, 2002 at 05:09:34PM -0500, DJ Delorie wrote:
> > Shouldn't the above be thusly?
> >
> > if (rtx_equal_p (temp1, op0))
> > abort ();
>
> Almost certainly.
Ok, then I'll check this in as almost obvious ;-)
2002-01-25 DJ Delorie <dj@redhat.com>
* config/sparc/sparc.c (sparc_emit_set_symbolic_const64): Compare
using rtx_equal_p, not by comparing pointers.
Index: config/sparc/sparc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.c,v
retrieving revision 1.178
diff -p -3 -r1.178 sparc.c
*** sparc.c 2002/01/16 17:44:22 1.178
--- sparc.c 2002/01/26 02:06:31
*************** sparc_emit_set_symbolic_const64 (op0, op
*** 1423,1429 ****
We _MUST_ have a separate temporary at this point,
if we don't barf immediately instead of generating
incorrect code. */
! if (temp1 == op0)
abort ();
emit_insn (gen_sethh (op0, op1));
--- 1423,1429 ----
We _MUST_ have a separate temporary at this point,
if we don't barf immediately instead of generating
incorrect code. */
! if (rtx_equal_p (temp1, op0))
abort ();
emit_insn (gen_sethh (op0, op1));