On Thu, Mar 27, 2014 at 10:17:26AM -0600, Jeff Law wrote:
> >Did you mean Jeff's original change, or say:
> >--- gcc/config/i386/i386.c   2014-03-20 17:41:45.917689676 +0100
> >+++ gcc/config/i386/i386.c   2014-03-27 14:47:21.876254288 +0100
> >@@ -13925,13 +13925,13 @@ ix86_legitimize_address (rtx x, rtx oldx
> >        if (GET_CODE (XEXP (x, 0)) == MULT)
> >     {
> >       changed = 1;
> >-      XEXP (x, 0) = force_operand (XEXP (x, 0), 0);
> >+      XEXP (x, 0) = copy_addr_to_reg (XEXP (x, 0));
> >     }
> >
> >        if (GET_CODE (XEXP (x, 1)) == MULT)
> >     {
> >       changed = 1;
> >-      XEXP (x, 1) = force_operand (XEXP (x, 1), 0);
> >+      XEXP (x, 1) = copy_addr_to_reg (XEXP (x, 1));
> >     }
> >
> >        if (changed
> >(or copy_to_reg, should be the same thing).
> copy_addr_to_reg is probably better since it forces us into Pmode
> (which is useful if we had a mode-less constant).

Well, but in both of these cases you know that what you pass in is
a MULT and thus never mode-less.  That said, copy_addr_to_reg has the
advantage that it will ICE if the MULT isn't Pmode, but that really should
never happen for addresses, so not a big difference.

        Jakub

Reply via email to