PERFORCE change 31798 for review
Peter Wemm
peter at FreeBSD.org
Sat May 24 11:08:50 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=31798
Change 31798 by peter at peter_hammer on 2003/05/24 11:08:02
Go for a build-time patch instead of a source patch. This might be
committable.
Affected files ...
.. //depot/projects/hammer/contrib/gcc/config/i386/i386.c#7 edit
.. //depot/projects/hammer/gnu/usr.bin/cc/cc_int/Makefile#3 edit
.. //depot/projects/hammer/gnu/usr.bin/cc/cc_int/amd64.patch#1 add
Differences ...
==== //depot/projects/hammer/contrib/gcc/config/i386/i386.c#7 (text+ko) ====
@@ -6764,7 +6764,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);
@@ -8823,24 +8823,15 @@
Do an lea to the last part and use only one colliding move. */
else if (collisions > 1)
{
- rtx base;
-
collisions = 1;
-
- 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));
+ 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] = replace_equiv_address (part[1][2],
- plus_constant (base, 8));
+ part[1][2] = adjust_address (part[1][0], VOIDmode, 8);
}
}
==== //depot/projects/hammer/gnu/usr.bin/cc/cc_int/Makefile#3 (text+ko) ====
@@ -23,8 +23,19 @@
toplev.c tree.c unroll.c varasm.c version.c xcoffout.c \
alias.c bitmap.c dyn-string.c \
gcse.c genrtl.c profile.c regmove.c varray.c \
- attribs.c cselib.c debug.c rtl-error.c tree-dump.c tree-inline.c \
- ${GCC_CPU}.c
+ attribs.c cselib.c debug.c rtl-error.c tree-dump.c tree-inline.c
+
+.if ${MACHINE_ARCH} != "amd64"
+SRCS+= ${GCC_CPU}.c
+.else
+SRCS+= i386-hacked.c
+CLEANFILES+= i386-hacked.c
+
+i386-hacked.c: ${GCCDIR}/config/i386/i386.c amd64.patch
+ rm -f i386-hacked.c # in case p4 readonly copied
+ cp ${GCCDIR}/config/i386/i386.c i386-hacked.c
+ patch -b .orig < ${.CURDIR}/amd64.patch
+.endif
SRCS+= bb-reorder.c conflict.c ggc-common.c \
ggc-page.c ifcvt.c lists.c predict.c regrename.c resource.c sibcall.c \
More information about the p4-projects
mailing list