This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Fix crafty on powerpc64-linux-gnu
- From: Richard Sandiford <rsandifo at redhat dot com>
- To: mark at codesourcery dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 23 Aug 2004 19:00:52 +0100
- Subject: Re: PATCH: Fix crafty on powerpc64-linux-gnu
- References: <200408202340.i7KNeXT1016358@sirius.codesourcery.com>
Mark Mitchell <mark@codesourcery.com> writes:
> ! /* Form the adjusted address. */
> ! if (GET_CODE (XEXP (ad, 0)) == PLUS)
> ! ad = gen_rtx_PLUS (GET_MODE (ad),
> ! op_index == 0 ? offset_reg : addend,
> ! op_index == 0 ? addend : offset_reg);
> ! else
> ! ad = gen_rtx_LO_SUM (GET_MODE (ad),
> ! op_index == 0 ? offset_reg : addend,
> ! op_index == 0 ? addend : offset_reg);
Sorry if I'm misreading the code, but shouldn't the first operand to the
LO_SUM always be "offset_reg" (the (plus reg const) thing) and the second
always be "addend"? I guess it doesn't matter since the LO_SUM condition
should never trigger for op_index == 1. It just looked a little odd...
Richard