* [PATCH] Jan's fix to PR target/7434
[not found] <20020810203558.GP10671@atrey.karlin.mff.cuni.cz>
@ 2002-08-14 4:33 ` Gwenole Beauchesne
0 siblings, 0 replies; only message in thread
From: Gwenole Beauchesne @ 2002-08-14 4:33 UTC (permalink / raw)
To: Jan Hubicka; +Cc: gcc-patches, rth, aj
Hi,
1) Just in case this gets lost, the following is what Jan appended to the
PR only.
On Sat, 10 Aug 2002, Jan Hubicka wrote:
> Hi,
> the attached patch fixes the problem. Crash was caused by confussion of
> modes in 64bit splitting. In the 32bit mode all values involved are
> SImode, but for 64bit we need to change them.
>
> Bootstrapped/regtested i386. OK for mainline and 3.2.x once opened?
>
> Sat Aug 10 22:14:41 CEST 2002 Jan Hubicka <jh@suse.cz>
>
> * i386.c (ix86_split_long_move): Fix modes in the precomputed address
> references.
>
> *** i386.c.old Sat Aug 10 18:58:35 2002
> --- i386.c Sat Aug 10 22:13:44 2002
> *************** ix86_split_long_move (operands)
> *** 9561,9575 ****
> Do an lea to the last part and use only one colliding move. */
> else if (collisions > 1)
> {
> collisions = 1;
> ! emit_insn (gen_rtx_SET (VOIDmode, part[0][nparts - 1],
> XEXP (part[1][0], 0)));
> ! part[1][0] = change_address (part[1][0],
> ! TARGET_64BIT ? DImode : SImode,
> ! part[0][nparts - 1]);
> ! part[1][1] = adjust_address (part[1][0], VOIDmode, UNITS_PER_WORD);
> if (nparts == 3)
> ! part[1][2] = adjust_address (part[1][0], VOIDmode, 8);
> }
> }
>
> --- 9561,9575 ----
> Do an lea to the last part and use only one colliding move. */
> else if (collisions > 1)
> {
> + rtx addrreg = gen_lowpart (Pmode, part[0][nparts - 1]);
> collisions = 1;
> ! emit_insn (gen_rtx_SET (VOIDmode, addrreg,
> XEXP (part[1][0], 0)));
> ! part[1][0] = change_address (part[1][0], GET_MODE (part[0][0]),
> ! addrreg);
> ! part[1][1] = adjust_address (part[1][0], GET_MODE (part[0][1]), UNITS_PER_WORD);
> if (nparts == 3)
> ! part[1][2] = adjust_address (part[1][0], GET_MODE (part[0][2]), 8);
> }
> }
2) The testcase:
2002-07-29 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com>
PR target/7434
* testsuite/gcc.dg/20020729-2.c: New test.
--- gcc-3.2/gcc/testsuite/gcc.dg/20020729-2.c.x86_64-split-long-moves 2002-08-13 11:19:27.000000000 +0200
+++ gcc-3.2/gcc/testsuite/gcc.dg/20020729-2.c 2002-08-13 11:19:08.000000000 +0200
@@ -0,0 +1,14 @@
+/* PR target/7434
+ This testcase ICE'd gcc on x86-64, because of confusion of modes in
+ 64-bit splitting. */
+/* { dg-do compile } */
+
+int main (void)
+{
+ static const int align_g[] = { 1, 2, 4, 8, 16 };
+ char * buf;
+ int i = 0;
+ volatile long double val = 0;
+ val = *((long double *)(buf + align_g[i]));
+ return 0;
+}
Bye,
Gwenole.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-08-14 11:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20020810203558.GP10671@atrey.karlin.mff.cuni.cz>
2002-08-14 4:33 ` [PATCH] Jan's fix to PR target/7434 Gwenole Beauchesne
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).