PERFORCE change 37590 for review
Peter Wemm
peter at FreeBSD.org
Fri Sep 5 14:39:03 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=37590
Change 37590 by peter at 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 at 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));
}
}
More information about the p4-projects
mailing list