This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH,rs6000] fix ICE caused by lax rs6000_legitimize_address
On Tue, Nov 11, 2008 at 07:19:11AM -0800, Nathan Froyd wrote:
> --- gcc/config/rs6000/rs6000.c (revision 141763)
> +++ gcc/config/rs6000/rs6000.c (working copy)
> @@ -3813,6 +3813,12 @@ rs6000_legitimize_address (rtx x, rtx ol
> HOST_WIDE_INT high_int, low_int;
> rtx sum;
> low_int = ((INTVAL (XEXP (x, 1)) & 0xffff) ^ 0x8000) - 0x8000;
> + /* Using a REG+CONST 64-bit integer load on 64-bit platforms
> + requires that CONST be word-aligned. */
> + if (TARGET_POWERPC64
> + && (mode == DImode || mode == DDmode)
> + && (low_int & 0x3))
> + low_int &= (HOST_WIDE_INT) ~3;
> high_int = INTVAL (XEXP (x, 1)) - low_int;
> sum = force_operand (gen_rtx_PLUS (Pmode, XEXP (x, 0),
> GEN_INT (high_int)), 0);
Is this really worth doing? How does the generated code compare with
simply returning NULL from rs6000_legitimize_address for this case?
--
Alan Modra
Australia Development Lab, IBM