Date: Fri, 5 Sep 2003 14:39:01 -0700 (PDT) From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 37590 for review Message-ID: <200309052139.h85Ld1Xv062552@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=37590 Change 37590 by peter@peter_daintree on 2003/09/05 14:38:45 check in an amd64 fix from gcc-3.2.2 while it was in -current Affected files ... .. //depot/projects/ezm3/language/modula3/m3compiler/m3cc/gcc/gcc/config/i386/i386.c#2 edit Differences ... ==== //depot/projects/ezm3/language/modula3/m3compiler/m3cc/gcc/gcc/config/i386/i386.c#2 (text+ko) ==== @@ -6760,7 +6760,7 @@ int value, rel; { if (TARGET_64BIT) - fprintf (file, "%s%s%d-.+(.-%s%d)\n", + fprintf (file, "%s%s%d-%s%d\n", ASM_LONG, LPREFIX, value, LPREFIX, rel); else if (HAVE_AS_GOTOFF_IN_DATA) fprintf (file, "%s%s%d@GOTOFF\n", ASM_LONG, LPREFIX, value); @@ -8819,15 +8819,24 @@ Do an lea to the last part and use only one colliding move. */ else if (collisions > 1) { + rtx base; + 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); + + base = part[0][nparts - 1]; + + /* Handle the case when the last part isn't valid for lea. + Happens in 64-bit mode storing the 12-byte XFmode. */ + if (GET_MODE (base) != Pmode) + base = gen_rtx_REG (Pmode, REGNO (base)); + + emit_insn (gen_rtx_SET (VOIDmode, base, XEXP (part[1][0], 0))); + part[1][0] = replace_equiv_address (part[1][0], base); + part[1][1] = replace_equiv_address (part[1][1], + plus_constant (base, UNITS_PER_WORD)); if (nparts == 3) - part[1][2] = adjust_address (part[1][0], VOIDmode, 8); + part[1][2] = replace_equiv_address (part[1][2], + plus_constant (base, 8)); } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309052139.h85Ld1Xv062552>